mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Removed delay for voice lock widget appearing.
This commit is contained in:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user