diff --git a/core/MainWindow.xaml.cs b/core/MainWindow.xaml.cs index 4639357..e2ace08 100644 --- a/core/MainWindow.xaml.cs +++ b/core/MainWindow.xaml.cs @@ -49,6 +49,7 @@ public MainWindow() { APIRefresher.Start(); } + // Refresh API public void RefreshAPI(object sender, object e) { System.Threading.Tasks.Task.Run(() => { App.GlobalHardwareInfo.Refresh(); @@ -57,6 +58,7 @@ public void RefreshAPI(object sender, object e) { SendAPI(); } + // Start webview private async void Init() { await webView.EnsureCoreWebView2Async(); webView.CoreWebView2.Settings.AreDefaultContextMenusEnabled = false; @@ -125,6 +127,8 @@ public async void WebView_WebMessageReceived(object sender, CoreWebView2WebMessa case "newSettings": App.GlobalSettings = JsonSerializer.Deserialize(content.Content, App.SerializerOptions); + APIRefresher.Interval = new TimeSpan(0, 0, App.GlobalSettings.interval); + setSettings(App.GlobalSettings); break; diff --git a/interface/pages/settings.svelte b/interface/pages/settings.svelte index a88eea3..1342093 100644 --- a/interface/pages/settings.svelte +++ b/interface/pages/settings.svelte @@ -25,7 +25,7 @@

Refresh interval

-

How often does Cores refreshes the sensors and displays the data. Restart required.

+

How often does Cores refreshes the sensors and displays the data.