mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 07:37:11 +02:00
Fix crash in session destruction.
This commit is contained in:
parent
1705a1aa4a
commit
bc3719038f
1 changed files with 3 additions and 2 deletions
|
@ -253,6 +253,9 @@ Session::Session(not_null<Main::Session*> session)
|
|||
}
|
||||
|
||||
void Session::clear() {
|
||||
// Optimization: clear notifications before destroying items.
|
||||
Core::App().notifications().clearFromSession(_session);
|
||||
|
||||
_sendActions.clear();
|
||||
|
||||
_histories->unloadAll();
|
||||
|
@ -1120,8 +1123,6 @@ void Session::setupUserIsContactViewer() {
|
|||
}
|
||||
|
||||
Session::~Session() {
|
||||
// Optimization: clear notifications before destroying items.
|
||||
Core::App().notifications().clearFromSession(_session);
|
||||
clearLocalStorage();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue