Skip to content

Commit af4fffa

Browse files
committed
feat(login): mark accounts with the app's checked/unchecked circle
The rows used a bare tick on the current account only. They now use the ic_checked/ic_unchecked pair the region, token and group-invite pickers use, which matches iOS's CheckView.
1 parent 038af2a commit af4fffa

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

  • apps/flipcash/features/login/src/main/kotlin/com/flipcash/app/login/internal/accounts

‎apps/flipcash/features/login/src/main/kotlin/com/flipcash/app/login/internal/accounts/AccountRow.kt‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.flipcash.app.login.internal.accounts
22

33
import androidx.compose.foundation.ExperimentalFoundationApi
4+
import androidx.compose.foundation.Image
45
import androidx.compose.foundation.combinedClickable
56
import androidx.compose.foundation.layout.Arrangement
67
import androidx.compose.foundation.layout.Box
@@ -10,13 +11,10 @@ import androidx.compose.foundation.layout.fillMaxWidth
1011
import androidx.compose.foundation.layout.padding
1112
import androidx.compose.foundation.layout.size
1213
import androidx.compose.material.Text
13-
import androidx.compose.material.icons.Icons
14-
import androidx.compose.material.icons.filled.Check
15-
import androidx.compose.material3.Icon
1614
import androidx.compose.runtime.Composable
1715
import androidx.compose.ui.Alignment
1816
import androidx.compose.ui.Modifier
19-
import androidx.compose.ui.graphics.Color
17+
import androidx.compose.ui.res.painterResource
2018
import androidx.compose.ui.res.stringResource
2119
import androidx.compose.ui.text.style.TextOverflow
2220
import androidx.compose.ui.unit.dp
@@ -46,17 +44,16 @@ internal fun AccountRow(
4644
verticalAlignment = Alignment.CenterVertically,
4745
horizontalArrangement = Arrangement.spacedBy(CodeTheme.dimens.grid.x3),
4846
) {
49-
// The tick is laid out for every row so the names line up; it is only drawn, and only
50-
// announced, for the account the user is signed into.
51-
Icon(
52-
modifier = Modifier.size(CodeTheme.dimens.grid.x4),
53-
imageVector = Icons.Default.Check,
47+
// The same mark as the region, token and group-invite pickers.
48+
Image(
49+
painter = painterResource(
50+
if (isCurrent) R.drawable.ic_checked else R.drawable.ic_unchecked
51+
),
5452
contentDescription = if (isCurrent) {
5553
stringResource(R.string.subtitle_currentAccount)
5654
} else {
5755
null
5856
},
59-
tint = if (isCurrent) CodeTheme.colors.textMain else Color.Transparent,
6057
)
6158

6259
Column(
@@ -115,3 +112,4 @@ internal fun AccountRow(
115112
}
116113
}
117114
}
115+

0 commit comments

Comments
 (0)