Skip to content
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

$timer behaves different in Android than iOS #197

Open
cpg opened this issue Nov 25, 2017 · 0 comments
Open

$timer behaves different in Android than iOS #197

cpg opened this issue Nov 25, 2017 · 0 comments

Comments

@cpg
Copy link
Contributor

cpg commented Nov 25, 2017

In iOS, when the user leaves a view A to go to view B, a timer that was started in A appears to stop.

In Android, it appears that if a user leaves a view A (e.g. goes to another tab B) with a periodic timer called foo in A, if the new tab B has an action called foo it appears to be called with the same interval as the previous view even though there is no timer in this new view.

In iOS, the timer (if it's running) does not appear to call the same-named action in the local view, if it exists.

This is confusing and should be made identical (one way or another), and some things clarified in the docs.

The behavior in Android is more general, in that a timer appears to be global no matter what and local to a view in iOS, though it's not general in the sense of triggering named actions if the actions are not local to the view.

This kind of brings up another thing to be clarified in the docs: are timers meant to continue running when a view leaves or they are local?

If they are not meant to stop (i.e. they are global), then Jasonette should have an action for when a view is "$hidden" to be able to hook up a $timer.stop event to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant