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

Use folder_id / still_unread_count from updates.

This commit is contained in:
John Preston
2019-04-23 13:40:14 +04:00
parent 01d5589594
commit 2d1dcb36cb
17 changed files with 343 additions and 224 deletions

View File

@@ -230,21 +230,6 @@ namespace App {
return feedMsgs(msgs.v, type);
}
void feedInboxRead(const PeerId &peer, MsgId upTo) {
if (const auto history = Auth().data().historyLoaded(peer)) {
history->inboxRead(upTo);
}
}
void feedOutboxRead(const PeerId &peer, MsgId upTo, TimeId when) {
if (auto history = Auth().data().historyLoaded(peer)) {
history->outboxRead(upTo);
if (const auto user = history->peer->asUser()) {
user->madeAction(when);
}
}
}
inline MsgsData *fetchMsgsData(ChannelId channelId, bool insert = true) {
if (channelId == NoChannel) return &msgsData;
ChannelMsgsData::iterator i = channelMsgsData.find(channelId);