Fixed button position in voice record bar for ttl voice messages.

This commit is contained in:
23rd 2024-01-14 14:01:48 +03:00 committed by John Preston
parent 5273fbf57b
commit f9b5789cf7

View file

@ -1325,6 +1325,7 @@ void VoiceRecordBar::init() {
} }
updateTTLGeometry(TTLAnimationType::TopBottom, 1. - value); updateTTLGeometry(TTLAnimationType::TopBottom, 1. - value);
}; };
_showListenAnimation.stop();
_showListenAnimation.start(std::move(callback), 0., to, duration); _showListenAnimation.start(std::move(callback), 0., to, duration);
}, lifetime()); }, lifetime());
@ -1456,13 +1457,18 @@ void VoiceRecordBar::setTTLFilter(FilterCallback &&callback) {
} }
void VoiceRecordBar::initLockGeometry() { void VoiceRecordBar::initLockGeometry() {
rpl::combine( const auto parent = static_cast<Ui::RpWidget*>(parentWidget());
_lock->heightValue(), rpl::merge(
geometryValue(), _lock->heightValue() | rpl::to_empty,
static_cast<Ui::RpWidget*>(parentWidget())->geometryValue() geometryValue() | rpl::to_empty,
parent->geometryValue() | rpl::to_empty
) | rpl::start_with_next([=] { ) | rpl::start_with_next([=] {
updateLockGeometry(); updateLockGeometry();
}, lifetime()); }, lifetime());
parent->geometryValue(
) | rpl::start_with_next([=] {
updateTTLGeometry(TTLAnimationType::RightLeft, 1.);
}, lifetime());
} }
void VoiceRecordBar::initLevelGeometry() { void VoiceRecordBar::initLevelGeometry() {