Skip to content

Instantly share code, notes, and snippets.

@huang47
Created December 20, 2014 22:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huang47/ad8b320e54cf1ccb1421 to your computer and use it in GitHub Desktop.
Save huang47/ad8b320e54cf1ccb1421 to your computer and use it in GitHub Desktop.
profileSwitchSuccesses.
startWith(true).
flatMapLatest(function () {
return cacheExpiryInHomeOnForegrounds.
flatMapLatest(function() {
return EventManager.observe(EventManager.APP.EVENT_LOGIN_CHECK_DONE).
take(1).
filter(isLoggedIn);
});
}).
subscribe(function() {
logger.warn("about to refesh UI");
AppUtils.invalidateApplicationCache({includeList : ['lolomo','lolomos','lists']});
// homeNoGate ensure that this is a refresh of lolomo, and no profile gate is shown
loggedInLaunch({homeNoGate:true});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment