fix: ClusterSettings excessive CPU and Memory usage
This commit is contained in:
parent
bab116265c
commit
334885af77
2 changed files with 6 additions and 3 deletions
|
|
@ -67,8 +67,6 @@ export function useSettings() {
|
|||
if (!context)
|
||||
throw new Error('useSettingsContext should be called inside its SettingsProvider');
|
||||
|
||||
context.refetch();
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ function ClusterSettings() {
|
|||
}
|
||||
|
||||
function PageSettings(cluster: Accessor<Cluster>) {
|
||||
const { settings } = useSettings();
|
||||
const { settings, save } = useSettings();
|
||||
|
||||
// Game
|
||||
const fullscreen = createSetting(cluster().force_fullscreen, settings().force_fullscreen ?? false);
|
||||
|
|
@ -68,6 +68,11 @@ function PageSettings(cluster: Accessor<Cluster>) {
|
|||
custom_env_arguments: envVars.getRaw(),
|
||||
},
|
||||
}));
|
||||
|
||||
save({
|
||||
...settings(),
|
||||
java_versions: javaVersions.get(),
|
||||
});
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue