Compare commits

...

2 Commits

Author SHA1 Message Date
Malte Jürgens
b4db987217 fix tray settings 2023-01-23 18:59:25 +01:00
Malte Jürgens
9f46e710a9 fix tray bug 2023-01-14 16:28:23 +01:00
3 changed files with 4 additions and 1 deletions

View File

@@ -296,6 +296,7 @@ setInterval(() => {
"Move discord-screenaudio to the system tray instead of closing",
window.discordScreenaudioTrayEnabled,
(enabled) => {
window.discordScreenaudioTrayEnabled = enabled;
console.log(`!discord-screenaudio-tray-${enabled}`);
}
)

View File

@@ -125,6 +125,8 @@ void MainWindow::setupTrayIcon() {
}
void MainWindow::cleanTrayIcon() {
if (m_trayIcon == nullptr)
return;
m_trayIcon->hide();
m_trayIconMenu->deleteLater();
m_trayIcon->deleteLater();

View File

@@ -30,7 +30,7 @@ private:
QWebEngineProfile *prepareProfile();
DiscordPage *m_discordPage;
void closeEvent(QCloseEvent *event) override;
QSystemTrayIcon *m_trayIcon;
QSystemTrayIcon *m_trayIcon = nullptr;
QMenu *m_trayIconMenu;
QSettings *m_settings;
bool m_wasMaximized;