mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix possible crash in application shutdown.
This commit is contained in:
parent
e4834f583f
commit
bcb07110e0
3 changed files with 7 additions and 0 deletions
|
@ -246,6 +246,11 @@ not_null<Dialogs::MainList*> ChatFilters::chatsList(FilterId filterId) {
|
||||||
return pointer.get();
|
return pointer.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ChatFilters::clear() {
|
||||||
|
_chatsLists.clear();
|
||||||
|
_list.clear();
|
||||||
|
}
|
||||||
|
|
||||||
void ChatFilters::setPreloaded(const QVector<MTPDialogFilter> &result) {
|
void ChatFilters::setPreloaded(const QVector<MTPDialogFilter> &result) {
|
||||||
_loadRequestId = -1;
|
_loadRequestId = -1;
|
||||||
received(result);
|
received(result);
|
||||||
|
|
|
@ -113,6 +113,7 @@ public:
|
||||||
void refreshHistory(not_null<History*> history);
|
void refreshHistory(not_null<History*> history);
|
||||||
|
|
||||||
[[nodiscard]] not_null<Dialogs::MainList*> chatsList(FilterId filterId);
|
[[nodiscard]] not_null<Dialogs::MainList*> chatsList(FilterId filterId);
|
||||||
|
void clear();
|
||||||
|
|
||||||
const ChatFilter &applyUpdatedPinned(
|
const ChatFilter &applyUpdatedPinned(
|
||||||
FilterId id,
|
FilterId id,
|
||||||
|
|
|
@ -388,6 +388,7 @@ void Session::clear() {
|
||||||
for (const auto &[id, folder] : _folders) {
|
for (const auto &[id, folder] : _folders) {
|
||||||
folder->clearChatsList();
|
folder->clearChatsList();
|
||||||
}
|
}
|
||||||
|
_chatsFilters->clear();
|
||||||
_histories->clearAll();
|
_histories->clearAll();
|
||||||
_webpages.clear();
|
_webpages.clear();
|
||||||
_locations.clear();
|
_locations.clear();
|
||||||
|
|
Loading…
Add table
Reference in a new issue