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

Apply webpage media from sent message via bot.

This commit is contained in:
John Preston
2018-02-24 02:46:35 +03:00
parent 00aa6d5ac3
commit a285dca39e
5 changed files with 19 additions and 5 deletions

View File

@@ -2235,7 +2235,9 @@ void HistoryWidget::destroyUnreadBar() {
if (_migrated) _migrated->destroyUnreadBar();
}
void HistoryWidget::newUnreadMsg(History *history, HistoryItem *item) {
void HistoryWidget::newUnreadMsg(
not_null<History*> history,
not_null<HistoryItem*> item) {
if (_history == history) {
// If we get here in non-resized state we can't rely on results of
// doWeReadServerHistory() and mark chat as read.
@@ -2256,7 +2258,11 @@ void HistoryWidget::newUnreadMsg(History *history, HistoryItem *item) {
}
}
Auth().notifications().schedule(history, item);
history->changeUnreadCount(1);
if (history->unreadCountKnown()) {
history->changeUnreadCount(1);
} else {
Auth().api().requestDialogEntry(history);
}
}
void HistoryWidget::historyToDown(History *history) {