Skip to content

Commit

Permalink
fix: renamed SetThemeData
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelOsborne committed Dec 17, 2024
1 parent c19713e commit 2d4d3b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 6 additions & 6 deletions dotlottie-rs/src/state_machine_engine/actions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ pub enum Action {
value: f32,
},
SetTheme {
theme_id: String,
value: String,
},
SetFrame {
value: StringNumber,
},
SetProgress {
value: StringNumber,
},
SetSlot {
SetThemeData {
value: String,
},
FireCustomEvent {
Expand Down Expand Up @@ -239,15 +239,15 @@ impl ActionTrait for Action {
);
// Ok(())
}
Action::SetTheme { theme_id } => {
Action::SetTheme { value } => {
let read_lock = player.try_read();

match read_lock {
Ok(player) => {
if !player.set_theme(theme_id) {
if !player.set_theme(value) {
return Err(StateMachineActionError::ExecuteError(format!(
"Error loading theme: {}",
theme_id
value
)));
}
}
Expand All @@ -259,7 +259,7 @@ impl ActionTrait for Action {
}
Ok(())
}
Action::SetSlot { value } => {
Action::SetThemeData { value } => {
let read_lock = player.read();

match read_lock {
Expand Down
2 changes: 0 additions & 2 deletions dotlottie-rs/src/state_machine_engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,6 @@ impl StateMachineEngine {
}

self.listened_layers = all_listened_layers;

println!("Configured listened_layers : {:?}", self.listened_layers);
}

fn get_state(&self, state_name: &str) -> Option<Rc<State>> {
Expand Down

0 comments on commit 2d4d3b5

Please sign in to comment.