mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Show "My Notes", "Author Hidden" in title.
This commit is contained in:
parent
fbd6b5b640
commit
175914f02b
1 changed files with 14 additions and 1 deletions
|
@ -75,6 +75,19 @@ inline bool HasGroupCallMenu(const not_null<PeerData*> &peer) {
|
||||||
|| (peer->isChat() && peer->asChat()->amCreator()));
|
|| (peer->isChat() && peer->asChat()->amCreator()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString TopBarNameText(
|
||||||
|
not_null<PeerData*> peer,
|
||||||
|
Dialogs::EntryState::Section section) {
|
||||||
|
if (section == Dialogs::EntryState::Section::SavedSublist) {
|
||||||
|
if (peer->isSelf()) {
|
||||||
|
return tr::lng_my_notes(tr::now);
|
||||||
|
} else if (peer->isSavedHiddenAuthor()) {
|
||||||
|
return tr::lng_hidden_author_messages(tr::now);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return peer->topBarNameText();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
struct TopBarWidget::EmojiInteractionSeenAnimation {
|
struct TopBarWidget::EmojiInteractionSeenAnimation {
|
||||||
|
@ -554,7 +567,7 @@ void TopBarWidget::paintTopBar(Painter &p) {
|
||||||
_titleNameVersion = namePeer->nameVersion();
|
_titleNameVersion = namePeer->nameVersion();
|
||||||
_title.setText(
|
_title.setText(
|
||||||
st::msgNameStyle,
|
st::msgNameStyle,
|
||||||
namePeer->topBarNameText(),
|
TopBarNameText(namePeer, _activeChat.section),
|
||||||
Ui::NameTextOptions());
|
Ui::NameTextOptions());
|
||||||
}
|
}
|
||||||
const auto badgeWidth = _titleBadge.drawGetWidth(
|
const auto badgeWidth = _titleBadge.drawGetWidth(
|
||||||
|
|
Loading…
Add table
Reference in a new issue