mirror of
https://github.com/nextcloud/talk-android
synced 2025-08-03 10:05:28 +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")
|
@Suppress("ComplexMethod")
|
||||||
private fun setClearStatusAfterValue(item: Int) {
|
private fun setClearStatusAfterValue(item: Int) {
|
||||||
|
|
||||||
|
val currentTime = System.currentTimeMillis() / ONE_SECOND_IN_MILLIS
|
||||||
|
|
||||||
when (item) {
|
when (item) {
|
||||||
POS_DONT_CLEAR -> {
|
POS_DONT_CLEAR -> {
|
||||||
// don't clear
|
// don't clear
|
||||||
@ -243,20 +246,17 @@ class SetStatusDialogFragment :
|
|||||||
|
|
||||||
POS_HALF_AN_HOUR -> {
|
POS_HALF_AN_HOUR -> {
|
||||||
// 30 minutes
|
// 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 -> {
|
POS_AN_HOUR -> {
|
||||||
// one hour
|
// one hour
|
||||||
clearAt =
|
clearAt = currentTime + ONE_MINUTE_IN_SECONDS * ONE_MINUTE_IN_SECONDS
|
||||||
System.currentTimeMillis() / ONE_SECOND_IN_MILLIS + ONE_MINUTE_IN_SECONDS * ONE_MINUTE_IN_SECONDS
|
|
||||||
}
|
}
|
||||||
|
|
||||||
POS_FOUR_HOURS -> {
|
POS_FOUR_HOURS -> {
|
||||||
// four hours
|
// four hours
|
||||||
clearAt =
|
clearAt = currentTime + FOUR_HOURS * ONE_MINUTE_IN_SECONDS * ONE_MINUTE_IN_SECONDS
|
||||||
System.currentTimeMillis() / ONE_SECOND_IN_MILLIS + FOUR_HOURS * ONE_MINUTE_IN_SECONDS *
|
|
||||||
ONE_MINUTE_IN_SECONDS
|
|
||||||
}
|
}
|
||||||
|
|
||||||
POS_TODAY -> {
|
POS_TODAY -> {
|
||||||
|
Loading…
Reference in New Issue
Block a user