-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Ability to await for closure of any viewmodel #4426
Labels
t/feature
Feature request type
Comments
The ability to await the result in any way got removed: #4299 |
Yeah, not going to add it back. Might have missed some of the related code. If you come up with a good lifecycle aware version of it, I might consider it. |
Add a TaskCompletionSource CloseCompletionSource to the IMvxViewModel contract. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🚀 Feature Requests
Currently, it is only possible to block until closure of viewmodel that returns a value:
However, sometimes, I want to perform some work after a child viewmodel has closed - even though it does not return a value.
One might argue "hey, just return a value then!" - however, it means that viewmodel needs to derive from MvxViewModel<TInput, TOutput> instead if MvxViewModel, or MvxViewModel.
As I have my own common viewmodel base class (MyProductsViewModelBase : MvxViewModel), I have to repeat all my code multiple times to have a base class which
It would be much easier, if the IMvxViewModel just had its own
CloseCompletionSource
to be notified of when it was closed.Contextualize the feature
Add a
TaskCompletionSource<bool> CloseCompletionSource
to the IMvxViewModel contract.Sure, `IMvxViewModelResult<> would then need to have 2 completion sources (a bool one, and a typed on) - small price to pay.
The text was updated successfully, but these errors were encountered: