From 2f0b36c123bdc06f36a2ef543ff3c4d579556551 Mon Sep 17 00:00:00 2001 From: Sergey Pankratov Date: Thu, 10 Aug 2023 11:18:49 +0500 Subject: [PATCH] code clean --- .../account/impl/data/repository/AccountRepositoryImpl.kt | 4 ++-- .../presentation/mnemonic/backup/BackupMnemonicContent.kt | 2 +- .../experimental/kotlin-runtimepermissions-coroutines.kt | 4 ++-- .../android_foundation/kotlin/kotlin-runtimepermissions.kt | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/feature-account-impl/src/main/java/jp/co/soramitsu/account/impl/data/repository/AccountRepositoryImpl.kt b/feature-account-impl/src/main/java/jp/co/soramitsu/account/impl/data/repository/AccountRepositoryImpl.kt index 2bddd85c4a..0d9a91c2b2 100644 --- a/feature-account-impl/src/main/java/jp/co/soramitsu/account/impl/data/repository/AccountRepositoryImpl.kt +++ b/feature-account-impl/src/main/java/jp/co/soramitsu/account/impl/data/repository/AccountRepositoryImpl.kt @@ -824,9 +824,9 @@ class AccountRepositoryImpl( override fun googleAddressAllWalletsFlow(): Flow> { return allMetaAccountsFlow().map { allMetaAccounts -> - val polkadotChain = chainRegistry.getChain(westendChainId) + val westendChain = chainRegistry.getChain(westendChainId) allMetaAccounts.mapNotNull { - it.googleBackupAddress ?: it.address(polkadotChain) + it.googleBackupAddress ?: it.address(westendChain) } } } diff --git a/feature-account-impl/src/main/java/jp/co/soramitsu/account/impl/presentation/mnemonic/backup/BackupMnemonicContent.kt b/feature-account-impl/src/main/java/jp/co/soramitsu/account/impl/presentation/mnemonic/backup/BackupMnemonicContent.kt index 1595154e19..1a75f5668c 100644 --- a/feature-account-impl/src/main/java/jp/co/soramitsu/account/impl/presentation/mnemonic/backup/BackupMnemonicContent.kt +++ b/feature-account-impl/src/main/java/jp/co/soramitsu/account/impl/presentation/mnemonic/backup/BackupMnemonicContent.kt @@ -117,7 +117,7 @@ internal fun BackupMnemonicContent( MarginVertical(margin = 16.dp) - if (!state.isFromGoogleBackup) { + if (state.isFromGoogleBackup.not()) { AdvancedExpandableText( title = stringResource(id = R.string.common_advanced), initialState = false, diff --git a/runtime-permission/src/main/java/jp/co/soramitsu/android_foundation/kotlin/coroutines/experimental/kotlin-runtimepermissions-coroutines.kt b/runtime-permission/src/main/java/jp/co/soramitsu/android_foundation/kotlin/coroutines/experimental/kotlin-runtimepermissions-coroutines.kt index 2a946d03f7..676fb13a28 100644 --- a/runtime-permission/src/main/java/jp/co/soramitsu/android_foundation/kotlin/coroutines/experimental/kotlin-runtimepermissions-coroutines.kt +++ b/runtime-permission/src/main/java/jp/co/soramitsu/android_foundation/kotlin/coroutines/experimental/kotlin-runtimepermissions-coroutines.kt @@ -2,13 +2,13 @@ package jp.co.soramitsu.android_foundation.kotlin.coroutines.experimental import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentActivity +import jp.co.soramitsu.android_foundation.core.PermissionResult +import jp.co.soramitsu.android_foundation.core.RuntimePermission import jp.co.soramitsu.android_foundation.kotlin.NoActivityException import jp.co.soramitsu.android_foundation.kotlin.PermissionException -import jp.co.soramitsu.android_foundation.core.PermissionResult import kotlin.coroutines.resume import kotlin.coroutines.resumeWithException import kotlin.coroutines.suspendCoroutine -import jp.co.soramitsu.android_foundation.core.RuntimePermission as RuntimePermission suspend fun FragmentActivity.askPermission(vararg permissions: String): PermissionResult = suspendCoroutine { continuation -> var resumed = false diff --git a/runtime-permission/src/main/java/jp/co/soramitsu/android_foundation/kotlin/kotlin-runtimepermissions.kt b/runtime-permission/src/main/java/jp/co/soramitsu/android_foundation/kotlin/kotlin-runtimepermissions.kt index 9b7df4fb7a..9b9c7e8926 100644 --- a/runtime-permission/src/main/java/jp/co/soramitsu/android_foundation/kotlin/kotlin-runtimepermissions.kt +++ b/runtime-permission/src/main/java/jp/co/soramitsu/android_foundation/kotlin/kotlin-runtimepermissions.kt @@ -2,8 +2,8 @@ package jp.co.soramitsu.android_foundation.kotlin import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentActivity -import jp.co.soramitsu.android_foundation.core.RuntimePermission import jp.co.soramitsu.android_foundation.core.PermissionResult +import jp.co.soramitsu.android_foundation.core.RuntimePermission fun Fragment.askPermission(vararg permissions: String, acceptedblock: (PermissionResult) -> Unit): KotlinRuntimePermission { return KotlinRuntimePermission(