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

Fix reading of currently opened chat.

This commit is contained in:
John Preston
2020-02-19 19:35:26 +04:00
parent c04f3a7048
commit 5b7f7ed70e
8 changed files with 115 additions and 109 deletions

View File

@@ -44,6 +44,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_drafts.h"
#include "data/data_user.h"
#include "data/data_scheduled_messages.h"
#include "data/data_histories.h"
#include "dialogs/dialogs_key.h"
#include "boxes/peers/edit_peer_info_box.h"
#include "facades.h"
@@ -303,7 +304,7 @@ void Filler::addToggleUnreadMark() {
const auto markAsRead = isUnread(peer);
const auto handle = [&](not_null<History*> history) {
if (markAsRead) {
history->readInbox();
peer->session().data().histories().readInbox(history);
} else {
peer->session().api().changeDialogUnreadMark(
history,