mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 07:33:52 +02:00
Removed delay for voice lock widget appearing.
This commit is contained in:
parent
cbaca6382e
commit
f75fb33c29
1 changed files with 2 additions and 7 deletions
|
@ -1218,19 +1218,14 @@ void VoiceRecordBar::startRecording() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto shown = _recordingLifetime.make_state<bool>(false);
|
_lockShowing = true;
|
||||||
|
startRedCircleAnimation();
|
||||||
|
|
||||||
_recording = true;
|
_recording = true;
|
||||||
_controller->widget()->setInnerFocus();
|
_controller->widget()->setInnerFocus();
|
||||||
instance()->start();
|
instance()->start();
|
||||||
instance()->updated(
|
instance()->updated(
|
||||||
) | rpl::start_with_next_error([=](const Update &update) {
|
) | rpl::start_with_next_error([=](const Update &update) {
|
||||||
if (!(*shown) && !_showAnimation.animating()) {
|
|
||||||
// Show the lock widget after the first successful update.
|
|
||||||
*shown = true;
|
|
||||||
_lockShowing = true;
|
|
||||||
startRedCircleAnimation();
|
|
||||||
}
|
|
||||||
recordUpdated(update.level, update.samples);
|
recordUpdated(update.level, update.samples);
|
||||||
}, [=] {
|
}, [=] {
|
||||||
stop(false);
|
stop(false);
|
||||||
|
|
Loading…
Add table
Reference in a new issue