2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 06:55:58 +00:00

Animated show and hide of the new history-to-down button.

Fixed render in outbox read event handler for channels / supergroups.
This commit is contained in:
John Preston
2016-06-09 22:28:58 +03:00
parent 3bb53b6ed1
commit 6da62f902b
5 changed files with 101 additions and 29 deletions

View File

@@ -4178,17 +4178,11 @@ void MainWidget::feedUpdate(const MTPUpdate &update) {
}
// update before applying skipped
PeerId id = peerFromMTP(d.vpeer);
App::feedOutboxRead(id, d.vmax_id.v);
if (_history->peer() && _history->peer()->id == id) {
auto peerId = peerFromMTP(d.vpeer);
App::feedOutboxRead(peerId, d.vmax_id.v);
if (_history->peer() && _history->peer()->id == peerId) {
_history->update();
}
if (History *h = App::historyLoaded(id)) {
if (h->lastMsg && h->lastMsg->out() && h->lastMsg->id <= d.vmax_id.v) {
dlgUpdated(h, h->lastMsg->id);
}
h->updateChatListEntry();
}
ptsApplySkippedUpdates();
} break;
@@ -4538,8 +4532,11 @@ void MainWidget::feedUpdate(const MTPUpdate &update) {
case mtpc_updateReadChannelOutbox: {
auto &d(update.c_updateReadChannelOutbox());
auto channel = App::channelLoaded(d.vchannel_id.v);
App::feedOutboxRead(peerFromChannel(d.vchannel_id.v), d.vmax_id.v);
auto peerId = peerFromChannel(d.vchannel_id.v);
App::feedOutboxRead(peerId, d.vmax_id.v);
if (_history->peer() && _history->peer()->id == peerId) {
_history->update();
}
} break;
case mtpc_updateDeleteChannelMessages: {