Make party page sync the party automatically

This commit is contained in:
Blade Barringer
2015-06-14 19:26:01 -05:00
parent 6884263a55
commit bb73253e8e

View File

@@ -509,11 +509,16 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
.controller("PartyCtrl", ['$rootScope','$scope', 'Groups', 'Chat', 'User', 'Challenges', '$state', '$compile',
function($rootScope,$scope, Groups, Chat, User, Challenges, $state, $compile) {
$scope.type = 'party';
$scope.text = window.env.t('party');
$scope.group = $rootScope.party = Groups.party();
$scope.newGroup = new Groups.Group({type:'party'});
if ($state.is('options.social.party')) {
$scope.group.$get(); // Sync party automatically when navigating to party page
}
Chat.seenMessage($scope.group._id);
$scope.create = function(group){