mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 15:47:11 +02:00
Fix crash in notifications clearing.
This commit is contained in:
parent
d529c60081
commit
41f2cc6d81
3 changed files with 7 additions and 5 deletions
|
@ -153,6 +153,7 @@ Application::~Application() {
|
|||
|
||||
_window = nullptr;
|
||||
_mediaView = nullptr;
|
||||
_notifications->clearAllFast();
|
||||
_domain->finish();
|
||||
|
||||
Local::finish();
|
||||
|
|
|
@ -331,6 +331,11 @@ private:
|
|||
base::Timer _clearEmojiImageLoaderTimer;
|
||||
const std::unique_ptr<Media::Audio::Instance> _audio;
|
||||
mutable std::unique_ptr<MTP::Config> _fallbackProductionConfig;
|
||||
|
||||
// Notifications should be destroyed before _audio, after _domain.
|
||||
// Mutable because is created in run() after OpenSSL is inited.
|
||||
std::unique_ptr<Window::Notifications::System> _notifications;
|
||||
|
||||
const std::unique_ptr<Main::Domain> _domain;
|
||||
const std::unique_ptr<Export::Manager> _exportManager;
|
||||
const std::unique_ptr<Calls::Instance> _calls;
|
||||
|
@ -347,10 +352,6 @@ private:
|
|||
Media::Player::FloatDelegate *_defaultFloatPlayerDelegate = nullptr;
|
||||
Media::Player::FloatDelegate *_replacementFloatPlayerDelegate = nullptr;
|
||||
|
||||
// Notifications should be destroyed before _audio.
|
||||
// Mutable because is created in run() after OpenSSL is inited.
|
||||
std::unique_ptr<Window::Notifications::System> _notifications;
|
||||
|
||||
const QImage _logo;
|
||||
const QImage _logoNoMargin;
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ void Manager::showNextFromQueue() {
|
|||
return;
|
||||
}
|
||||
int count = Core::App().settings().notificationsCount();
|
||||
for_const (auto ¬ification, _notifications) {
|
||||
for (const auto ¬ification : _notifications) {
|
||||
if (notification->isUnlinked()) continue;
|
||||
--count;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue