mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Clear locations data on logout. Fixes a crash.
Also clear user notification center delegate on macOS.
This commit is contained in:
parent
d6f4886c5b
commit
1ec9137fd7
2 changed files with 5 additions and 1 deletions
|
@ -1255,7 +1255,6 @@ namespace App {
|
||||||
|
|
||||||
void historyClearMsgs() {
|
void historyClearMsgs() {
|
||||||
::dependentItems.clear();
|
::dependentItems.clear();
|
||||||
|
|
||||||
const auto oldData = base::take(msgsData);
|
const auto oldData = base::take(msgsData);
|
||||||
const auto oldChannelData = base::take(channelMsgsData);
|
const auto oldChannelData = base::take(channelMsgsData);
|
||||||
for (const auto item : oldData) {
|
for (const auto item : oldData) {
|
||||||
|
@ -1266,6 +1265,9 @@ namespace App {
|
||||||
delete item;
|
delete item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (const auto data : base::take(::locationsData)) {
|
||||||
|
delete data;
|
||||||
|
}
|
||||||
|
|
||||||
clearMousedItems();
|
clearMousedItems();
|
||||||
}
|
}
|
||||||
|
|
|
@ -317,6 +317,8 @@ Manager::Private::~Private() {
|
||||||
putClearTask(ClearFinish());
|
putClearTask(ClearFinish());
|
||||||
_clearingThread.join();
|
_clearingThread.join();
|
||||||
}
|
}
|
||||||
|
NSUserNotificationCenter *center = [NSUserNotificationCenter defaultUserNotificationCenter];
|
||||||
|
[center setDelegate:nil];
|
||||||
[_delegate release];
|
[_delegate release];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue