mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Ensure reload on transition from challeng edit -> detail
This commit is contained in:
@@ -94,12 +94,14 @@ habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User',
|
||||
challenge.$save(function(_challenge){
|
||||
if (isNew) {
|
||||
Notification.text(window.env.t('challengeCreated'));
|
||||
$state.go('options.social.challenges.detail', {cid: _challenge._id});
|
||||
$scope.discard();
|
||||
$scope.challenges = Challenges.Challenge.query();
|
||||
$state.transitionTo('options.social.challenges.detail', {cid: challenge._id}, {
|
||||
reload: true, inherit: false, notify: true
|
||||
});
|
||||
User.sync();
|
||||
} else {
|
||||
$state.go('options.social.challenges.detail', {cid: _challenge._id});
|
||||
$state.transitionTo('options.social.challenges.detail', {cid: challenge._id}, {
|
||||
reload: true, inherit: false, notify: true
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user