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