mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Added edit message prevent when there is unsent recorded voice data.
This commit is contained in:
@@ -5523,6 +5523,10 @@ void HistoryWidget::editMessage(FullMsgId itemId) {
|
||||
}
|
||||
|
||||
void HistoryWidget::editMessage(not_null<HistoryItem*> item) {
|
||||
if (_voiceRecordBar && _voiceRecordBar->isListenState()) {
|
||||
Ui::show(Box<InformBox>(tr::lng_edit_caption_voice(tr::now)));
|
||||
return;
|
||||
}
|
||||
if (const auto media = item->media()) {
|
||||
if (media->allowsEditCaption()) {
|
||||
Ui::show(Box<EditCaptionBox>(controller(), item));
|
||||
|
@@ -1748,6 +1748,11 @@ void ComposeControls::editMessage(not_null<HistoryItem*> item) {
|
||||
Expects(_history != nullptr);
|
||||
Expects(draftKeyCurrent() != Data::DraftKey::None());
|
||||
|
||||
if (_voiceRecordBar && _voiceRecordBar->isListenState()) {
|
||||
Ui::show(Box<InformBox>(tr::lng_edit_caption_voice(tr::now)));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isEditingMessage()) {
|
||||
saveFieldToHistoryLocalDraft();
|
||||
}
|
||||
|
Reference in New Issue
Block a user