| 150 | } |
| 151 | |
| 152 | void 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 | |
| 173 | void Transcribes::load(not_null<HistoryItem*> item) { |
| 174 | if (!item->isHistoryEntry() || item->isLocal()) { |
nothing calls this directly
no test coverage detected