mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
Make party page sync the party automatically
This commit is contained in:
@@ -509,11 +509,16 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
|||||||
.controller("PartyCtrl", ['$rootScope','$scope', 'Groups', 'Chat', 'User', 'Challenges', '$state', '$compile',
|
.controller("PartyCtrl", ['$rootScope','$scope', 'Groups', 'Chat', 'User', 'Challenges', '$state', '$compile',
|
||||||
function($rootScope,$scope, Groups, Chat, User, Challenges, $state, $compile) {
|
function($rootScope,$scope, Groups, Chat, User, Challenges, $state, $compile) {
|
||||||
|
|
||||||
|
|
||||||
$scope.type = 'party';
|
$scope.type = 'party';
|
||||||
$scope.text = window.env.t('party');
|
$scope.text = window.env.t('party');
|
||||||
$scope.group = $rootScope.party = Groups.party();
|
$scope.group = $rootScope.party = Groups.party();
|
||||||
$scope.newGroup = new Groups.Group({type:'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);
|
Chat.seenMessage($scope.group._id);
|
||||||
|
|
||||||
$scope.create = function(group){
|
$scope.create = function(group){
|
||||||
|
|||||||
Reference in New Issue
Block a user