From 1092d75f2e7fa8b6724e35153a38d004fdb94355 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Fri, 6 Sep 2024 04:44:26 -0400 Subject: [PATCH] Remove vestigial references to window geometry These weren't removed in d165cd955d17ee397c13123a3b12d3baeafe3108 because I forgot. --- src/qml/Main.qml | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/qml/Main.qml b/src/qml/Main.qml index b1e113d31..d545973bc 100644 --- a/src/qml/Main.qml +++ b/src/qml/Main.qml @@ -171,11 +171,9 @@ Kirigami.ApplicationWindow { if (ShareHandler.text && root.connection) { root.handleShare() } - if (NeoChatConfig.minimizeToSystemTrayOnStartup && !Kirigami.Settings.isMobile && Controller.supportSystemTray && NeoChatConfig.systemTray) { - restoreWindowGeometryConnections.enabled = true; // To restore window size and position - } else { + const hasSystemTray = Controller.supportSystemTray && NeoChatConfig.systemTray; + if (Kirigami.Settings.isMobile || !(hasSystemTray && NeoChatConfig.minimizeToSystemTrayOnStartup)) { visible = true; - saveWindowGeometryConnections.enabled = true; } } Connections { @@ -253,21 +251,6 @@ Kirigami.ApplicationWindow { } } - Connections { - id: restoreWindowGeometryConnections - enabled: false - target: root - - function onVisibleChanged() { - if (!visible) { - return; - } - Controller.restoreWindowGeometry(root); - restoreWindowGeometryConnections.enabled = false; // Only restore window geometry for the first time - saveWindowGeometryConnections.enabled = true; - } - } - Connections { target: root.connection