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

Method toggle

Telegram/SourceFiles/api/api_transcribes.cpp:104–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104void Transcribes::toggle(not_null<HistoryItem*> item) {
105 const auto id = item->fullId();
106 auto i = _map.find(id);
107 if (i == _map.end()) {
108 load(item);
109 _session->data().requestItemResize(item);
110 } else if (!i->second.requestId) {
111 i->second.shown = !i->second.shown;
112 if (i->second.roundview) {
113 _session->data().requestItemViewRefresh(item);
114 }
115 _session->data().requestItemResize(item);
116 }
117}
118
119void Transcribes::toggleSummary(not_null<HistoryItem*> item) {
120 const auto id = item->fullId();

Callers

nothing calls this directly

Calls 6

requestItemResizeMethod · 0.80
fullIdMethod · 0.45
findMethod · 0.45
endMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected