Skip to content

Commit

Permalink
remove refresh button
Browse files Browse the repository at this point in the history
  • Loading branch information
gerdreiss committed Oct 25, 2021
1 parent 9fad16e commit 9ff14a5
Showing 1 changed file with 2 additions and 26 deletions.
28 changes: 2 additions & 26 deletions ui/src/candidates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ impl SdkmanApp {
app_name: _,
app_heading,
logo,
candidates,
selected_candidate,
candidates: _,
selected_candidate: _,
candidate_search_dialog,
candidate_search_term: _,
} = self;
Expand Down Expand Up @@ -188,30 +188,6 @@ impl SdkmanApp {
{
frame.quit();
}
// Refresh button
if ui
.add(Button::new("🔄").text_style(TextStyle::Body))
.on_hover_text("Refresh")
.clicked()
{
match fetch_remote_candidates() {
Ok(models) => {
let cands: Vec<Candidate> = models
.iter()
.map(|model| Candidate::from_model(model, None))
.collect();
*candidates = cands;
*selected_candidate = None;
}
Err(e) => {
*selected_candidate = None;
tracing::error!(
"Refreshing the list of candidates failed with:\n{}",
e
)
}
}
}
// Search button
if ui
.add(Button::new("🔎").text_style(TextStyle::Body))
Expand Down

0 comments on commit 9ff14a5

Please sign in to comment.