diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index ffb355b6c..92c2b8997 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -1406,6 +1406,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_stickers_return" = "Undo"; "lng_stickers_count#one" = "{count} sticker"; "lng_stickers_count#other" = "{count} stickers"; +"lng_masks_count#one" = "{count} mask"; +"lng_masks_count#other" = "{count} masks"; "lng_stickers_attached_sets" = "Sets of attached stickers"; "lng_stickers_group_set" = "Group sticker set"; "lng_stickers_remove_group_set" = "Remove group sticker set?"; diff --git a/Telegram/SourceFiles/boxes/stickers_box.cpp b/Telegram/SourceFiles/boxes/stickers_box.cpp index dd70870c2..48446cd38 100644 --- a/Telegram/SourceFiles/boxes/stickers_box.cpp +++ b/Telegram/SourceFiles/boxes/stickers_box.cpp @@ -152,6 +152,7 @@ private: ~Row(); bool isRecentSet() const; + bool isMasksSet() const; const not_null set; DocumentData *sticker = nullptr; @@ -997,6 +998,10 @@ bool StickersBox::Inner::Row::isRecentSet() const { || (set->id == Data::Stickers::CloudRecentAttachedSetId); } +bool StickersBox::Inner::Row::isMasksSet() const { + return (set->flags & MTPDstickerSet::Flag::f_masks); +} + StickersBox::Inner::Inner( QWidget *parent, not_null controller, @@ -1247,7 +1252,11 @@ void StickersBox::Inner::paintRow(Painter &p, not_null row, int index) { } } - auto statusText = (row->count > 0) ? tr::lng_stickers_count(tr::now, lt_count, row->count) : tr::lng_contacts_loading(tr::now); + const auto statusText = (row->count == 0) + ? tr::lng_contacts_loading(tr::now) + : row->isMasksSet() + ? tr::lng_masks_count(tr::now, lt_count, row->count) + : tr::lng_stickers_count(tr::now, lt_count, row->count); p.setFont(st::contactsStatusFont); p.setPen(st::contactsStatusFg);