mirror of
https://github.com/nextcloud/talk-android
synced 2025-08-06 03:25:07 +01:00
Use '==' instead of 'equals' in Kotlin
In Kotlin for a check of the structural equality '==' should be used. Referential equality is checked with '==='. See: - https://kotlinlang.org/docs/equality.html Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
parent
3411728597
commit
f8e8a95b34
@ -289,10 +289,10 @@ class SetStatusDialogFragment :
|
||||
@Suppress("ReturnCount")
|
||||
private fun clearAtToUnixTime(clearAt: ClearAt?): Long {
|
||||
if (clearAt != null) {
|
||||
if (clearAt.type.equals("period")) {
|
||||
if (clearAt.type == "period") {
|
||||
return System.currentTimeMillis() / ONE_SECOND_IN_MILLIS + clearAt.time.toLong()
|
||||
} else if (clearAt.type.equals("end-of")) {
|
||||
if (clearAt.time.equals("day")) {
|
||||
} else if (clearAt.type == "end-of") {
|
||||
if (clearAt.time == "day") {
|
||||
val date = Calendar.getInstance().apply {
|
||||
set(Calendar.HOUR_OF_DAY, LAST_HOUR_OF_DAY)
|
||||
set(Calendar.MINUTE, LAST_MINUTE_OF_HOUR)
|
||||
@ -443,14 +443,14 @@ class SetStatusDialogFragment :
|
||||
binding.clearStatusAfterSpinner.setSelection(0)
|
||||
} else {
|
||||
val clearAt = predefinedStatus.clearAt!!
|
||||
if (clearAt.type.equals("period")) {
|
||||
if (clearAt.type == "period") {
|
||||
when (clearAt.time) {
|
||||
"1800" -> binding.clearStatusAfterSpinner.setSelection(POS_HALF_AN_HOUR)
|
||||
"3600" -> binding.clearStatusAfterSpinner.setSelection(POS_AN_HOUR)
|
||||
"14400" -> binding.clearStatusAfterSpinner.setSelection(POS_FOUR_HOURS)
|
||||
else -> binding.clearStatusAfterSpinner.setSelection(POS_DONT_CLEAR)
|
||||
}
|
||||
} else if (clearAt.type.equals("end-of")) {
|
||||
} else if (clearAt.type == "end-of") {
|
||||
when (clearAt.time) {
|
||||
"day" -> binding.clearStatusAfterSpinner.setSelection(POS_TODAY)
|
||||
"week" -> binding.clearStatusAfterSpinner.setSelection(POS_END_OF_WEEK)
|
||||
|
Loading…
Reference in New Issue
Block a user