Skip to content

Commit

Permalink
add try now button
Browse files Browse the repository at this point in the history
  • Loading branch information
AdriDevelopsThings committed Jan 27, 2023
1 parent 52c4cd9 commit a2956ac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "iceportal_rich_presence"
version = "1.0.5"
version = "1.0.6"
edition = "2021"
authors = ["AdriDevelopsThings"]
readme = "README.md"
Expand Down
4 changes: 3 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ fn update_activity(client: &mut DiscordIpcClient, trip: TripInfo, to: &str, buil
let watch_button_url = format!("https://regenbogen-ice.de/trip/{}/{}", trip.train_type, trip.vzn);
let watch_button = Button::new("Watch",
watch_button_url.as_str());
let try_now_button = Button::new("Try now",
env!("CARGO_PKG_REPOSITORY"));

let details = format!("Riding {} {} to {}", trip.train_type, trip.vzn, to);
let state = format!("Next stop: {}", next_stop.station.name);
Expand All @@ -40,7 +42,7 @@ fn update_activity(client: &mut DiscordIpcClient, trip: TripInfo, to: &str, buil
.state(state.as_str())
.timestamps(timestamps)
.assets(assets)
.buttons(vec![watch_button]);
.buttons(vec![watch_button, try_now_button]);
client.set_activity(activity)
.expect("Error while setting new activity");
}
Expand Down

0 comments on commit a2956ac

Please sign in to comment.