mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 15:43:55 +02:00
Check for null manager type
This commit is contained in:
parent
9b70f24e91
commit
03e8d28456
1 changed files with 5 additions and 5 deletions
|
@ -722,14 +722,14 @@ void Create(Window::Notifications::System *system) {
|
||||||
using ManagerType = Window::Notifications::ManagerType;
|
using ManagerType = Window::Notifications::ManagerType;
|
||||||
if ((Core::App().settings().nativeNotifications() && Supported())
|
if ((Core::App().settings().nativeNotifications() && Supported())
|
||||||
|| Enforced()) {
|
|| Enforced()) {
|
||||||
if (*system->managerType() != ManagerType::Native) {
|
if (!system->managerType().has_value()
|
||||||
|
|| *system->managerType() != ManagerType::Native) {
|
||||||
system->setManager(std::make_unique<Manager>(system));
|
system->setManager(std::make_unique<Manager>(system));
|
||||||
}
|
}
|
||||||
} else {
|
} else if (!system->managerType().has_value()
|
||||||
if (*system->managerType() != ManagerType::Default) {
|
|| *system->managerType() != ManagerType::Default) {
|
||||||
system->setManager(nullptr);
|
system->setManager(nullptr);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!ServiceRegistered) {
|
if (!ServiceRegistered) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue