mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 07:05:13 +00:00
Improve collapsed rows in small chats list.
This commit is contained in:
@@ -657,17 +657,28 @@ void InnerWidget::paintCollapsedRow(
|
||||
Painter &p,
|
||||
not_null<const CollapsedRow*> row,
|
||||
bool selected) const {
|
||||
const auto smallWidth = st::dialogsPadding.x()
|
||||
+ st::dialogsPhotoSize
|
||||
+ st::dialogsPhotoPadding;
|
||||
const auto narrow = (width() <= smallWidth);
|
||||
const auto text = row->folder
|
||||
? row->folder->chatListName()
|
||||
: (_mode == Dialogs::Mode::Important)
|
||||
? lang(lng_dialogs_show_all_chats)
|
||||
: lang(lng_dialogs_hide_muted_chats);
|
||||
? (narrow ? "Show" : lang(lng_dialogs_show_all_chats))
|
||||
: (narrow ? "Hide" : lang(lng_dialogs_hide_muted_chats));
|
||||
const auto unread = row->folder
|
||||
? row->folder->chatListUnreadCount()
|
||||
: (_mode == Dialogs::Mode::Important)
|
||||
? session().data().unreadOnlyMutedBadge()
|
||||
: 0;
|
||||
Layout::PaintCollapsedRow(p, row->row, text, unread, width(), selected);
|
||||
Layout::PaintCollapsedRow(
|
||||
p,
|
||||
row->row,
|
||||
row->folder,
|
||||
text,
|
||||
unread,
|
||||
width(),
|
||||
selected);
|
||||
}
|
||||
|
||||
bool InnerWidget::isSearchResultActive(
|
||||
|
Reference in New Issue
Block a user