mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 03:30:25 +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) {
|
if (isNew) {
|
||||||
Notification.text('Challenge Created');
|
Notification.text('Challenge Created');
|
||||||
$scope.discard();
|
$scope.discard();
|
||||||
$scope.challenges.unshift(_challenge);
|
$scope.challenges = Challenges.Challenge.query();
|
||||||
} else {
|
} else {
|
||||||
// TODO figure out a more elegant way about this
|
// TODO figure out a more elegant way about this
|
||||||
//challenge._editing = false;
|
//challenge._editing = false;
|
||||||
|
|
@ -158,6 +158,7 @@ habitrpg.controller("ChallengesCtrl", ['$scope', 'User', 'Challenges', 'Notifica
|
||||||
|
|
||||||
$scope.join = function(challenge){
|
$scope.join = function(challenge){
|
||||||
challenge.$join(function(){
|
challenge.$join(function(){
|
||||||
|
$scope.challenges = Challenges.Challenge.query();
|
||||||
User.log({});
|
User.log({});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -168,6 +169,7 @@ habitrpg.controller("ChallengesCtrl", ['$scope', 'User', 'Challenges', 'Notifica
|
||||||
$scope.selectedChal = undefined;
|
$scope.selectedChal = undefined;
|
||||||
} else {
|
} else {
|
||||||
$scope.selectedChal.$leave({keep:keep}, function(){
|
$scope.selectedChal.$leave({keep:keep}, function(){
|
||||||
|
$scope.challenges = Challenges.Challenge.query();
|
||||||
User.log({});
|
User.log({});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue