mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Added specific phrases to chats list for voice messages with ttl.
This commit is contained in:
parent
dff4191ac9
commit
7542f04010
2 changed files with 24 additions and 6 deletions
|
@ -2440,6 +2440,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
"lng_in_dlg_contact" = "Contact";
|
||||
"lng_in_dlg_audio" = "Voice message";
|
||||
"lng_in_dlg_video_message" = "Video message";
|
||||
"lng_in_dlg_voice_message_ttl" = "One-time Voice Message";
|
||||
"lng_in_dlg_video_message_ttl" = "One-time Video Message";
|
||||
"lng_in_dlg_file" = "File";
|
||||
"lng_in_dlg_sticker" = "Sticker";
|
||||
"lng_in_dlg_sticker_emoji" = "{emoji} Sticker";
|
||||
|
|
|
@ -983,13 +983,17 @@ ItemPreview MediaFile::toPreview(ToPreviewOptions options) const {
|
|||
const auto type = [&] {
|
||||
using namespace Ui::Text;
|
||||
if (_document->isVideoMessage()) {
|
||||
return tr::lng_in_dlg_video_message(tr::now);
|
||||
return (item->media() && item->media()->ttlSeconds())
|
||||
? tr::lng_in_dlg_video_message_ttl(tr::now)
|
||||
: tr::lng_in_dlg_video_message(tr::now);
|
||||
} else if (_document->isAnimation()) {
|
||||
return u"GIF"_q;
|
||||
} else if (_document->isVideoFile()) {
|
||||
return tr::lng_in_dlg_video(tr::now);
|
||||
} else if (_document->isVoiceMessage()) {
|
||||
return tr::lng_in_dlg_audio(tr::now);
|
||||
return (item->media() && item->media()->ttlSeconds())
|
||||
? tr::lng_in_dlg_voice_message_ttl(tr::now)
|
||||
: tr::lng_in_dlg_audio(tr::now);
|
||||
} else if (const auto name = FormatSongNameFor(_document).string();
|
||||
!name.isEmpty()) {
|
||||
return name;
|
||||
|
@ -1020,13 +1024,19 @@ TextWithEntities MediaFile::notificationText() const {
|
|||
}
|
||||
const auto type = [&] {
|
||||
if (_document->isVideoMessage()) {
|
||||
return tr::lng_in_dlg_video_message(tr::now);
|
||||
const auto media = parent()->media();
|
||||
return (media && media->ttlSeconds())
|
||||
? tr::lng_in_dlg_video_message_ttl(tr::now)
|
||||
: tr::lng_in_dlg_video_message(tr::now);
|
||||
} else if (_document->isAnimation()) {
|
||||
return u"GIF"_q;
|
||||
} else if (_document->isVideoFile()) {
|
||||
return tr::lng_in_dlg_video(tr::now);
|
||||
} else if (_document->isVoiceMessage()) {
|
||||
return tr::lng_in_dlg_audio(tr::now);
|
||||
const auto media = parent()->media();
|
||||
return (media && media->ttlSeconds())
|
||||
? tr::lng_in_dlg_voice_message_ttl(tr::now)
|
||||
: tr::lng_in_dlg_audio(tr::now);
|
||||
} else if (!_document->filename().isEmpty()) {
|
||||
return _document->filename();
|
||||
} else if (_document->isAudioFile()) {
|
||||
|
@ -1077,13 +1087,19 @@ TextForMimeData MediaFile::clipboardText() const {
|
|||
return tr::lng_in_dlg_sticker(tr::now);
|
||||
} else if (_document->isAnimation()) {
|
||||
if (_document->isVideoMessage()) {
|
||||
return tr::lng_in_dlg_video_message(tr::now);
|
||||
const auto media = parent()->media();
|
||||
return (media && media->ttlSeconds())
|
||||
? tr::lng_in_dlg_video_message_ttl(tr::now)
|
||||
: tr::lng_in_dlg_video_message(tr::now);
|
||||
}
|
||||
return u"GIF"_q;
|
||||
} else if (_document->isVideoFile()) {
|
||||
return tr::lng_in_dlg_video(tr::now);
|
||||
} else if (_document->isVoiceMessage()) {
|
||||
return tr::lng_in_dlg_audio(tr::now) + addName;
|
||||
const auto media = parent()->media();
|
||||
return ((media && media->ttlSeconds())
|
||||
? tr::lng_in_dlg_voice_message_ttl
|
||||
: tr::lng_in_dlg_audio)(tr::now) + addName;;
|
||||
} else if (_document->isSong()) {
|
||||
return tr::lng_in_dlg_audio_file(tr::now) + addName;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue