Fix crash in mark folder as read.

This commit is contained in:
John Preston 2020-09-25 20:22:43 +03:00
parent aecdc01e41
commit 8f4fdb6d0d
1 changed files with 3 additions and 1 deletions

View File

@ -85,11 +85,13 @@ void MarkAsReadHistory(not_null<History*> history) {
}
void MarkAsReadChatList(not_null<Dialogs::MainList*> list) {
auto mark = std::vector<not_null<History*>>();
for (const auto &row : list->indexed()->all()) {
if (const auto history = row->history()) {
MarkAsReadHistory(history);
mark.push_back(history);
}
}
ranges::for_each(mark, MarkAsReadHistory);
}
class Filler {