2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Handle errors in getMessages().

This commit is contained in:
John Preston
2017-11-23 19:41:13 +04:00
parent 39428841e4
commit efdba3a482
6 changed files with 57 additions and 11 deletions

View File

@@ -1613,7 +1613,10 @@ void HistoryWidget::applyDraft(bool parseLinks, Ui::FlatTextarea::UndoHistoryAct
if (_editMsgId || _replyToId) {
updateReplyEditTexts();
if (!_replyEditMsg) {
Auth().api().requestMessageData(_peer->asChannel(), _editMsgId ? _editMsgId : _replyToId, replyEditMessageDataCallback());
Auth().api().requestMessageData(
_peer->asChannel(),
_editMsgId ? _editMsgId : _replyToId,
replyEditMessageDataCallback());
}
}
}
@@ -5306,7 +5309,10 @@ bool HistoryWidget::pinnedMsgVisibilityUpdated() {
updatePinnedBar();
}
if (!_pinnedBar->msg) {
Auth().api().requestMessageData(_peer->asChannel(), _pinnedBar->msgId, replyEditMessageDataCallback());
Auth().api().requestMessageData(
_peer->asChannel(),
_pinnedBar->msgId,
replyEditMessageDataCallback());
}
} else if (_pinnedBar) {
destroyPinnedBar();