From 876cdcf26a3a8b9364d22dccd89fcc259d19e45d Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 9 Jan 2023 09:56:36 +0400 Subject: [PATCH] Show "Photo set by you" in profile photos list. --- Telegram/Resources/langs/lang.strings | 1 + .../SourceFiles/media/view/media_view_overlay_widget.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index efb3b7334d..5776e1373c 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -2499,6 +2499,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_mediaview_channel_photo" = "Channel Photo"; "lng_mediaview_profile_photo" = "Profile Photo"; "lng_mediaview_profile_public_photo" = "Public Photo"; +"lng_mediaview_profile_photo_by_you" = "Photo set by you"; "lng_mediaview_file_n_of_amount" = "{file} {n} of {amount}"; "lng_mediaview_n_of_amount" = "Photo {n} of {amount}"; "lng_mediaview_doc_image" = "File"; diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp index 7896df46d1..7d0348f65a 100644 --- a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp +++ b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp @@ -4950,6 +4950,11 @@ void OverlayWidget::updateHeader() { && (index == count - 1) && SyncUserFallbackPhotoViewer(_user)) { _headerText = tr::lng_mediaview_profile_public_photo(tr::now); + } else if (_user + && _user->hasPersonalPhoto() + && _photo + && (_photo->id == _user->userpicPhotoId())) { + _headerText = tr::lng_mediaview_profile_photo_by_you(tr::now); } else { _headerText = tr::lng_mediaview_n_of_amount( tr::now,