Mark private messages as read when entering the inbox and syncing while in the inbox. closes #7689

This commit is contained in:
Husman
2016-06-18 19:42:11 -07:00
parent 813aa2cf38
commit b62fbab6f8
2 changed files with 5 additions and 2 deletions

View File

@@ -22,8 +22,8 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
$rootScope.pageTitle = $state.current.title;
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') {
// clear inbox when entering inbox tab
if (toState.name=='options.social.inbox') {
User.clearNewMessages();
}
});