mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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() {
|
void CancelButton::init() {
|
||||||
_showProgress.value(
|
_showProgress.value(
|
||||||
) | rpl::start_with_next([=](float64 progress) {
|
) | rpl::map(rpl::mappers::_1 > 0.) | rpl::distinct_until_changed(
|
||||||
const auto hasProgress = (progress > 0.);
|
) | rpl::start_with_next([=](bool hasProgress) {
|
||||||
if (isHidden() == !hasProgress) {
|
setVisible(hasProgress);
|
||||||
setVisible(hasProgress);
|
|
||||||
}
|
|
||||||
update();
|
|
||||||
}, lifetime());
|
}, lifetime());
|
||||||
|
|
||||||
paintRequest(
|
paintRequest(
|
||||||
|
@ -960,6 +957,7 @@ QPoint CancelButton::prepareRippleStartPosition() const {
|
||||||
|
|
||||||
void CancelButton::requestPaintProgress(float64 progress) {
|
void CancelButton::requestPaintProgress(float64 progress) {
|
||||||
_showProgress = progress;
|
_showProgress = progress;
|
||||||
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
VoiceRecordBar::VoiceRecordBar(
|
VoiceRecordBar::VoiceRecordBar(
|
||||||
|
|
Loading…
Add table
Reference in a new issue