mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Use correct lang phrases for video messages.
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -555,6 +555,8 @@ protected:
|
||||
}
|
||||
|
||||
private:
|
||||
QString mediaTypeString() const;
|
||||
|
||||
gsl::not_null<DocumentData*> _data;
|
||||
int32 _thumbw = 1;
|
||||
int32 _thumbh = 1;
|
||||
|
||||
@@ -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<HistorySticker*>(media)->emoji();
|
||||
if (emoji.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user