-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
How to raise Notifications from async processes? #221
Comments
Thanks for raising this issue. This looks like it needs to be run in the UI Thread, in Avalonia you can use Dispatcher.UIThread.Post(fun _ -> dispatch(NotifyInfo "started")) Will look like into your PR and add a sample for how to achieve this |
Fixed #222 |
@edgarfgp Thank you for looking into this :) I see you created an example for a custom notification position using a model property. I hoped there'd be a less intrusive solution - but I guess that works. I also find that you refactored my example for multiple dispatched notifications from a background thread into some kind of recursive loop with a To be clear, the work - in the examples represented by the It's up to you whether you want to simplify the NotificationPage examples - but can you tell me how to easily dispatch multiple notifications from |
Maybe we have to raise this as an issue in https://github.com/fabulous-dev/Fabulous instead? |
Hey fabulous, I've tried out the new Notifications API in 2.4.0-pre1 and it seems to work fine for synchronous messages, but when trying to notify from an async process, the Dispatcher throws one of these my way:
A PR with reproducable examples on the
NotificationPage
in the Gallery follows.It also includes some questions regarding the recent changes towards the concept of
CmdMsg
, which I don't understand, seemingly replacingCmd<'msg>
, which I think I understand by now.The text was updated successfully, but these errors were encountered: