MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / applyIconId

Method applyIconId

Telegram/SourceFiles/data/data_forum_topic.cpp:803–822  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

801}
802
803void ForumTopic::applyIconId(DocumentId iconId) {
804 if (_iconId == iconId) {
805 return;
806 }
807 _iconId = iconId;
808 invalidateTitleWithIcon();
809 _icon = iconId
810 ? MakeWrappedEmoji<Ui::Text::LimitedLoopsEmoji>(
811 owner().customEmojiManager().create(
812 _iconId,
813 [=] { updateChatListEntry(); },
814 Data::CustomEmojiManager::SizeTag::Normal),
815 kUserpicLoopsCount)
816 : nullptr;
817 if (iconId) {
818 _defaultIcon = QImage();
819 }
820 updateChatListEntry();
821 session().changes().topicUpdated(this, UpdateFlag::IconId);
822}
823
824void ForumTopic::invalidateTitleWithIcon() {
825 ++_titleVersion;

Callers 3

EditForumTopicBoxFunction · 0.80
applyTopicAddedMethod · 0.80
applyServiceChangesMethod · 0.80

Calls 4

topicUpdatedMethod · 0.80
QImageClass · 0.50
createMethod · 0.45
changesMethod · 0.45

Tested by

no test coverage detected