Skip to content

Commit

Permalink
refactor: rename swap_images -> swap_icons
Browse files Browse the repository at this point in the history
  • Loading branch information
vyfor committed Dec 6, 2024
1 parent ca936f8 commit c40b7ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/presence/activity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ impl ActivityContext {
}
}

fn swap_images(
fn swap_icons(
&self,
config: &PluginConfig,
large_image: Option<String>,
Expand Down Expand Up @@ -269,7 +269,7 @@ impl ActivityContext {
let large_text = Some(self.get_effective_tooltip()).map(|s| s.to_owned());

let (small_image, small_text, large_image, large_text) =
self.swap_images(config, large_image, large_text, config.display.swap_images);
self.swap_icons(config, large_image, large_text, config.display.swap_icons);
let (details, state) = self.swap_fields(details, state, config.display.swap_fields);

Activity {
Expand Down
6 changes: 3 additions & 3 deletions src/types/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub struct DisplayConfig {
pub show_repository: bool,
pub show_cursor_position: bool,
pub swap_fields: bool,
pub swap_images: bool,
pub swap_icons: bool,
pub workspace_blacklist: Vec<String>,
}

Expand Down Expand Up @@ -135,14 +135,14 @@ impl Deserialize for DisplayConfig {
let show_repository = get_field!(input, "show_repository", |v| v.as_bool());
let show_cursor_position = get_field!(input, "show_cursor_position", |v| v.as_bool());
let swap_fields = get_field!(input, "swap_fields", |v| v.as_bool());
let swap_images = get_field!(input, "swap_images", |v| v.as_bool());
let swap_icons = get_field!(input, "swap_icons", |v| v.as_bool());

Ok(DisplayConfig {
show_time,
show_repository,
show_cursor_position,
swap_fields,
swap_images,
swap_icons,
workspace_blacklist: Vec::new(),
})
}
Expand Down

0 comments on commit c40b7ca

Please sign in to comment.