moved storage from config to persistent state

This commit is contained in:
Pim Rijkers
2025-07-08 14:16:40 +02:00
parent 25eb5fb449
commit 44443c4a37
4 changed files with 4 additions and 5 deletions
@@ -206,9 +206,6 @@ Singleton {
property string username: "[unset]"
}
}
property JsonObject bottomWidgetRight: JsonObject {
property int lastTab: 0
}
}
property JsonObject time: JsonObject {
@@ -36,6 +36,7 @@ Singleton {
property JsonObject sidebar: JsonObject {
property JsonObject bottomGroup: JsonObject {
property bool collapsed: false
property int tab: 0
}
}
@@ -12,6 +12,7 @@ Singleton {
property QtObject sidebar: QtObject {
property QtObject bottomGroup: QtObject {
property bool collapsed: false
property int tab: 0
}
}
@@ -14,7 +14,7 @@ Rectangle {
color: Appearance.colors.colLayer1
clip: true
implicitHeight: collapsed ? collapsedBottomWidgetGroupRow.implicitHeight : bottomWidgetGroupRow.implicitHeight
property int selectedTab: Config.options.sidebar.bottomWidgetRight.lastTab
property int selectedTab: Persistent.states.sidebar.bottomGroup.tab
property bool collapsed: Persistent.states.sidebar.bottomGroup.collapsed
property var tabs: [
{"type": "calendar", "name": "Calendar", "icon": "calendar_month", "widget": calendarWidget},
@@ -146,7 +146,7 @@ Rectangle {
buttonIcon: modelData.icon
onClicked: {
root.selectedTab = index
Config.options.sidebar.bottomWidgetRight.lastTab = index
Persistent.states.sidebar.bottomGroup.tab = index
}
}
}