2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Added warning when try to attach new media while editing message.

This commit is contained in:
23rd
2019-09-09 17:57:53 +03:00
committed by John Preston
parent 9fc87c3cb8
commit f9d10094ac
2 changed files with 10 additions and 0 deletions

View File

@@ -3197,6 +3197,11 @@ bool HistoryWidget::recordingAnimationCallback(crl::time now) {
}
void HistoryWidget::chooseAttach() {
if (_editMsgId) {
Ui::show(Box<InformBox>(tr::lng_edit_caption_attach(tr::now)));
return;
}
if (!_peer || !_peer->canWrite()) {
return;
} else if (const auto error = Data::RestrictionError(
@@ -4206,6 +4211,10 @@ bool HistoryWidget::confirmSendingFiles(
if (showSendingFilesError(list)) {
return false;
}
if (_editMsgId) {
Ui::show(Box<InformBox>(tr::lng_edit_caption_attach(tr::now)));
return false;
}
const auto noCompressOption = (list.files.size() > 1)
&& !list.allFilesForCompress