Skip to content

Commit b4f7c0f

Browse files
arelove23rd
andauthored
Fix personal photo hint shown when setting group/channel photo (#30470)
* Fix personal photo hint shown when setting group/channel photo Closes #30467 * Added bot exclusion to personal photo hint visibility check. --------- Co-authored-by: 23rd <23rd@vivaldi.net>
1 parent ba4715a commit b4f7c0f

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

Telegram/SourceFiles/info/profile/info_profile_top_bar.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,13 +1136,17 @@ void TopBar::setupUserpicButton(
11361136
: _peer->name();
11371137
const auto phrase = (type == ChosenType::Suggest)
11381138
? &tr::lng_profile_suggest_sure
1139-
: &tr::lng_profile_set_personal_sure;
1139+
: (user && !user->isSelf() && !_peer->isBot())
1140+
? &tr::lng_profile_set_personal_sure
1141+
: nullptr;
11401142
return Editor::EditorData{
1141-
.about = (*phrase)(
1142-
tr::now,
1143-
lt_user,
1144-
tr::bold(name),
1145-
tr::marked),
1143+
.about = (phrase
1144+
? (*phrase)(
1145+
tr::now,
1146+
lt_user,
1147+
tr::bold(name),
1148+
tr::marked)
1149+
: TextWithEntities()),
11461150
.confirm = ((type == ChosenType::Suggest)
11471151
? tr::lng_profile_suggest_button(tr::now)
11481152
: tr::lng_profile_set_photo_button(tr::now)),

0 commit comments

Comments
 (0)