mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Support custom icon for General topic.
This commit is contained in:
@@ -216,11 +216,17 @@ void TopicIconView::setupPlayer(not_null<Data::ForumTopic*> topic) {
|
||||
}
|
||||
|
||||
void TopicIconView::setupImage(not_null<Data::ForumTopic*> topic) {
|
||||
using namespace Data;
|
||||
if (topic->isGeneral()) {
|
||||
_image = ForumTopicGeneralIconFrame(
|
||||
st::infoForumTopicIcon.size,
|
||||
st::windowSubTextFg);
|
||||
return;
|
||||
}
|
||||
rpl::combine(
|
||||
TitleValue(topic),
|
||||
ColorIdValue(topic)
|
||||
) | rpl::map([=](const QString &title, int32 colorId) {
|
||||
using namespace Data;
|
||||
return ForumTopicIconFrame(colorId, title, st::infoForumTopicIcon);
|
||||
}) | rpl::start_with_next([=](QImage &&image) {
|
||||
_image = std::move(image);
|
||||
|
Reference in New Issue
Block a user