Send correct action on round recording.

This commit is contained in:
John Preston 2024-10-28 09:18:04 +04:00
parent 6ed25d012f
commit 2567096de0

View file

@ -1885,7 +1885,10 @@ void VoiceRecordBar::recordUpdated(quint16 level, int samples) {
}
Core::App().updateNonIdle();
update(_durationRect);
_sendActionUpdates.fire({ Api::SendProgressType::RecordVoice });
const auto type = _recordingVideo
? Api::SendProgressType::RecordRound
: Api::SendProgressType::RecordVoice;
_sendActionUpdates.fire({ type });
}
void VoiceRecordBar::stop(bool send) {
@ -1917,7 +1920,10 @@ void VoiceRecordBar::finish() {
[[maybe_unused]] const auto s = takeTTLState();
_sendActionUpdates.fire({ Api::SendProgressType::RecordVoice, -1 });
const auto type = _recordingVideo
? Api::SendProgressType::RecordRound
: Api::SendProgressType::RecordVoice;
_sendActionUpdates.fire({ type, -1 });
_data = {};
}