| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
test |
Sorry, something went wrong.
|
LGTM - triggered the CI. |
Sorry, something went wrong.
|
test |
Sorry, something went wrong.
…escript-angular into fix/923-module-not-destroyed
|
The cla-bot has been summoned, and re-checked this pull request! |
Sorry, something went wrong.
|
Hi @vakrilov, I just noticed a problem On Android 9.
This will have triggered an exit event and tried to destroy the angular application, but it is still running. You can see the problem here:
I print out the app events: JS: suspend # Leave the app to change the font size
JS: activityPaused
JS: activityStopped
JS: orientationChanged # Font size changed in while I'm in settings
JS: exit # Returned to the app
JS: activityDestroyed
JS: activityCreated
JS: activityStarted
JS: activityResumed
JS: resume
JS: displayed
JS: displayed |
Sorry, something went wrong.
If exit event was triggered twice we would try to destroy an already destroy module ref.
…escript-angular into fix/923-module-not-destroyed
Don't destroy the angular module on restart
|
I solved the problem. The exit event is triggered because the MainActivity.onDestroy() is called as a part of a restart needed to apply the new settings. I added a test for this case in the exit event handler. |
Sorry, something went wrong.
|
test |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What is the current behavior?
The application module isn't destroyed when the application exitEvent is triggered.
This causes the previous instance of the nativescript-angular app to be running in a sleep state and ngOnDestroy() on it's compoments, services etc. are not called as expected.
What is the new behavior?
Adds an event listener for the exitEvent in the NativeScriptPlatformRef which destroys the lastModuleRef which triggers ngOnDestroy() as expected.
Fixes #923