mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Don't remove SNI object when SNI is lost
This commit is contained in:
parent
e71b7dd384
commit
a1a7399023
1 changed files with 1 additions and 7 deletions
|
@ -451,7 +451,7 @@ void MainWindow::initHook() {
|
||||||
|
|
||||||
bool MainWindow::hasTrayIcon() const {
|
bool MainWindow::hasTrayIcon() const {
|
||||||
#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION
|
#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION
|
||||||
return trayIcon || _sniTrayIcon;
|
return trayIcon || (SNIAvailable && _sniTrayIcon);
|
||||||
#else
|
#else
|
||||||
return trayIcon;
|
return trayIcon;
|
||||||
#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION
|
#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION
|
||||||
|
@ -545,12 +545,6 @@ void MainWindow::onSNIOwnerChanged(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_sniTrayIcon) {
|
|
||||||
_sniTrayIcon->setContextMenu(0);
|
|
||||||
_sniTrayIcon->deleteLater();
|
|
||||||
}
|
|
||||||
_sniTrayIcon = nullptr;
|
|
||||||
|
|
||||||
if (trayIcon) {
|
if (trayIcon) {
|
||||||
trayIcon->setContextMenu(0);
|
trayIcon->setContextMenu(0);
|
||||||
trayIcon->deleteLater();
|
trayIcon->deleteLater();
|
||||||
|
|
Loading…
Add table
Reference in a new issue