@@ -39,7 +39,6 @@ import androidx.compose.ui.res.stringResource
3939import androidx.compose.ui.tooling.preview.Devices.NEXUS_5
4040import androidx.compose.ui.tooling.preview.Preview
4141import androidx.compose.ui.unit.dp
42- import com.google.accompanist.pager.HorizontalPagerIndicator
4342import kotlinx.coroutines.launch
4443import to.bitkit.R
4544import to.bitkit.ext.setClipboardText
@@ -83,13 +82,11 @@ fun ReceiveQrScreen(
8382 // Tab selection state
8483 var selectedTab by remember {
8584 mutableStateOf(
86- if (shouldShowAutoTab(
87- walletState.channels,
88- lightningState.shouldBlockLightningReceive,
89- walletState.nodeLifecycleState.isRunning()
90- )
91- ) ReceiveTab .AUTO
92- else ReceiveTab .SAVINGS
85+ if (walletState.channels.isNotEmpty()) {
86+ ReceiveTab .AUTO
87+ } else {
88+ ReceiveTab .SAVINGS
89+ }
9390 )
9491 }
9592
@@ -100,17 +97,10 @@ fun ReceiveQrScreen(
10097 val visibleTabs = remember(walletState, lightningState) {
10198 buildList {
10299 add(ReceiveTab .SAVINGS ) // Always visible
103- if (shouldShowAutoTab(
104- walletState.channels,
105- lightningState.shouldBlockLightningReceive,
106- walletState.nodeLifecycleState.isRunning()
107- )
108- ) {
100+ if (walletState.channels.isNotEmpty()) {
109101 add(ReceiveTab .AUTO )
110102 }
111- if (walletState.nodeLifecycleState.isRunning()) {
112- add(ReceiveTab .SPENDING )
113- }
103+ add(ReceiveTab .SPENDING )
114104 }
115105 }
116106
@@ -200,9 +190,7 @@ fun ReceiveQrScreen(
200190
201191 Spacer (Modifier .height(16 .dp))
202192
203- // Node state indicator (simplified from lines 150-190)
204193 ReceiveNodeStateIndicator (
205- nodeLifecycleState = walletState.nodeLifecycleState,
206194 selectedTab = selectedTab,
207195 cjitActive = cjitActive.value
208196 )
@@ -218,7 +206,7 @@ private fun ReceiveQrView(
218206 uri : String ,
219207 qrLogoPainter : Painter ,
220208 onClickEditInvoice : () -> Unit ,
221- modifier : Modifier = Modifier
209+ modifier : Modifier = Modifier ,
222210) {
223211 val context = androidx.compose.ui.platform.LocalContext .current
224212 val qrButtonTooltipState = rememberTooltipState()
@@ -314,7 +302,7 @@ private fun ReceiveDetailsView(
314302 bolt11 : String ,
315303 cjitInvoice : String? ,
316304 bip21 : String ,
317- modifier : Modifier = Modifier
305+ modifier : Modifier = Modifier ,
318306) {
319307 Card (
320308 colors = CardDefaults .cardColors(containerColor = Colors .White10 ),
@@ -333,6 +321,7 @@ private fun ReceiveDetailsView(
333321 )
334322 }
335323 }
324+
336325 ReceiveTab .AUTO -> {
337326 // Show both onchain AND lightning if available
338327 if (onchainAddress.isNotEmpty()) {
@@ -352,6 +341,7 @@ private fun ReceiveDetailsView(
352341 )
353342 }
354343 }
344+
355345 ReceiveTab .SPENDING -> {
356346 if (cjitInvoice != null || bolt11.isNotEmpty()) {
357347 CopyAddressCard (
@@ -369,14 +359,10 @@ private fun ReceiveDetailsView(
369359
370360@Composable
371361private fun ReceiveNodeStateIndicator (
372- nodeLifecycleState : to.bitkit.models.NodeLifecycleState ,
373362 selectedTab : ReceiveTab ,
374- cjitActive : Boolean
363+ cjitActive : Boolean ,
375364) {
376365 when {
377- nodeLifecycleState.isStarting() -> {
378- BodyM (text = androidx.compose.ui.res.stringResource(R .string.wallet__receive_ldk_init))
379- }
380366 selectedTab == ReceiveTab .SPENDING && cjitActive -> {
381367 BodyS (
382368 text = " CJIT Active" ,
0 commit comments