mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
@@ -14,14 +14,23 @@ Row {
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
spacing: Theme.spacingM
|
spacing: Theme.spacingM
|
||||||
|
|
||||||
Component.onCompleted: {
|
property bool isInitialized: false
|
||||||
|
|
||||||
|
function loadValue() {
|
||||||
const settings = findSettings()
|
const settings = findSettings()
|
||||||
if (settings) {
|
if (settings && settings.pluginService) {
|
||||||
value = settings.loadValue(settingKey, defaultValue)
|
const loadedValue = settings.loadValue(settingKey, defaultValue)
|
||||||
|
value = loadedValue
|
||||||
|
isInitialized = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
loadValue()
|
||||||
|
}
|
||||||
|
|
||||||
onValueChanged: {
|
onValueChanged: {
|
||||||
|
if (!isInitialized) return
|
||||||
const settings = findSettings()
|
const settings = findSettings()
|
||||||
if (settings) {
|
if (settings) {
|
||||||
settings.saveValue(settingKey, value)
|
settings.saveValue(settingKey, value)
|
||||||
|
|||||||
Reference in New Issue
Block a user