Added mark pms read route. Fixed error checking and extra code.

This commit is contained in:
Keith Holliday
2016-05-06 09:45:04 -05:00
parent b037ddd14c
commit c88cae4ddb
4 changed files with 56 additions and 31 deletions

View File

@@ -21,8 +21,7 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
if (!!fromState.name) Analytics.track({'hitType':'pageview','eventCategory':'navigation','eventAction':'navigate','page':'/#/'+toState.name});
// clear inbox when entering or exiting inbox tab
if (fromState.name=='options.social.inbox' || toState.name=='options.social.inbox') {
//@TODO: Protected path. We need a url
User.set({'inbox.newMessages': 0});
User.clearNewMessages();
}
});