mirror of
https://github.com/Qz3rK/tdesktop.git
synced 2026-07-03 14:15:08 +02:00
Fix possible crash in application shutdown.
This commit is contained in:
@@ -246,6 +246,11 @@ not_null<Dialogs::MainList*> ChatFilters::chatsList(FilterId filterId) {
|
||||
return pointer.get();
|
||||
}
|
||||
|
||||
void ChatFilters::clear() {
|
||||
_chatsLists.clear();
|
||||
_list.clear();
|
||||
}
|
||||
|
||||
void ChatFilters::setPreloaded(const QVector<MTPDialogFilter> &result) {
|
||||
_loadRequestId = -1;
|
||||
received(result);
|
||||
|
||||
@@ -113,6 +113,7 @@ public:
|
||||
void refreshHistory(not_null<History*> history);
|
||||
|
||||
[[nodiscard]] not_null<Dialogs::MainList*> chatsList(FilterId filterId);
|
||||
void clear();
|
||||
|
||||
const ChatFilter &applyUpdatedPinned(
|
||||
FilterId id,
|
||||
|
||||
@@ -388,6 +388,7 @@ void Session::clear() {
|
||||
for (const auto &[id, folder] : _folders) {
|
||||
folder->clearChatsList();
|
||||
}
|
||||
_chatsFilters->clear();
|
||||
_histories->clearAll();
|
||||
_webpages.clear();
|
||||
_locations.clear();
|
||||
|
||||
Reference in New Issue
Block a user