Skip to content

Add callback for Dismiss #6

@nosmirck

Description

@nosmirck

I'd like to add a callback method for when the toast is dismissed.

Let's say I want to trigger something right after the Toast is dismissed (manually or automatically) I think having something like:

//Somehwere:
...
Toast.MakeToast("message")
  .SetDismissCallback(MyCallback)
  .Show();
...

//Somewhere else
MyCallback(){
  Debug.WriteLine("Toast Dismissed!");
}

There are multiple reasons, for instance, trigger an analytics call that reports the toast was fully shown and dismissed, or to show multiple toasts in chain, or to keep track of the messages being shown (like having a list of strings that store the current shown messages, I want to remove the string that is dismissed, so I know exactly which toasts are shown), etc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions