feat: Show a little Premium badge next to account that has Bitwarden premium

This commit is contained in:
Artem Chepurnoy 2024-02-16 12:05:34 +02:00
parent 462c13643a
commit e9e1b5333b
No known key found for this signature in database
GPG Key ID: FAC37D0CF674043E
3 changed files with 8 additions and 0 deletions

View File

@ -255,6 +255,7 @@ fun accountListScreenState(
text = it.host,
error = error,
hidden = profile?.hidden == true,
premium = profile?.premium == true,
syncing = syncing,
selecting = selectionMode,
actions = listOf(),

View File

@ -39,6 +39,7 @@ import com.artemchep.keyguard.ui.ExpandedIfNotEmptyForRow
import com.artemchep.keyguard.ui.FlatItemLayout
import com.artemchep.keyguard.ui.FlatItemTextContent
import com.artemchep.keyguard.ui.icons.ChevronIcon
import com.artemchep.keyguard.ui.icons.KeyguardPremium
import com.artemchep.keyguard.ui.icons.SyncIcon
import com.artemchep.keyguard.ui.theme.selectedContainer
@ -92,6 +93,11 @@ fun AccountListItemText(
imageVector = Icons.Outlined.VisibilityOff,
)
}
if (item.premium) {
AvatarBadgeIcon(
imageVector = Icons.Outlined.KeyguardPremium,
)
}
},
)
},

View File

@ -33,6 +33,7 @@ sealed interface AccountItem {
val text: String?,
val error: Boolean = false,
val hidden: Boolean,
val premium: Boolean,
val syncing: Boolean = false,
val selecting: Boolean = false,
val actionNeeded: Boolean,