mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-31 00:25:46 +01:00
avoid linebreaks for "clear at" calculation
because: - can lead to wrong calculations! - avoid klint complaining about indentation Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
f475065a7f
commit
4984ba4dde
@ -235,6 +235,9 @@ class SetStatusDialogFragment :
|
||||
|
||||
@Suppress("ComplexMethod")
|
||||
private fun setClearStatusAfterValue(item: Int) {
|
||||
|
||||
val currentTime = System.currentTimeMillis() / ONE_SECOND_IN_MILLIS
|
||||
|
||||
when (item) {
|
||||
POS_DONT_CLEAR -> {
|
||||
// don't clear
|
||||
@ -243,20 +246,17 @@ class SetStatusDialogFragment :
|
||||
|
||||
POS_HALF_AN_HOUR -> {
|
||||
// 30 minutes
|
||||
clearAt = System.currentTimeMillis() / ONE_SECOND_IN_MILLIS + THIRTY_MINUTES * ONE_MINUTE_IN_SECONDS
|
||||
clearAt = currentTime + THIRTY_MINUTES * ONE_MINUTE_IN_SECONDS
|
||||
}
|
||||
|
||||
POS_AN_HOUR -> {
|
||||
// one hour
|
||||
clearAt =
|
||||
System.currentTimeMillis() / ONE_SECOND_IN_MILLIS + ONE_MINUTE_IN_SECONDS * ONE_MINUTE_IN_SECONDS
|
||||
clearAt = currentTime + ONE_MINUTE_IN_SECONDS * ONE_MINUTE_IN_SECONDS
|
||||
}
|
||||
|
||||
POS_FOUR_HOURS -> {
|
||||
// four hours
|
||||
clearAt =
|
||||
System.currentTimeMillis() / ONE_SECOND_IN_MILLIS + FOUR_HOURS * ONE_MINUTE_IN_SECONDS *
|
||||
ONE_MINUTE_IN_SECONDS
|
||||
clearAt = currentTime + FOUR_HOURS * ONE_MINUTE_IN_SECONDS * ONE_MINUTE_IN_SECONDS
|
||||
}
|
||||
|
||||
POS_TODAY -> {
|
||||
|
Loading…
Reference in New Issue
Block a user