1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-21 20:27:45 +00:00

Fix show news setting

This commit is contained in:
Joshua Goins 2023-11-10 17:31:05 -05:00
parent ca23ca348f
commit 7176ee528e
2 changed files with 15 additions and 7 deletions

View file

@ -109,17 +109,21 @@ Kirigami.ApplicationWindow {
}
}
function onShowNewsChanged() {
// workaround annoying Qt layout bug
// TODO: see if this changed in Qt6
pageStack.layers.replace(Qt.createComponent("zone.xiv.astra", "MainPage"))
}
function onCurrentProfileChanged() {
checkSetup();
}
}
Connections {
target: LauncherCore.settings
function onShowNewsChanged() {
// workaround annoying Qt layout bug
// TODO: see if this changed in Qt7
pageStack.layers.replace(Qt.createComponent("zone.xiv.astra", "MainPage"))
}
}
Component.onCompleted: checkSetup()
property Item hoverLinkIndicator: QQC2.Control {

View file

@ -2,6 +2,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later
import QtQuick
import QtQuick.Window
import QtQuick.Controls as QQC2
import QtQuick.Layouts
@ -71,7 +72,10 @@ FormCard.FormCardPage {
text: i18n("Enable and show news")
checked: LauncherCore.settings.showNews
onCheckedChanged: LauncherCore.settings.showNews = checked
onCheckedChanged: {
LauncherCore.settings.showNews = checked;
Window.window.close(); // if we don't close the dialog it crashes!
}
}
FormCard.FormDelegateSeparator {