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

Method apply

Telegram/SourceFiles/api/api_transcribes.cpp:152–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152void Transcribes::apply(const MTPDupdateTranscribedAudio &update) {
153 const auto id = update.vtranscription_id().v;
154 const auto i = _ids.find(id);
155 if (i == _ids.end()) {
156 return;
157 }
158 const auto j = _map.find(i->second);
159 if (j == _map.end()) {
160 return;
161 }
162 const auto text = qs(update.vtext());
163 j->second.result = text;
164 j->second.pending = update.is_pending();
165 if (const auto item = _session->data().message(i->second)) {
166 if (j->second.roundview) {
167 _session->data().requestItemViewRefresh(item);
168 }
169 _session->data().requestItemResize(item);
170 }
171}
172
173void Transcribes::load(not_null<HistoryItem*> item) {
174 if (!item->isHistoryEntry() || item->isLocal()) {

Callers

nothing calls this directly

Calls 7

qsFunction · 0.85
requestItemResizeMethod · 0.80
findMethod · 0.45
endMethod · 0.45
messageMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected