Skip to content

Commit

Permalink
* Refactor scene activation
Browse files Browse the repository at this point in the history
  • Loading branch information
chrivers committed Sep 16, 2024
1 parent c156e5e commit 752d6c8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/routes/clip/scene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ async fn put_scene(
let scenes = lock.get_scenes_for_room(&scene.group.rid);
for rid in scenes {
lock.update::<Scene>(&rid, |scn| {
if rid == id {
scn.status = Some(SceneStatus::Static);
scn.status = if rid == id {
Some(SceneStatus::Static)
} else {
scn.status = Some(SceneStatus::Inactive);
}
Some(SceneStatus::Inactive)
};
})?;
}

Expand Down

0 comments on commit 752d6c8

Please sign in to comment.