Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Question about the Swipe Back event and re-loading a view.

ANSWERED

I have a view that needs to have some values updated after the view gets re-loaded after a Swipe Back event. When the page is re-loaded its 'start' or 'upload' functions are never called so I can't update any values. When a view is re-loaded via the Swipe Back event, is there a way to force a function call? Or is there something like a 'onReload' event that I can attach an EventListener to?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

You should be able to capture the beforeunload event, then call your other functions.

https://dev.fitbit.com/blog/2020-09-24-announcing-fitbit-os-sdk-5.0/#swipe-back

View best answer in original post

Best Answer
0 Votes
3 REPLIES 3

You should be able to capture the beforeunload event, then call your other functions.

https://dev.fitbit.com/blog/2020-09-24-announcing-fitbit-os-sdk-5.0/#swipe-back

Best Answer
0 Votes

Hi, @DanMacLeod -  Did you master this? After the beforeunload is triggered and preventdefault issued the screen blanks. Is there a way just to ignore the Swipe back and continue without the need for animate?

 

In other words can you carry on as if the swipe back has not been performed without reloading the app.

Author | ch, passion for improvement.

Best Answer
0 Votes

I'm trying to stay on the same display/view rather than unloading the App when a swipe to the right is performed - is this possible?

Author | ch, passion for improvement.

Best Answer
0 Votes