mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-21 20:45:29 +03:00
don't set timer in past
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
cbe9305497
commit
ea28d770aa
1 changed files with 5 additions and 0 deletions
|
@ -380,6 +380,7 @@ class ConversationInfoActivity :
|
|||
}
|
||||
|
||||
private fun showTimePicker(selectedDate: Calendar) {
|
||||
val currentTime = Calendar.getInstance()
|
||||
MaterialDialog(this, BottomSheet(WRAP_CONTENT)).show {
|
||||
cancelable(false)
|
||||
timePicker(
|
||||
|
@ -388,6 +389,10 @@ class ConversationInfoActivity :
|
|||
timeCallback = { _, time ->
|
||||
selectedDate.set(Calendar.HOUR_OF_DAY, time.get(Calendar.HOUR_OF_DAY))
|
||||
selectedDate.set(Calendar.MINUTE, time.get(Calendar.MINUTE))
|
||||
if (selectedDate.timeInMillis < currentTime.timeInMillis) {
|
||||
selectedDate.set(Calendar.HOUR_OF_DAY,currentTime.get(Calendar.HOUR_OF_DAY))
|
||||
selectedDate.set(Calendar.MINUTE, currentTime.get(Calendar.MINUTE))
|
||||
}
|
||||
reconfigureLobbyTimerView(selectedDate)
|
||||
submitLobbyChanges()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue