diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index f64cea20d..9a83e53e5 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -657,6 +657,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org "lng_action_pinned_media_video" = "a video"; "lng_action_pinned_media_audio" = "an audio file"; "lng_action_pinned_media_voice" = "a voice message"; +"lng_action_pinned_media_video_message" = "a video message"; "lng_action_pinned_media_file" = "a file"; "lng_action_pinned_media_gif" = "a GIF animation"; "lng_action_pinned_media_contact" = "a contact information"; @@ -810,6 +811,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org "lng_in_dlg_audio_file" = "Audio file"; "lng_in_dlg_contact" = "Contact"; "lng_in_dlg_audio" = "Voice message"; +"lng_in_dlg_video_message" = "Video message"; "lng_in_dlg_file" = "File"; "lng_in_dlg_sticker" = "Sticker"; "lng_in_dlg_sticker_emoji" = "{emoji} Sticker"; diff --git a/Telegram/SourceFiles/history/history_media_types.cpp b/Telegram/SourceFiles/history/history_media_types.cpp index d957d7572..a20e57b71 100644 --- a/Telegram/SourceFiles/history/history_media_types.cpp +++ b/Telegram/SourceFiles/history/history_media_types.cpp @@ -2020,15 +2020,19 @@ HistoryTextState HistoryGif::getState(int x, int y, HistoryStateRequest request) } QString HistoryGif::notificationText() const { - return captionedNotificationText(qsl("GIF"), _caption); + return captionedNotificationText(mediaTypeString(), _caption); } QString HistoryGif::inDialogsText() const { - return captionedInDialogsText(qsl("GIF"), _caption); + return captionedInDialogsText(mediaTypeString(), _caption); } TextWithEntities HistoryGif::selectedText(TextSelection selection) const { - return captionedSelectedText(qsl("GIF"), _caption, selection); + return captionedSelectedText(mediaTypeString(), _caption, selection); +} + +QString HistoryGif::mediaTypeString() const { + return _data->isRoundVideo() ? lang(lng_in_dlg_video_message) : qsl("GIF"); } void HistoryGif::setStatusSize(int32 newSize) const { diff --git a/Telegram/SourceFiles/history/history_media_types.h b/Telegram/SourceFiles/history/history_media_types.h index d680201f6..be1f97dbf 100644 --- a/Telegram/SourceFiles/history/history_media_types.h +++ b/Telegram/SourceFiles/history/history_media_types.h @@ -555,6 +555,8 @@ protected: } private: + QString mediaTypeString() const; + gsl::not_null _data; int32 _thumbw = 1; int32 _thumbh = 1; diff --git a/Telegram/SourceFiles/history/history_message.cpp b/Telegram/SourceFiles/history/history_message.cpp index e2d44b218..1da442d93 100644 --- a/Telegram/SourceFiles/history/history_message.cpp +++ b/Telegram/SourceFiles/history/history_message.cpp @@ -2115,7 +2115,14 @@ HistoryService::PreparedText HistoryService::preparePinnedText() { case MediaTypeVideo: return lang(lng_action_pinned_media_video); case MediaTypeContact: return lang(lng_action_pinned_media_contact); case MediaTypeFile: return lang(lng_action_pinned_media_file); - case MediaTypeGif: return lang(lng_action_pinned_media_gif); + case MediaTypeGif: { + if (auto document = media->getDocument()) { + if (document->isRoundVideo()) { + return lang(lng_action_pinned_media_video_message); + } + } + return lang(lng_action_pinned_media_gif); + } break; case MediaTypeSticker: { auto emoji = static_cast(media)->emoji(); if (emoji.isEmpty()) {