mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-12 10:10:00 +00:00
Added an icon for bots in the dialog list.
Fixes https://github.com/telegramdesktop/tdesktop/issues/1894 .
This commit is contained in:
parent
d1cc09f40e
commit
299aa69058
BIN
Telegram/Resources/icons/dialogs_bot.png
Normal file
BIN
Telegram/Resources/icons/dialogs_bot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 277 B |
BIN
Telegram/Resources/icons/dialogs_bot@2x.png
Normal file
BIN
Telegram/Resources/icons/dialogs_bot@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 482 B |
BIN
Telegram/Resources/icons/dialogs_bot@3x.png
Normal file
BIN
Telegram/Resources/icons/dialogs_bot@3x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 715 B |
@ -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) }};
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user