You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 7, 2022. It is now read-only.
I've noticed a strange behavior. I have an app that has a resume event. If I add setOrientation to the resume event, the event fires twice. I have tested this several times and found it consistently to be the case on device.
Plugin version 2.2.1, NS version 5.3.1. Angular. iOS. On plugged in device.
Running with $ tns run ios --bundle...
service.ts:
var orientation = require('nativescript-orientation');
...
constructor(){
applicationOn(suspendEvent, this.suspendEvent)
applicationOn(resumeEvent, this.resumeEvent
}
suspendEvent = (args) =>{ }
resumeEvent = (args) => {
orientation.setOrientation("portrait") //THIS IS THE LINE THAT CAUSES RESUME EVENT TO FIRE TWICE
}
If I include the orientation.setOrientation("portrait") in the service resume event, like above, the event fires twice if the app is resumed from landscape mode. So, if the phone is in landscape mode when the app resumes, and the setOrientation line is there, the resume event fires twice.
It only fires once if the setOrientation line is not there.
@NathanaelA, I know you are focused on the proplugins version, but this seems to be an odd mystery.
Why might this happen?
The text was updated successfully, but these errors were encountered:
That is an odd mystery. If you can clone this repo and take the nativescript core demo and add your code and duplicate the issue; send me the URL and I'll look into it. 😀
I've noticed a strange behavior. I have an app that has a resume event. If I add setOrientation to the resume event, the event fires twice. I have tested this several times and found it consistently to be the case on device.
Plugin version 2.2.1, NS version 5.3.1. Angular. iOS. On plugged in device.
Running with
$ tns run ios --bundle...
service.ts:
app.module.ts
If I include the orientation.setOrientation("portrait") in the service resume event, like above, the event fires twice if the app is resumed from landscape mode. So, if the phone is in landscape mode when the app resumes, and the setOrientation line is there, the resume event fires twice.
It only fires once if the setOrientation line is not there.
@NathanaelA, I know you are focused on the proplugins version, but this seems to be an odd mystery.
Why might this happen?
The text was updated successfully, but these errors were encountered: