mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-06-05 21:49:22 +02:00
Coerce hours in range 0 to 23
This commit is contained in:
@@ -155,7 +155,7 @@ class ScheduleSendDialog(private val activity: BaseSimpleActivity, private var d
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getNextHour() = calendar.get(Calendar.HOUR_OF_DAY) + 1
|
private fun getNextHour() = (calendar.get(Calendar.HOUR_OF_DAY) + 1).coerceIn(0, 23)
|
||||||
|
|
||||||
private fun getNextMinute() = (calendar.get(Calendar.MINUTE) + 5).round(5).coerceIn(0, 59)
|
private fun getNextMinute() = (calendar.get(Calendar.MINUTE) + 5).round(5).coerceIn(0, 59)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user