-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] ShowToast can return handle to toast instance in order to close or update it. #97
Comments
Thanks for raising this @Liero. It is actually already being worked on as part of the next major version! I'll tag this issue as part of that milestone so we make sure we don't overlook anything. |
Hi @chrissainty, I'm sure you are quite busy, so let me know if you need help. I need customizable timeout per toast instance. Is it realistic, it will be released this year? Otherwise I will need to fork the repo. |
I'm just in the last stages with my book and I'm just getting it finalised for the publishers. Once that is done, I'll have some time back again and I can start getting some of these issues sorted. If you can just bare with me a little longer. |
I am looking to close a toast automatically once a long running task has completed. It would be great to reference a toast/id a close the specific one via the ToastService. |
What about if ShowToast methods return ToastInstance class (need to change to public class), set all properties to internal except for maybe something like this:
inside
using it would be something like:
Another thing maybe to consider is to have something like an instance.SetMessage() to be able to change the message, for example, if you are waiting some multiple task and you show a toast with DisableTimeout = true and to update message "task 1 done" .. "task 2 done", "last task in progress" and then instance.Close() might be useful in some cases. |
@Cvijo I think this could be a good starting point. Do you want to raise a PR based on your suggestion and then we can see how it looks in reality? |
I've already done it, see ToastService.cs and ToastReference.cs. I use the same approach for updating the toast (for example I change title, content, severity etc of existing toast) Feel free to inspire |
SCENARIO
I would like to show toasts instead of wait overlays in different scenarios.
For example when user click a button, I'm sending some emails in the background and during the process I would like to show a toast with messing "Sending emails..". When done sending, I would like to either close the toast, or update it to "Emails sent".
Example
I can do PR once agreed on the design
The text was updated successfully, but these errors were encountered: