[Refactoring] shortened getCachedGadgetState

This commit is contained in:
hartie95 2024-02-07 22:24:27 +01:00
parent 70eb3f9d48
commit a66fa7d5ed

View File

@ -80,8 +80,7 @@ public class SceneGroupInstance implements SceneGroupUserData {
}
public int getCachedGadgetState(SceneGadget g) {
Integer state = cachedGadgetStates.getOrDefault(g.getConfigId(), null);
return (state == null) ? g.getState() : state;
return cachedGadgetStates.getOrDefault(g.getConfigId(), g.getState());
}
public void save() {