Fix hibernation behaviour not persisting

This commit is contained in:
crschnick
2026-01-05 09:33:55 +00:00
parent b8fa2ecaff
commit df2eb40599
2 changed files with 2 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ public enum HibernateBehaviour implements PrefsChoiceValue {
}
@Override
public boolean isSelectable() {
public boolean isAvailable() {
var handler = DataStorageUserHandler.getInstance();
return handler != null && handler.getActiveUser() != null;
}

View File

@@ -40,7 +40,7 @@ public class SystemCategory extends AppPrefsCategory {
.pref(prefs.hibernateBehaviour)
.addComp(ChoiceComp.ofTranslatable(
prefs.hibernateBehaviour,
PrefsChoiceValue.getSupported(HibernateBehaviour.class),
PrefsChoiceValue.getSupported(HibernateBehaviour.class).stream().filter(b -> b.isAvailable()).toList(),
true)
.maxWidth(getCompWidth()))
.pref(prefs.localShellDialect)