Skip to content

Commit 8a9594b

Browse files
committed
chore: lint
1 parent 05c46eb commit 8a9594b

File tree

5 files changed

+20
-19
lines changed

5 files changed

+20
-19
lines changed

app/src/main/java/to/bitkit/ui/ContentView.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -448,11 +448,8 @@ fun ContentView(
448448
transferViewModel = transferViewModel,
449449
)
450450

451-
452451
val navBackStackEntry by navController.currentBackStackEntryAsState()
453-
454452
val currentRoute = navBackStackEntry?.destination?.route
455-
456453
val showTabBar = currentRoute in listOf(
457454
Routes.Home::class.qualifiedName,
458455
Routes.AllActivity::class.qualifiedName,
@@ -463,8 +460,8 @@ fun ContentView(
463460
hazeState = hazeState,
464461
onSendClick = { appViewModel.showSheet(Sheet.Send()) },
465462
onReceiveClick = { appViewModel.showSheet(Sheet.Receive) },
466-
onScanClick = { navController.navigateToScanner() }, modifier = Modifier
467-
.align(Alignment.BottomCenter)
463+
onScanClick = { navController.navigateToScanner() },
464+
modifier = Modifier.align(Alignment.BottomCenter)
468465
)
469466
}
470467
}

app/src/main/java/to/bitkit/ui/screens/wallets/activity/components/CustomTabRowWithSpacing.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ fun <T : TabItem> CustomTabRowWithSpacing(
3636
) {
3737
Column(modifier = modifier) {
3838
Row(
39-
modifier = Modifier.fillMaxWidth(),
40-
horizontalArrangement = Arrangement.SpaceEvenly
39+
horizontalArrangement = Arrangement.SpaceEvenly,
40+
modifier = Modifier.fillMaxWidth()
4141
) {
4242
tabs.forEachIndexed { index, tab ->
4343
val isSelected = tabs[currentTabIndex] == tab
@@ -51,7 +51,7 @@ fun <T : TabItem> CustomTabRowWithSpacing(
5151
.fillMaxWidth()
5252
.clickableAlpha { onTabChange(tab) }
5353
.padding(vertical = 8.dp)
54-
.testTag("Tab-${tab.name.lowercase()}"),
54+
.testTag("Tab-${tab.name.lowercase()}")
5555
) {
5656
CaptionB(
5757
tab.uiText,
@@ -67,7 +67,7 @@ fun <T : TabItem> CustomTabRowWithSpacing(
6767
durationMillis = 250,
6868
easing = FastOutSlowInEasing
6969
),
70-
label = "indicatorAlpha"
70+
label = "indicatorAlpha",
7171
)
7272

7373
val animatedColor by animateColorAsState(
@@ -76,7 +76,7 @@ fun <T : TabItem> CustomTabRowWithSpacing(
7676
durationMillis = 250,
7777
easing = FastOutSlowInEasing
7878
),
79-
label = "indicatorColor"
79+
label = "indicatorColor",
8080
)
8181

8282
Box(

app/src/main/java/to/bitkit/ui/screens/wallets/receive/ReceiveInvoiceUtils.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import to.bitkit.R
1212
* @param onchainAddress Pure Bitcoin address (fallback)
1313
* @return The invoice string to display/encode in QR
1414
*/
15+
@Suppress("LongParameterList")
1516
fun getInvoiceForTab(
1617
tab: ReceiveTab,
1718
bip21: String,

app/src/main/java/to/bitkit/ui/screens/wallets/receive/ReceiveQrScreen.kt

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ import to.bitkit.ui.components.Tooltip
6969
import to.bitkit.ui.components.VerticalSpacer
7070
import to.bitkit.ui.scaffold.SheetTopBar
7171
import to.bitkit.ui.screens.wallets.activity.components.CustomTabRowWithSpacing
72-
import to.bitkit.ui.screens.wallets.receive.ReceiveTab.AUTO
73-
import to.bitkit.ui.screens.wallets.receive.ReceiveTab.SAVINGS
74-
import to.bitkit.ui.screens.wallets.receive.ReceiveTab.SPENDING
7572
import to.bitkit.ui.shared.effects.SetMaxBrightness
7673
import to.bitkit.ui.shared.modifiers.sheetHeight
7774
import to.bitkit.ui.shared.util.gradientBackground
@@ -83,6 +80,7 @@ import to.bitkit.ui.theme.Colors
8380
import to.bitkit.ui.utils.withAccent
8481
import to.bitkit.viewmodels.MainUiState
8582

83+
@Suppress("CyclomaticComplexMethod")
8684
@OptIn(FlowPreview::class)
8785
@Composable
8886
fun ReceiveQrScreen(
@@ -188,9 +186,9 @@ fun ReceiveQrScreen(
188186
tabs = visibleTabs,
189187
currentTabIndex = visibleTabs.indexOf(selectedTab),
190188
selectedColor = when (selectedTab) {
191-
SAVINGS -> Colors.Brand
192-
AUTO -> Colors.White
193-
SPENDING -> Colors.Purple
189+
ReceiveTab.SAVINGS -> Colors.Brand
190+
ReceiveTab.AUTO -> Colors.White
191+
ReceiveTab.SPENDING -> Colors.Purple
194192
},
195193
onTabChange = { tab ->
196194
haptic.performHapticFeedback(HapticFeedbackType.TextHandleMove)
@@ -673,8 +671,11 @@ private fun PreviewAutoMode() {
673671
nodeLifecycleState = NodeLifecycleState.Running,
674672
channels = listOf(mockChannel),
675673
onchainAddress = "bcrt1qfserxgtuesul4m9zva56wzk849yf9l8rk4qy0l",
676-
bolt11 = "lnbcrt500u1pn7umn7pp5x0s9lt9fwrff6rp70pz3guwnjgw97sjuv79vhx9n2ps8q6tcdehhxapqd9h8vmmfvdjjqen0wgsyqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxq",
677-
bip21 = "bitcoin:bcrt1qfserxgtuesul4m9zva56wzk849yf9l8rk4qy0l?lightning=lnbcrt500u1pn7umn7pp5x0s9lt9fwrff6rp70pz3guwnjgw97sjuv79..."
674+
bolt11 = "lnbcrt500u1pn7umn7pp5x0s9lt9fwrff6rp70pz3guwnjgw97sjuv79vhx9n2ps8q6tcdehhxapqd9h8vmmfv" +
675+
"djjqen0wgsyqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxq",
676+
bip21 = "bitcoin:bcrt1qfserxgtuesul4m9zva56wzk849yf9l8rk4qy0l?lightning=" +
677+
"lnbcrt500u1pn7umn7pp5x0s9lt9fwrff6rp70pz3guwnjgw97sjuv79vhx9n2ps8q6tcdehhxapqd9h8vmmfv" +
678+
"djjqen0wgsyqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxq",
678679
),
679680
onClickEditInvoice = {},
680681
modifier = Modifier.sheetHeight(),
@@ -737,7 +738,8 @@ private fun PreviewSpendingMode() {
737738
walletState = MainUiState(
738739
nodeLifecycleState = NodeLifecycleState.Running,
739740
channels = listOf(mockChannel),
740-
bolt11 = "lnbcrt500u1pn7umn7pp5x0s9lt9fwrff6rp70pz3guwnjgw97sjuv79vhx9n2ps8q6tcdehhxapqd9h8vmmfvdjjqen0wgsyqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxq"
741+
bolt11 = "lnbcrt500u1pn7umn7pp5x0s9lt9fwrff6rp70pz3guwnjgw97sjuv79vhx9n2ps8q6tcdehhxapqd9h8vmmfv" +
742+
"djjqen0wgsyqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxqcrqvpsxq"
741743
),
742744
onClickEditInvoice = {},
743745
modifier = Modifier.sheetHeight(),

app/src/main/java/to/bitkit/ui/screens/wallets/receive/ReceiveSheet.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ fun ReceiveSheet(
3636
) {
3737
val wallet = requireNotNull(walletViewModel)
3838
val navController = rememberNavController()
39+
3940
LaunchedEffect(Unit) { editInvoiceAmountViewModel.clearInput() }
4041

4142
val cjitInvoice = remember { mutableStateOf<String?>(null) }

0 commit comments

Comments
 (0)