mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
Fixed accepting of Enter key in box of voice message discarding.
This commit is contained in:
parent
776c099a25
commit
90f90a4ca3
2 changed files with 5 additions and 1 deletions
|
@ -1602,7 +1602,7 @@ void VoiceRecordBar::installListenStateFilter() {
|
|||
_listen->playPause();
|
||||
return Result::Cancel;
|
||||
}
|
||||
if (isEnter) {
|
||||
if (isEnter && !_warningShown) {
|
||||
requestToSendWithOptions({});
|
||||
return Result::Cancel;
|
||||
}
|
||||
|
@ -1633,6 +1633,7 @@ void VoiceRecordBar::showDiscardBox(
|
|||
hideAnimated();
|
||||
}
|
||||
close();
|
||||
_warningShown = false;
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
|
@ -1644,6 +1645,7 @@ void VoiceRecordBar::showDiscardBox(
|
|||
tr::lng_record_lock_discard(tr::now),
|
||||
st::attentionBoxButton,
|
||||
std::move(sure)));
|
||||
_warningShown = true;
|
||||
}
|
||||
|
||||
} // namespace HistoryView::Controls
|
||||
|
|
|
@ -143,6 +143,8 @@ private:
|
|||
|
||||
Fn<bool()> _startRecordingFilter;
|
||||
|
||||
bool _warningShown = false;
|
||||
|
||||
rpl::variable<bool> _recording = false;
|
||||
rpl::variable<bool> _inField = false;
|
||||
rpl::variable<bool> _lockShowing = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue