[plasma/discover/Plasma/6.7] discover/qml: ui: Only keep a state saver around when we are visible

Aleix Pol Gonzalez <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 25a7b3089d3daaa21157158cd062c61b9be1242a by Aleix Pol Gonzalez.
Committed on 28/07/2026 at 14:59.
Pushed by apol into branch 'Plasma/6.7'.

ui: Only keep a state saver around when we are visible


(cherry picked from commit 179e5fd34229997ac02c6003155756b4c212c51d)

Co-authored-by: Aleix Pol <[email protected]>

M  +5    -2    discover/qml/DiscoverWindow.qml

https://invent.kde.org/plasma/discover/-/commit/25a7b3089d3daaa21157158cd062c61b9be1242a

diff --git a/discover/qml/DiscoverWindow.qml b/discover/qml/DiscoverWindow.qml
index f2c00c7a4..47c84de26 100644
--- a/discover/qml/DiscoverWindow.qml
+++ b/discover/qml/DiscoverWindow.qml
@@ -39,8 +39,11 @@ Kirigami.ApplicationWindow {
     
     readonly property Item leftPage: window.pageStack.depth > 0 ? window.pageStack.get(0) : null
 
-    KConfig.WindowStateSaver {
-        configGroupName: "MainWindow"
+    Loader {
+        sourceComponent: KConfig.WindowStateSaver {
+            configGroupName: "MainWindow"
+        }
+        active: window.visible
     }
 
     Component.onCompleted: {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.