mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
* Fix User > Profile showing {getProgressDisplay()}
* Remove bad nextRewardAt check
This commit is contained in:
committed by
Keith Holliday
parent
68f4275c44
commit
e395182c95
@@ -93,8 +93,8 @@ habitrpg.controller("UserCtrl", ['$rootScope', '$scope', '$location', 'User', '$
|
|||||||
|
|
||||||
$scope.getProgressDisplay = function () {
|
$scope.getProgressDisplay = function () {
|
||||||
var currentLoginDay = Content.loginIncentives[$scope.profile.loginIncentives];
|
var currentLoginDay = Content.loginIncentives[$scope.profile.loginIncentives];
|
||||||
|
if (!currentLoginDay) return env.t('moreIncentivesComingSoon');
|
||||||
var nextRewardAt = currentLoginDay.nextRewardAt;
|
var nextRewardAt = currentLoginDay.nextRewardAt;
|
||||||
if (!currentLoginDay || !nextRewardAt) return env.t('moreIncentivesComingSoon');
|
|
||||||
if (!currentLoginDay.prevRewardKey) currentLoginDay.prevRewardKey = 0;
|
if (!currentLoginDay.prevRewardKey) currentLoginDay.prevRewardKey = 0;
|
||||||
return env.t('checkinProgressTitle') + ' ' + ($scope.profile.loginIncentives - currentLoginDay.prevRewardKey) + '/' + (nextRewardAt - currentLoginDay.prevRewardKey);
|
return env.t('checkinProgressTitle') + ' ' + ($scope.profile.loginIncentives - currentLoginDay.prevRewardKey) + '/' + (nextRewardAt - currentLoginDay.prevRewardKey);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user