mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-06 17:45:11 +00:00
Update SNI state even if tray is deactivated
This commit is contained in:
@@ -568,6 +568,13 @@ void MainWindow::handleSNIOwnerChanged(
|
||||
const QString &service,
|
||||
const QString &oldOwner,
|
||||
const QString &newOwner) {
|
||||
SNIAvailable = !newOwner.isEmpty();
|
||||
|
||||
const auto trayAvailable = SNIAvailable
|
||||
|| QSystemTrayIcon::isSystemTrayAvailable();
|
||||
|
||||
Platform::SetTrayIconSupported(trayAvailable);
|
||||
|
||||
if (Global::WorkMode().value() == dbiwmWindowOnly) {
|
||||
return;
|
||||
}
|
||||
@@ -586,13 +593,6 @@ void MainWindow::handleSNIOwnerChanged(
|
||||
}
|
||||
trayIcon = nullptr;
|
||||
|
||||
SNIAvailable = !newOwner.isEmpty();
|
||||
|
||||
const auto trayAvailable = SNIAvailable
|
||||
|| QSystemTrayIcon::isSystemTrayAvailable();
|
||||
|
||||
Platform::SetTrayIconSupported(trayAvailable);
|
||||
|
||||
if (trayAvailable) {
|
||||
psSetupTrayIcon();
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user