forked from Shinonome/dots-hyprland
set config read/write delay to 0 where delay is unnecessary
This commit is contained in:
@@ -36,7 +36,7 @@ ApplicationWindow {
|
||||
title: Translation.tr("Shell conflicts killer")
|
||||
|
||||
Component.onCompleted: {
|
||||
Config.ready // Just read to force init
|
||||
Config.readWriteDelay = 0;
|
||||
MaterialThemeLoader.reapplyTheme();
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ Singleton {
|
||||
property string filePath: Directories.shellConfigPath
|
||||
property alias options: configOptionsJsonAdapter
|
||||
property bool ready: false
|
||||
property int readWriteDelay: 50 // milliseconds
|
||||
|
||||
function setNestedValue(nestedKey, value) {
|
||||
let keys = nestedKey.split(".");
|
||||
@@ -42,7 +43,7 @@ Singleton {
|
||||
|
||||
Timer {
|
||||
id: fileReloadTimer
|
||||
interval: 50
|
||||
interval: root.readWriteDelay
|
||||
repeat: false
|
||||
onTriggered: {
|
||||
configFileView.reload()
|
||||
@@ -51,7 +52,7 @@ Singleton {
|
||||
|
||||
Timer {
|
||||
id: fileWriteTimer
|
||||
interval: 50
|
||||
interval: root.readWriteDelay
|
||||
repeat: false
|
||||
onTriggered: {
|
||||
configFileView.writeAdapter()
|
||||
|
||||
@@ -69,6 +69,7 @@ ApplicationWindow {
|
||||
|
||||
Component.onCompleted: {
|
||||
MaterialThemeLoader.reapplyTheme()
|
||||
Config.readWriteDelay = 0 // Settings app always only sets one var at a time so delay isn't needed
|
||||
}
|
||||
|
||||
minimumWidth: 750
|
||||
|
||||
@@ -33,6 +33,7 @@ ApplicationWindow {
|
||||
|
||||
Component.onCompleted: {
|
||||
MaterialThemeLoader.reapplyTheme();
|
||||
Config.readWriteDelay = 0 // Welcome app always only sets one var at a time so delay isn't needed
|
||||
}
|
||||
|
||||
minimumWidth: 600
|
||||
|
||||
Reference in New Issue
Block a user