Added an icon for bots in the dialog list.

Fixes https://github.com/telegramdesktop/tdesktop/issues/1894 .
This commit is contained in:
23rd 2019-01-23 19:15:21 +03:00 committed by John Preston
parent d1cc09f40e
commit 299aa69058
5 changed files with 11 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 B

View File

@ -148,6 +148,9 @@ dialogsChatIconActive: icon {{ "dialogs_chat", dialogsChatIconFgActive, point(1p
dialogsChannelIcon: icon {{ "dialogs_channel", dialogsChatIconFg, point(3px, 4px) }};
dialogsChannelIconOver: icon {{ "dialogs_channel", dialogsChatIconFgOver, point(3px, 4px) }};
dialogsChannelIconActive: icon {{ "dialogs_channel", dialogsChatIconFgActive, point(3px, 4px) }};
dialogsBotIcon: icon {{ "dialogs_bot", dialogsChatIconFg, point(1px, 4px) }};
dialogsBotIconOver: icon {{ "dialogs_bot", dialogsChatIconFgOver, point(1px, 4px) }};
dialogsBotIconActive: icon {{ "dialogs_bot", dialogsChatIconFgActive, point(1px, 4px) }};
dialogsFeedIcon: icon {{ "dialogs_feed", dialogsChatIconFg, point(4px, 4px) }};
dialogsFeedIconOver: icon {{ "dialogs_feed", dialogsChatIconFgOver, point(4px, 4px) }};
dialogsFeedIconActive: icon {{ "dialogs_feed", dialogsChatIconFgActive, point(4px, 4px) }};

View File

@ -433,6 +433,14 @@ const style::icon *ChatTypeIcon(
: (selected
? st::dialogsChannelIconOver
: st::dialogsChannelIcon));
} else if (const auto user = peer->asUser()) {
if (user->isBot()) {
return &(active
? st::dialogsBotIconActive
: (selected
? st::dialogsBotIconOver
: st::dialogsBotIcon));
}
}
return nullptr;
}