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

Method toggleSummary

Telegram/SourceFiles/api/api_transcribes.cpp:119–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void Transcribes::toggleSummary(not_null<HistoryItem*> item) {
120 const auto id = item->fullId();
121 auto i = _summaries.find(id);
122 if (i == _summaries.end()) {
123 summarize(item);
124 } else if (!i->second.loading) {
125 auto &entry = i->second;
126 if (entry.result.empty()) {
127 summarize(item);
128 } else {
129 entry.shown = entry.premiumRequired ? false : !entry.shown;
130 _session->data().requestItemResize(item);
131 if (entry.shown) {
132 _session->data().requestItemShowHighlight(item);
133 }
134 }
135 }
136}
137
138const Transcribes::Entry &Transcribes::entry(
139 not_null<HistoryItem*> item) const {

Callers 2

updateMethod · 0.80
linkMethod · 0.80

Calls 7

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

Tested by

no test coverage detected