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

Method requestItemRepaint

Telegram/SourceFiles/data/data_session.cpp:2026–2059  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2024}
2025
2026void Session::requestItemRepaint(not_null<const HistoryItem*> item, QRect r) {
2027 _itemRepaintRequest.fire_copy(item);
2028 auto repaintGroupLeader = false;
2029 auto repaintView = [&](not_null<const ViewElement*> view) {
2030 if (view->isHiddenByGroup()) {
2031 repaintGroupLeader = true;
2032 } else {
2033 requestViewRepaint(view, r);
2034 }
2035 };
2036 enumerateItemViews(item, repaintView);
2037 if (repaintGroupLeader) {
2038 if (const auto group = groups().find(item)) {
2039 const auto leader = group->items.front();
2040 if (leader != item) {
2041 enumerateItemViews(leader, repaintView);
2042 }
2043 }
2044 }
2045 const auto history = item->history();
2046 if (history->lastItemDialogsView().dependsOn(item)) {
2047 history->updateChatListEntry();
2048 }
2049 if (const auto topic = item->topic()) {
2050 if (topic->lastItemDialogsView().dependsOn(item)) {
2051 topic->updateChatListEntry();
2052 }
2053 }
2054 if (const auto sublist = item->savedSublist()) {
2055 if (sublist->lastItemDialogsView().dependsOn(item)) {
2056 sublist->updateChatListEntry();
2057 }
2058 }
2059}
2060
2061rpl::producer<not_null<const HistoryItem*>> Session::itemRepaintRequest() const {
2062 return _itemRepaintRequest.events();

Callers 15

handleAudioUpdateMethod · 0.80
finishFilesDeleteMethod · 0.80
repaintCollectedMethod · 0.80
sendProgressUpdateMethod · 0.80
applyUpdateNoPtsCheckMethod · 0.80
feedUpdateMethod · 0.80
sendPollRequestsMethod · 0.80
SendBotCallbackDataFunction · 0.80
sendVotesMethod · 0.80
botCallbackSentMethod · 0.80

Calls 8

isHiddenByGroupMethod · 0.80
frontMethod · 0.80
dependsOnMethod · 0.80
updateChatListEntryMethod · 0.80
savedSublistMethod · 0.80
findMethod · 0.45
historyMethod · 0.45
topicMethod · 0.45

Tested by

no test coverage detected