mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Fix crash clearing chats list before histories.
This commit is contained in:
@@ -205,6 +205,7 @@ void IndexedList::remove(Key key, Row *replacedBy) {
|
||||
}
|
||||
|
||||
void IndexedList::clear() {
|
||||
_list.clear();
|
||||
_index.clear();
|
||||
}
|
||||
|
||||
|
@@ -23,6 +23,10 @@ public:
|
||||
List &operator=(List &&other) = default;
|
||||
~List() = default;
|
||||
|
||||
void clear() {
|
||||
_rows.clear();
|
||||
_rowByKey.clear();
|
||||
}
|
||||
[[nodiscard]] int size() const {
|
||||
return _rows.size();
|
||||
}
|
||||
|
@@ -81,6 +81,7 @@ void MainList::clear() {
|
||||
recomputeFullListSize();
|
||||
});
|
||||
const auto notifier = unreadStateChangeNotifier(true);
|
||||
_pinned.clear();
|
||||
_all.clear();
|
||||
_unreadState = UnreadState();
|
||||
_cloudUnreadState = UnreadState();
|
||||
|
Reference in New Issue
Block a user