-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
IActivatableLifetime doesn't work on MacOS #17561
Comments
Can you confirm, that subscribing earlier doesn't solve the problem? |
Doesn't solve it. The issue here is why the activated event gets invoked when the app is deactivated. With the current concept doesn't matter if the app gets activated or deactivated, always the Activated event gets fired. |
You are right. It should call OnDeactived from OnHide method: Avalonia/src/Avalonia.Native/AvaloniaNativeApplicationPlatform.cs Lines 89 to 103 in a7c3ad9
|
If anybody wants to contribute, it should be a simple fix. |
Done #17573 |
Describe the bug
I have updated the Avalonia version in my application from an older nightly build to 11.4.1 (The issue can be reproduced from 11.1.0 to 11.2.1).
I had to update my code as
IActivatableApplicationLifetime
interface doesn't exist anymore, but I can useTryGetFeature<IActivatableLifetime>()
instead.The new code successfully finds the feature and subscribe to its event, but sadly the behavior changed.
Deactivated
event never gets called, at least in the scenario where it was called before now it is not.To Reproduce
Simple repo:
Expected behavior
No response
Avalonia version
11.1.0 - 11.2.1
OS
macOS
Additional context
No response
The text was updated successfully, but these errors were encountered: