[#1109] Detekt Compose Rules 0.3.5
- Closes #1109 - Fixed the new Detekt Compose warnings
This commit is contained in:
parent
a3e7d8f6c4
commit
c28dadaeed
|
@ -135,7 +135,7 @@ ANDROID_NDK_VERSION=23.0.7599858
|
||||||
|
|
||||||
ANDROID_GRADLE_PLUGIN_VERSION=8.1.1
|
ANDROID_GRADLE_PLUGIN_VERSION=8.1.1
|
||||||
DETEKT_VERSION=1.23.0
|
DETEKT_VERSION=1.23.0
|
||||||
DETEKT_COMPOSE_RULES_VERSION=0.1.10
|
DETEKT_COMPOSE_RULES_VERSION=0.3.5
|
||||||
EMULATOR_WTF_GRADLE_PLUGIN_VERSION=0.15.1
|
EMULATOR_WTF_GRADLE_PLUGIN_VERSION=0.15.1
|
||||||
FIREBASE_CRASHLYTICS_BUILD_TOOLS_VERSION=2.9.4
|
FIREBASE_CRASHLYTICS_BUILD_TOOLS_VERSION=2.9.4
|
||||||
FLANK_VERSION=23.10.1
|
FLANK_VERSION=23.10.1
|
||||||
|
|
|
@ -2,6 +2,7 @@ package co.electriccoin.zcash.ui.design.component
|
||||||
|
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.wrapContentSize
|
import androidx.compose.foundation.layout.wrapContentSize
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
|
@ -152,6 +153,7 @@ fun Reference(
|
||||||
.wrapContentSize()
|
.wrapContentSize()
|
||||||
.clip(RoundedCornerShape(ZcashTheme.dimens.topAppBarActionRippleCorner))
|
.clip(RoundedCornerShape(ZcashTheme.dimens.topAppBarActionRippleCorner))
|
||||||
.clickable { onClick() }
|
.clickable { onClick() }
|
||||||
|
.then(modifier)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = text,
|
text = text,
|
||||||
|
@ -164,7 +166,7 @@ fun Reference(
|
||||||
textDecoration = TextDecoration.Underline
|
textDecoration = TextDecoration.Underline
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
modifier = modifier
|
modifier = Modifier.padding(all = ZcashTheme.dimens.spacingDefault)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,10 +181,7 @@ private fun TopBarOneVisibleActionMenuExample(
|
||||||
text = "Action 1",
|
text = "Action 1",
|
||||||
onClick = actionCallback,
|
onClick = actionCallback,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
modifier =
|
modifier = modifier
|
||||||
modifier.then(
|
|
||||||
Modifier.padding(all = ZcashTheme.dimens.spacingDefault)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,5 +5,5 @@ import co.electriccoin.zcash.configuration.model.map.Configuration
|
||||||
import co.electriccoin.zcash.configuration.model.map.StringConfiguration
|
import co.electriccoin.zcash.configuration.model.map.StringConfiguration
|
||||||
import kotlinx.collections.immutable.persistentMapOf
|
import kotlinx.collections.immutable.persistentMapOf
|
||||||
|
|
||||||
@Suppress("CompositionLocalAllowlist")
|
@Suppress("CompositionLocalAllowlist", "CompositionLocalNaming")
|
||||||
val RemoteConfig = compositionLocalOf<Configuration> { StringConfiguration(persistentMapOf(), null) }
|
val RemoteConfig = compositionLocalOf<Configuration> { StringConfiguration(persistentMapOf(), null) }
|
||||||
|
|
|
@ -117,10 +117,7 @@ private fun NewWalletRecoveryCopyToBufferMenuItem(
|
||||||
text = stringResource(id = R.string.new_wallet_recovery_copy),
|
text = stringResource(id = R.string.new_wallet_recovery_copy),
|
||||||
onClick = onCopyToClipboard,
|
onClick = onCopyToClipboard,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
modifier =
|
modifier = modifier
|
||||||
modifier.then(
|
|
||||||
Modifier.padding(all = ZcashTheme.dimens.spacingDefault)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -157,6 +157,7 @@ private fun OnboardingMainContent(
|
||||||
onFixtureWallet: (String) -> Unit,
|
onFixtureWallet: (String) -> Unit,
|
||||||
modifier: Modifier = Modifier
|
modifier: Modifier = Modifier
|
||||||
) {
|
) {
|
||||||
|
@Suppress("ModifierNotUsedAtRoot")
|
||||||
Box {
|
Box {
|
||||||
SmallTopAppBar(
|
SmallTopAppBar(
|
||||||
regularActions = {
|
regularActions = {
|
||||||
|
|
|
@ -282,10 +282,7 @@ private fun ClearSeedMenuItem(
|
||||||
text = stringResource(id = R.string.restore_button_clear),
|
text = stringResource(id = R.string.restore_button_clear),
|
||||||
onClick = onSeedClear,
|
onClick = onSeedClear,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
modifier =
|
modifier = modifier
|
||||||
modifier.then(
|
|
||||||
Modifier.padding(all = ZcashTheme.dimens.spacingDefault)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -124,10 +124,7 @@ private fun SeedRecoveryCopyToBufferMenuItem(
|
||||||
text = stringResource(id = R.string.seed_recovery_copy),
|
text = stringResource(id = R.string.seed_recovery_copy),
|
||||||
onClick = onCopyToClipboard,
|
onClick = onCopyToClipboard,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
modifier =
|
modifier = modifier
|
||||||
modifier.then(
|
|
||||||
Modifier.padding(all = ZcashTheme.dimens.spacingDefault)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue