Skip to content

Commit

Permalink
fix: pad the tooltip with spaces in case it's too short
Browse files Browse the repository at this point in the history
  • Loading branch information
vyfor committed Apr 17, 2024
1 parent 8529e6f commit 2ca8849
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,11 @@ pub extern "C" fn update_presence(
}
activity.assets = Some(ActivityAssets {
large_image: Some(presence_large_image),
large_text: Some(presence_large_text),
large_text: Some(if presence_large_text.len() < 2 {
format!("{:<2}", presence_large_text)
} else {
presence_large_text
}),
small_image: Some(config.editor_image.clone()),
small_text: if config.editor_tooltip.is_empty() {
None
Expand Down

0 comments on commit 2ca8849

Please sign in to comment.