cinema6 / minireelinator

0 stars 1 forks source link

Ensure log out button never triggers login prompt in campaign creation view #1360

Closed sqmunson closed 8 years ago

sqmunson commented 8 years ago

Close #1257

The issue here is that when a user leaves the campaign creation view it does an autosave. If the user's session has expired it will trigger the login modal prompt. If the user clicks the "Log Out" button in the creation view after their session expires we don't want the login modal to appear, we want them to immediately be logged out and go to the login page. To fix this I'm $broadcasting an event from the main SelfieCtrl that does the log out and listening in the main CampaignCtrl. If the user clicks log out then the CampaignCtrl will set a flag and bypass the autosave, so the login modal will never be triggered. The side effect of this is that clicking logout button will not trigger an autosave, but I think this is okay because an autosave would have happened already.