mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +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;
|
||||
}
|
||||
|
||||
const auto shown = _recordingLifetime.make_state<bool>(false);
|
||||
_lockShowing = true;
|
||||
startRedCircleAnimation();
|
||||
|
||||
_recording = true;
|
||||
_controller->widget()->setInnerFocus();
|
||||
instance()->start();
|
||||
instance()->updated(
|
||||
) | 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);
|
||||
}, [=] {
|
||||
stop(false);
|
||||
|
|
Loading…
Add table
Reference in a new issue