Improve monoforum top bar status.

This commit is contained in:
John Preston 2025-05-29 17:21:04 +04:00
parent 90b2c077a6
commit c3860cfe72
3 changed files with 5 additions and 2 deletions

View file

@ -164,6 +164,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_chat_status_members_online" = "{members_count}, {online_count}";
"lng_chat_status_subscribers#one" = "{count} subscriber";
"lng_chat_status_subscribers#other" = "{count} subscribers";
"lng_chat_status_direct" = "Direct messages";
"lng_channel_status" = "channel";
"lng_group_status" = "group";

View file

@ -872,8 +872,8 @@ historyGiftToChannel: IconButton(defaultIconButton) {
ripple: universalRippleAnimation;
}
historyDirectMessage: IconButton(historyGiftToChannel) {
icon: icon{{ "menu/chat_bubble", windowActiveTextFg }};
iconOver: icon{{ "menu/chat_bubble", windowActiveTextFg }};
icon: icon{{ "menu/chat_discuss", windowActiveTextFg }};
iconOver: icon{{ "menu/chat_discuss", windowActiveTextFg }};
}
historyUnblock: FlatButton(historyComposeButton) {
color: attentionButtonFg;

View file

@ -1696,6 +1696,8 @@ void TopBarWidget::updateOnlineDisplay() {
const auto chats = monoforum->chatsList();
const auto count = chats->fullSize().current();
text = tr::lng_filters_chats_count(tr::now, lt_count, count);
} else if (peer->isMonoforum()) {
text = tr::lng_chat_status_direct(tr::now);
} else if (const auto channel = peer->asChannel()) {
if (channel->isMegagroup()
&& channel->canViewMembers()