Add loading screen between leaving old party and joining new one

This commit is contained in:
Blade Barringer
2015-08-22 12:42:52 -05:00
parent 93f02363e5
commit 67e60e7d06
4 changed files with 12 additions and 2 deletions

View File

@@ -91,6 +91,9 @@ habitrpg.controller("PartyCtrl", ['$rootScope','$scope','Groups','Chat','User','
$scope.leaveOldPartyAndJoinNewParty = function(newPartyId, newPartyName) {
if (confirm('Are you sure you want to delete your party and join ' + newPartyName + '?')) {
Groups.Group.leave({gid: Groups.party()._id, keep:false}, undefined, function() {
$scope.group = {
loadingNewParty: true
};
$scope.join({ id: newPartyId, name: newPartyName });
});
}