mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-01 15:31:16 +00:00
[#1670] don't refresh on challenge create/join/leave (meh, workaround)
This commit is contained in:
parent
b3804c4d1f
commit
baf52db594
1 changed files with 3 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ habitrpg.controller("ChallengesCtrl", ['$scope', 'User', 'Challenges', 'Notifica
|
|||
if (isNew) {
|
||||
Notification.text('Challenge Created');
|
||||
$scope.discard();
|
||||
$scope.challenges.unshift(_challenge);
|
||||
$scope.challenges = Challenges.Challenge.query();
|
||||
} else {
|
||||
// TODO figure out a more elegant way about this
|
||||
//challenge._editing = false;
|
||||
|
|
@ -158,6 +158,7 @@ habitrpg.controller("ChallengesCtrl", ['$scope', 'User', 'Challenges', 'Notifica
|
|||
|
||||
$scope.join = function(challenge){
|
||||
challenge.$join(function(){
|
||||
$scope.challenges = Challenges.Challenge.query();
|
||||
User.log({});
|
||||
});
|
||||
|
||||
|
|
@ -168,6 +169,7 @@ habitrpg.controller("ChallengesCtrl", ['$scope', 'User', 'Challenges', 'Notifica
|
|||
$scope.selectedChal = undefined;
|
||||
} else {
|
||||
$scope.selectedChal.$leave({keep:keep}, function(){
|
||||
$scope.challenges = Challenges.Challenge.query();
|
||||
User.log({});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue