mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-22 11:38:24 +00:00
do not sync party every time the page is opened, update chat in realtime
This commit is contained in:
parent
6792464fbf
commit
f28dead692
2 changed files with 4 additions and 3 deletions
|
|
@ -28,7 +28,7 @@ habitrpg.controller("PartyCtrl", ['$rootScope','$scope','Groups','Chat','User','
|
|||
}
|
||||
|
||||
if ($state.is('options.social.party') && $rootScope.party && $rootScope.party.id) {
|
||||
Groups.party(true).then(handlePartyResponse, handlePartyError);
|
||||
Groups.party().then(handlePartyResponse, handlePartyError);
|
||||
} else {
|
||||
Groups.Group.syncParty().then(handlePartyResponse, handlePartyError);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,8 +98,9 @@ angular.module('habitrpg')
|
|||
// When a new chat message is posted
|
||||
partyChannel.bind('new-chat', function (data) {
|
||||
Groups.party().then(function () {
|
||||
// Groups.data.party.chat.unshift(data);
|
||||
// Groups.data.party.chat.splice(200);
|
||||
// Update the party data
|
||||
Groups.data.party.chat.unshift(data);
|
||||
Groups.data.party.chat.splice(200);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue