Skip to content

Commit f86ac81

Browse files
Linked Phone number Icon ✅ (#6)
* Added linked tick * size update * alignment fix
1 parent 680e5e9 commit f86ac81

1 file changed

Lines changed: 42 additions & 9 deletions

File tree

app/src/main/java/com/getcode/view/main/account/AccountHome.kt

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,37 @@
11
package com.getcode.view.main.account
22

3-
import androidx.compose.foundation.*
3+
import androidx.compose.foundation.Image
4+
import androidx.compose.foundation.clickable
45
import androidx.compose.foundation.interaction.MutableInteractionSource
5-
import androidx.compose.foundation.layout.*
6-
import androidx.compose.material.*
7-
import androidx.compose.runtime.*
6+
import androidx.compose.foundation.layout.Arrangement
7+
import androidx.compose.foundation.layout.Box
8+
import androidx.compose.foundation.layout.Column
9+
import androidx.compose.foundation.layout.Row
10+
import androidx.compose.foundation.layout.fillMaxHeight
11+
import androidx.compose.foundation.layout.fillMaxWidth
12+
import androidx.compose.foundation.layout.height
13+
import androidx.compose.foundation.layout.padding
14+
import androidx.compose.foundation.layout.size
15+
import androidx.compose.foundation.layout.width
16+
import androidx.compose.foundation.layout.wrapContentHeight
17+
import androidx.compose.foundation.rememberScrollState
18+
import androidx.compose.foundation.verticalScroll
19+
import androidx.compose.material.Divider
20+
import androidx.compose.material.Icon
21+
import androidx.compose.material.MaterialTheme
22+
import androidx.compose.material.Text
23+
import androidx.compose.material.icons.Icons
24+
import androidx.compose.material.icons.filled.Check
25+
import androidx.compose.runtime.Composable
26+
import androidx.compose.runtime.LaunchedEffect
27+
import androidx.compose.runtime.collectAsState
28+
import androidx.compose.runtime.getValue
29+
import androidx.compose.runtime.remember
30+
import androidx.compose.ui.Alignment
831
import androidx.compose.ui.Alignment.Companion.CenterHorizontally
932
import androidx.compose.ui.Alignment.Companion.CenterVertically
1033
import androidx.compose.ui.Modifier
34+
import androidx.compose.ui.graphics.Color
1135
import androidx.compose.ui.platform.LocalContext
1236
import androidx.compose.ui.res.painterResource
1337
import androidx.compose.ui.res.stringResource
@@ -20,9 +44,9 @@ import com.getcode.App
2044
import com.getcode.BuildConfig
2145
import com.getcode.R
2246
import com.getcode.manager.BottomBarManager
47+
import com.getcode.theme.BrandLight
48+
import com.getcode.theme.White10
2349
import com.getcode.util.getActivity
24-
import com.getcode.theme.*
25-
import timber.log.Timber
2650

2751
@Composable
2852
fun AccountHome(
@@ -142,7 +166,8 @@ fun ListItem(item: AccountMainItem) {
142166
.clickable { item.onClick() }
143167
.padding(vertical = 25.dp, horizontal = 25.dp)
144168
.fillMaxWidth()
145-
.wrapContentHeight()
169+
.wrapContentHeight(),
170+
verticalAlignment = Alignment.CenterVertically
146171
) {
147172
Image(
148173
modifier = Modifier
@@ -166,15 +191,23 @@ fun ListItem(item: AccountMainItem) {
166191
verticalAlignment = CenterVertically,
167192
horizontalArrangement = Arrangement.End
168193
) {
194+
if (isPhoneLinked) {
195+
Icon(
196+
imageVector = Icons.Filled.Check,
197+
tint = Color.Green,
198+
contentDescription = "Linked",
199+
modifier = Modifier.size(15.dp)
200+
)
201+
}
169202
Text(
170203
modifier = Modifier
171-
.padding(start = 7.dp, top = 5.dp),
204+
.padding(start = 5.dp),
172205
text = if (isPhoneLinked) stringResource(id = R.string.title_linked)
173206
else stringResource(id = R.string.title_notLinked),
174207
color = BrandLight,
175208
style = MaterialTheme.typography.caption.copy(
176209
fontSize = 12.sp
177-
)
210+
),
178211
)
179212
}
180213
}

0 commit comments

Comments
 (0)