mirror of https://github.com/procxx/kepka.git
Added more appropriate phrase for invalid files in edit media.
This commit is contained in:
parent
bd653dfdff
commit
48362cd4bc
|
@ -164,6 +164,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
|
||||
"lng_edit_media" = "Edit media";
|
||||
"lng_edit_media_album_error" = "This file cannot be saved as a part of an album.";
|
||||
"lng_edit_media_invalid_file" = "Sorry, no way to use this file.";
|
||||
|
||||
"lng_intro_about" = "Welcome to the official Telegram Desktop app.\nIt's fast and secure.";
|
||||
"lng_start_msgs" = "START MESSAGING";
|
||||
|
|
|
@ -4678,10 +4678,15 @@ void ApiWrap::editUploadedFile(
|
|||
applyUpdates(result);
|
||||
}).fail([=](const RPCError &error) {
|
||||
QString err = error.type();
|
||||
if (err == qstr("MESSAGE_NOT_MODIFIED")
|
||||
|| err == qstr("MEDIA_NEW_INVALID")) {
|
||||
if (err == qstr("MESSAGE_NOT_MODIFIED")) {
|
||||
item->returnSavedMedia();
|
||||
_session->data().sendHistoryChangeNotifications();
|
||||
} else if (err == qstr("MEDIA_NEW_INVALID")) {
|
||||
item->returnSavedMedia();
|
||||
_session->data().sendHistoryChangeNotifications();
|
||||
Ui::show(
|
||||
Box<InformBox>(lang(lng_edit_media_invalid_file)),
|
||||
LayerOption::KeepOther);
|
||||
} else {
|
||||
sendMessageFail(error);
|
||||
}
|
||||
|
|
|
@ -405,7 +405,7 @@ void EditCaptionBox::createEditMediaButton() {
|
|||
const auto isWebp = [](QString mimeType) {
|
||||
if (mimeType == qstr("image/webp")) {
|
||||
Ui::show(
|
||||
Box<InformBox>(lang(lng_edit_media_album_error)),
|
||||
Box<InformBox>(lang(lng_edit_media_invalid_file)),
|
||||
LayerOption::KeepOther);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue