mirror of
https://github.com/accelforce/Yuito
synced 2025-02-04 01:37:36 +01:00
3472: Give polls a default duration (#3473)
This commit is contained in:
parent
3fc1892c7d
commit
d754df8f07
@ -75,8 +75,10 @@ fun showAddPollDialog(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val DAY_SECONDS = 60 * 60 * 24
|
||||||
|
val desiredDuration = poll?.expiresIn ?: DAY_SECONDS
|
||||||
val pollDurationId = durations.indexOfLast {
|
val pollDurationId = durations.indexOfLast {
|
||||||
it <= (poll?.expiresIn ?: 0)
|
it <= desiredDuration
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.pollDurationSpinner.setSelection(pollDurationId)
|
binding.pollDurationSpinner.setSelection(pollDurationId)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user