2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-04 16:45:12 +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

@@ -1203,18 +1203,21 @@ namespace {
}
void feedInboxRead(const PeerId &peer, MsgId upTo) {
History *h = App::historyLoaded(peer);
if (h) {
h->inboxRead(upTo);
if (auto history = App::historyLoaded(peer)) {
history->inboxRead(upTo);
}
}
void feedOutboxRead(const PeerId &peer, MsgId upTo) {
History *h = App::historyLoaded(peer);
if (h) {
h->outboxRead(upTo);
if (h->peer->isUser()) {
h->peer->asUser()->madeAction();
if (auto history = App::historyLoaded(peer)) {
history->outboxRead(upTo);
if (history->lastMsg && history->lastMsg->out() && history->lastMsg->id <= upTo) {
if (App::main()) App::main()->dlgUpdated(history, history->lastMsg->id);
}
history->updateChatListEntry();
if (history->peer->isUser()) {
history->peer->asUser()->madeAction();
}
}
}