mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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();
|
_listen->playPause();
|
||||||
return Result::Cancel;
|
return Result::Cancel;
|
||||||
}
|
}
|
||||||
if (isEnter) {
|
if (isEnter && !_warningShown) {
|
||||||
requestToSendWithOptions({});
|
requestToSendWithOptions({});
|
||||||
return Result::Cancel;
|
return Result::Cancel;
|
||||||
}
|
}
|
||||||
|
@ -1633,6 +1633,7 @@ void VoiceRecordBar::showDiscardBox(
|
||||||
hideAnimated();
|
hideAnimated();
|
||||||
}
|
}
|
||||||
close();
|
close();
|
||||||
|
_warningShown = false;
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
|
@ -1644,6 +1645,7 @@ void VoiceRecordBar::showDiscardBox(
|
||||||
tr::lng_record_lock_discard(tr::now),
|
tr::lng_record_lock_discard(tr::now),
|
||||||
st::attentionBoxButton,
|
st::attentionBoxButton,
|
||||||
std::move(sure)));
|
std::move(sure)));
|
||||||
|
_warningShown = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace HistoryView::Controls
|
} // namespace HistoryView::Controls
|
||||||
|
|
|
@ -143,6 +143,8 @@ private:
|
||||||
|
|
||||||
Fn<bool()> _startRecordingFilter;
|
Fn<bool()> _startRecordingFilter;
|
||||||
|
|
||||||
|
bool _warningShown = false;
|
||||||
|
|
||||||
rpl::variable<bool> _recording = false;
|
rpl::variable<bool> _recording = false;
|
||||||
rpl::variable<bool> _inField = false;
|
rpl::variable<bool> _inField = false;
|
||||||
rpl::variable<bool> _lockShowing = false;
|
rpl::variable<bool> _lockShowing = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue