mautilus / sdk

MAUTILUS SmartTV SDK
BSD 3-Clause "New" or "Revised" License
98 stars 43 forks source link

delete scene in history #19

Closed kingctan closed 8 years ago

kingctan commented 8 years ago

A scenarios like:

open login scene ------> input username,password, then login ------>auto goto logined scene. Then click the back button, the scene will go back to login scene.

How to fix this, if i need delete the login scene in history? Thanks.

alfredo86 commented 8 years ago

Hi,

thanks for your answer.

I think you currently use something like this. right? Router.go("login"); // router goes to the login scene

If you do not want to add some scene to history you should something like this: Router.go(false, "login"); // flag false (must be set as first parameter) force to no adding login scene to the scene history.

I hope that it is useful for you :-)

mautilus commented 8 years ago

Exactly as alfredo86 answered. Router.go() has 2 "overloads":

Router.go("login");

Router.go(false,"login");

kingctan commented 8 years ago

OK Thank you @alfredo86 @mautilus