mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 11:38:51 +01:00
Fix logic for checking if it should be night time
This commit is contained in:
@@ -94,7 +94,7 @@ class NightModeManager @Inject constructor(
|
||||
*/
|
||||
private fun getPreviousInstanceOfTime(time: String): Calendar {
|
||||
val currentTime = System.currentTimeMillis() + TimeUnit.MINUTES.toMillis(10)
|
||||
val calendar = dateFormatter.parseTime(time)
|
||||
val calendar = createCalendar(time)
|
||||
|
||||
while (calendar.timeInMillis > currentTime) {
|
||||
calendar.add(Calendar.DAY_OF_YEAR, -1)
|
||||
|
||||
Reference in New Issue
Block a user