Skip to content

Commit

Permalink
Merge pull request #474 from marhkb/fix/find-toast-overlay
Browse files Browse the repository at this point in the history
fix(window): Make sure to find the toast overlay
  • Loading branch information
marhkb authored Dec 16, 2022
2 parents 6cc160c + 1b42e66 commit b7a4dab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,10 @@ mod imp {
}),
clone!(@weak obj => move |e| obj.client_err_op(e)),
clone!(@weak obj, @weak manager => move |e| {
utils::show_error_toast(&obj, "Connection lost", &e.to_string());
utils::show_error_toast(
&*obj.imp().toast_overlay, "Connection lost",
&e.to_string()
);
manager.unset_client();
}),
),
Expand Down Expand Up @@ -676,7 +679,7 @@ impl Window {
"welcome"
});

utils::show_error_toast(self, "Connection error", &e.to_string());
utils::show_error_toast(&*imp.toast_overlay, "Connection lost", &e.to_string());
}

fn is_showing_overlay(&self) -> bool {
Expand Down

0 comments on commit b7a4dab

Please sign in to comment.