Skip to content

Commit

Permalink
Toast: Add withdraw method
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed Nov 9, 2023
1 parent a520e7b commit 5df9ffa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/Widgets/Toast.vala
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,14 @@ public class Granite.Toast : Gtk.Widget {
stop_timeout ();
start_timeout ();
}

/**
* Withdraws the currently displayed Toast
* @since 7.4.0
*/
[Version (since = "7.4.0")]
public void withdraw_notification () {
stop_timeout ();
revealer.reveal_child = false;
}
}

0 comments on commit 5df9ffa

Please sign in to comment.