11package com.flipcash.app.menu.internal
22
33import androidx.compose.foundation.Image
4- import androidx.compose.foundation.background
54import androidx.compose.foundation.interaction.MutableInteractionSource
6- import androidx.compose.foundation.layout.Arrangement
75import androidx.compose.foundation.layout.Box
86import androidx.compose.foundation.layout.PaddingValues
9- import androidx.compose.foundation.layout.Row
10- import androidx.compose.foundation.layout.Spacer
117import androidx.compose.foundation.layout.fillMaxSize
128import androidx.compose.foundation.layout.fillMaxWidth
13- import androidx.compose.foundation.layout.height
149import androidx.compose.foundation.layout.navigationBarsPadding
1510import androidx.compose.foundation.layout.padding
1611import androidx.compose.foundation.layout.requiredHeight
17- import androidx.compose.foundation.layout.size
18- import androidx.compose.foundation.layout.width
19- import androidx.compose.foundation.layout.wrapContentHeight
2012import androidx.compose.foundation.layout.wrapContentWidth
21- import androidx.compose.foundation.lazy.LazyColumn
22- import androidx.compose.foundation.lazy.items
23- import androidx.compose.foundation.lazy.rememberLazyListState
24- import androidx.compose.foundation.shape.CircleShape
25- import androidx.compose.material.Divider
2613import androidx.compose.material.Text
2714import androidx.compose.runtime.Composable
2815import androidx.compose.runtime.getValue
2916import androidx.compose.runtime.remember
3017import androidx.compose.runtime.rememberCoroutineScope
3118import androidx.compose.ui.Alignment
32- import androidx.compose.ui.Alignment.Companion.CenterVertically
3319import androidx.compose.ui.Modifier
34- import androidx.compose.ui.graphics.ColorFilter
3520import androidx.compose.ui.res.painterResource
3621import androidx.compose.ui.res.stringResource
37- import androidx.compose.ui.text.font.FontWeight
3822import androidx.compose.ui.text.style.TextAlign
39- import androidx.compose.ui.unit.dp
4023import androidx.lifecycle.compose.collectAsStateWithLifecycle
4124import com.flipcash.app.menu.MenuList
42- import com.flipcash.app.menu.internal.MenuScreenViewModel.Event
4325import com.flipcash.app.onramp.AddCashRow
4426import com.flipcash.app.updates.LocalAppUpdater
4527import com.flipcash.features.menu.R
@@ -49,7 +31,6 @@ import com.getcode.ui.components.AppBarDefaults
4931import com.getcode.ui.components.AppBarWithTitle
5032import com.getcode.ui.core.noRippleClickable
5133import com.getcode.ui.core.rememberedClickable
52- import com.getcode.ui.core.verticalScrollStateGradient
5334import com.getcode.ui.theme.CodeScaffold
5435import com.getcode.ui.utils.plus
5536import kotlinx.coroutines.launch
@@ -114,18 +95,20 @@ internal fun MenuScreenContent(viewModel: MenuScreenViewModel) {
11495 modifier = Modifier
11596 .fillMaxSize()
11697 .padding(padding),
117- header = {
118- AddCashRow (
119- modifier = Modifier
120- .fillMaxWidth()
121- .padding(
122- horizontal = CodeTheme .dimens.inset,
123- vertical = CodeTheme .dimens.grid.x4,
124- ),
125- onAddCash = { viewModel.dispatchEvent(MenuScreenViewModel .Event .OnAddCashClicked ) },
126- onWithdraw = { viewModel.dispatchEvent(MenuScreenViewModel .Event .OnWithdrawClicked ) },
127- )
128- },
98+ header = if (state.showQuickActions) {
99+ {
100+ AddCashRow (
101+ modifier = Modifier
102+ .fillMaxWidth()
103+ .padding(
104+ horizontal = CodeTheme .dimens.inset,
105+ vertical = CodeTheme .dimens.grid.x4,
106+ ),
107+ onAddCash = { viewModel.dispatchEvent(MenuScreenViewModel .Event .OnAddCashClicked ) },
108+ onWithdraw = { viewModel.dispatchEvent(MenuScreenViewModel .Event .OnWithdrawClicked ) },
109+ )
110+ }
111+ } else null ,
129112 items = state.items,
130113 contentPadding = PaddingValues (top = CodeTheme .dimens.grid.x6),
131114 onItemClick = {
0 commit comments