2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Support default forum topic icons.

This commit is contained in:
John Preston
2022-10-21 21:13:13 +04:00
parent 5314833c82
commit 0cba9e4a22
13 changed files with 187 additions and 18 deletions

View File

@@ -21,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "info/profile/info_profile_badge.h"
#include "info/profile/info_profile_emoji_status_panel.h"
#include "info/info_controller.h"
#include "boxes/peers/edit_forum_topic_box.h"
#include "history/view/media/history_view_sticker_player.h"
#include "lang/lang_keys.h"
#include "ui/widgets/labels.h"
@@ -283,8 +284,16 @@ Cover::Cover(
_peer,
_userpic->takeResultImage());
}, _userpic->lifetime());
} else if (topic->canEdit()) {
_iconView->setClickedCallback([=] {
_controller->show(Box(
EditForumTopicBox,
_controller,
topic->history(),
topic->rootId()));
});
} else {
// #TODO forum icon change on click if possible
_iconView->setAttribute(Qt::WA_TransparentForMouseEvents);
}
}