mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Add loading screen between leaving old party and joining new one
This commit is contained in:
@@ -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 });
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user