Add stories counter to hidden stories sources.

This commit is contained in:
John Preston 2023-07-05 13:12:38 +04:00
parent 57b7391f53
commit ee507722ba
2 changed files with 10 additions and 0 deletions

View File

@ -2410,6 +2410,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_contacts_by_online" = "Sorted by last seen time";
"lng_contacts_by_name" = "Sorted by name";
"lng_contacts_hidden_stories" = "Hidden Stories";
"lng_contacts_stories_status#one" = "{count} story";
"lng_contacts_stories_status#other" = "{count} stories";
"lng_contacts_stories_status_new#one" = "{count} new story";
"lng_contacts_stories_status_new#other" = "{count} new stories";
"lng_contact_not_joined" = "Unfortunately {name} has not joined Telegram yet, but you can send them an invitation.\n\nWe will notify you about any of your contacts who join Telegram.";
"lng_try_other_contact" = "Try someone else";
"lng_create_group_link" = "Link";

View File

@ -166,6 +166,12 @@ void StoriesRow::applySegments(const Dialogs::Stories::Element &element) {
_count = int(std::max(element.count, 1U));
_unreadCount = element.unreadCount;
refreshSegments();
setCustomStatus(_unreadCount
? tr::lng_contacts_stories_status_new(
tr::now,
lt_count,
_unreadCount)
: tr::lng_contacts_stories_status(tr::now, lt_count, _count));
}
void StoriesRow::updateGradient(QBrush unread) {