From e7c258e2f8180803397db35436b8ace370d701dd Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Tue, 19 Jul 2022 14:16:59 +0200 Subject: [PATCH] fix detekt issues Signed-off-by: Andy Scherzinger --- .../talk/controllers/AccountVerificationController.kt | 10 ++++------ .../main/java/com/nextcloud/talk/users/UserManager.kt | 2 -- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/controllers/AccountVerificationController.kt b/app/src/main/java/com/nextcloud/talk/controllers/AccountVerificationController.kt index a887748ed..eb3efc898 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/AccountVerificationController.kt +++ b/app/src/main/java/com/nextcloud/talk/controllers/AccountVerificationController.kt @@ -277,8 +277,7 @@ class AccountVerificationController(args: Bundle? = null) : } else { activity!!.runOnUiThread { binding.progressText.text = - """ - ${binding.progressText.text} + """ ${binding.progressText.text} ${resources!!.getString(R.string.nc_push_disabled)} """.trimIndent() } @@ -289,10 +288,9 @@ class AccountVerificationController(args: Bundle? = null) : @SuppressLint("SetTextI18n") override fun onError(e: Throwable) { binding.progressText.text = + """ ${binding.progressText.text} """ - ${binding.progressText.text} - """.trimIndent() + - resources!!.getString(R.string.nc_display_name_not_stored) + .trimIndent() + resources!!.getString(R.string.nc_display_name_not_stored) abortVerification() } @@ -484,7 +482,7 @@ class AccountVerificationController(args: Bundle? = null) : if (internalAccountId != -1L) { val count = userManager.deleteUser(internalAccountId) if (count > 0) { - activity?.runOnUiThread { Handler().postDelayed({ router.popToRoot() }, DELAY_IN_MILLIS) } + activity?.runOnUiThread { Handler().postDelayed({ router.popToRoot() }, DELAY_IN_MILLIS) } } } else { activity?.runOnUiThread { Handler().postDelayed({ router.popToRoot() }, DELAY_IN_MILLIS) } diff --git a/app/src/main/java/com/nextcloud/talk/users/UserManager.kt b/app/src/main/java/com/nextcloud/talk/users/UserManager.kt index 59511a5f9..8f685b8a4 100644 --- a/app/src/main/java/com/nextcloud/talk/users/UserManager.kt +++ b/app/src/main/java/com/nextcloud/talk/users/UserManager.kt @@ -31,8 +31,6 @@ import com.nextcloud.talk.models.json.push.PushConfigurationState import com.nextcloud.talk.utils.database.user.CurrentUserProviderNew import io.reactivex.Maybe import io.reactivex.Single -import java.lang.Boolean.FALSE -import java.lang.Boolean.TRUE @Suppress("TooManyFunctions") class UserManager internal constructor(private val userRepository: UsersRepository) : CurrentUserProviderNew {