|
|
@ -1,6 +1,5 @@
|
|
|
|
package com.todoroo.astrid.alarms
|
|
|
|
package com.todoroo.astrid.alarms
|
|
|
|
|
|
|
|
|
|
|
|
import com.todoroo.andlib.utility.DateUtilities
|
|
|
|
|
|
|
|
import com.todoroo.astrid.data.Task
|
|
|
|
import com.todoroo.astrid.data.Task
|
|
|
|
import org.tasks.data.Alarm
|
|
|
|
import org.tasks.data.Alarm
|
|
|
|
import org.tasks.jobs.AlarmEntry
|
|
|
|
import org.tasks.jobs.AlarmEntry
|
|
|
@ -81,10 +80,7 @@ class AlarmCalculator(
|
|
|
|
`when` = task.creationDate
|
|
|
|
`when` = task.creationDate
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`when` += (reminderPeriod * (0.85f + 0.3f * random.nextFloat())).toLong()
|
|
|
|
`when` += (reminderPeriod * (0.85f + 0.3f * random.nextFloat())).toLong()
|
|
|
|
if (`when` < DateUtilities.now()) {
|
|
|
|
return Math.max(`when`, task.hideUntil)
|
|
|
|
`when` = Math.max(DateUtilities.now(), task.hideUntil)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return `when`
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return AlarmService.NO_ALARM
|
|
|
|
return AlarmService.NO_ALARM
|
|
|
|
}
|
|
|
|
}
|
|
|
|