mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Fixed hiding cancel button in state of listen to recorded voice data.
This commit is contained in:
parent
3940d57c3d
commit
f24b0c6237
1 changed files with 4 additions and 6 deletions
|
@ -924,12 +924,9 @@ CancelButton::CancelButton(not_null<Ui::RpWidget*> parent, int height)
|
|||
|
||||
void CancelButton::init() {
|
||||
_showProgress.value(
|
||||
) | rpl::start_with_next([=](float64 progress) {
|
||||
const auto hasProgress = (progress > 0.);
|
||||
if (isHidden() == !hasProgress) {
|
||||
setVisible(hasProgress);
|
||||
}
|
||||
update();
|
||||
) | rpl::map(rpl::mappers::_1 > 0.) | rpl::distinct_until_changed(
|
||||
) | rpl::start_with_next([=](bool hasProgress) {
|
||||
setVisible(hasProgress);
|
||||
}, lifetime());
|
||||
|
||||
paintRequest(
|
||||
|
@ -960,6 +957,7 @@ QPoint CancelButton::prepareRippleStartPosition() const {
|
|||
|
||||
void CancelButton::requestPaintProgress(float64 progress) {
|
||||
_showProgress = progress;
|
||||
update();
|
||||
}
|
||||
|
||||
VoiceRecordBar::VoiceRecordBar(
|
||||
|
|
Loading…
Add table
Reference in a new issue