File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -238,13 +238,11 @@ export default createStore({
238238 if ( daysSinceLastCompletion >= 1 ) {
239239 //repeat for each day of inactivity
240240 for ( let i = 0 ; i < daysSinceLastCompletion ; i ++ ) {
241- state . user . rating = Math . max (
242- state . user . rating -
243- Math . sqrt ( Math . max ( state . user . rating , 0 ) ) *
244- ( 1 + Math . log ( Math . max ( i + 1 , 1 ) ) ) *
245- ( 1 + Math . log ( Math . max ( overdueTasks + 1 , 1 ) ) ) ,
246- 0 ,
247- ) ; //decrease user rating for each day of inactivity
241+ state . user . rating -=
242+ Math . sqrt ( Math . max ( state . user . rating , 0 ) ) *
243+ ( 1 + Math . log ( Math . max ( i + 1 , 1 ) ) ) *
244+ ( 1 + Math . log ( Math . max ( overdueTasks + 1 , 1 ) ) ) ; //decrease user rating for each day of inactivity
245+ state . user . rating = Math . max ( state . user . rating , 0 ) ; //make sure rating is not below 0
248246 }
249247 }
250248 //calculate task streak XP multiplier
You can’t perform that action at this time.
0 commit comments