-
Notifications
You must be signed in to change notification settings - Fork 779
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
IsInitialized and IsActive are set too early #593
Comments
nigel-sampson
added a commit
that referenced
this issue
Mar 25, 2019
#593 Set the IsInitialized and IsActive properties to true only after…
erik-hooper
added a commit
to erik-hooper/Caliburn.Micro
that referenced
this issue
May 25, 2023
This is in relation to Caliburn-Micro#593. I agree with the issue but is a pretty big breaking change. This should allow the correct sequence of activation, activated callbacks.
This was referenced May 25, 2023
Shall we change it to Activating/Activated?Or before/after? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
IsInitialized
shouldn't be set totrue
before theOnInitializeAsync
method has returned and the view model has actually been initialized.Consider a view model that performs some asynchronous initialization:
And a view that displays a spinner or message to indicate that the view model is being initialized:
In version 4.0.52-alpha, the "Initializing..." message will never displayed because the
IsInitialized
property is set totrue
before theOnInitializeAsync
method is awaited in theScreen
class.The same thing applies to
IsActive
andOnActivateAsync
/OnDeactivateAsync
.These properties should be set once the tasks have completed. I'll submit another pull request.
The text was updated successfully, but these errors were encountered: