Remove avatar-less mode for OATH

This commit is contained in:
Dain Nilsson 2024-01-25 15:08:43 +01:00
parent 561abb30ed
commit 2de557324f
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8

View File

@ -78,9 +78,6 @@ class _AccountViewState extends ConsumerState<AccountView> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final hasFeature = ref.watch(featureProvider); final hasFeature = ref.watch(featureProvider);
final helper = AccountHelper(context, ref, credential); final helper = AccountHelper(context, ref, credential);
return LayoutBuilder(builder: (context, constraints) {
final showAvatar = constraints.maxWidth >= 340;
final subtitle = helper.subtitle; final subtitle = helper.subtitle;
final circleAvatar = CircleAvatar( final circleAvatar = CircleAvatar(
foregroundColor: Theme.of(context).colorScheme.background, foregroundColor: Theme.of(context).colorScheme.background,
@ -97,10 +94,8 @@ class _AccountViewState extends ConsumerState<AccountView> {
return AppListItem<OathCredential>( return AppListItem<OathCredential>(
credential, credential,
selected: widget.selected, selected: widget.selected,
leading: showAvatar leading:
? AccountIcon( AccountIcon(issuer: credential.issuer, defaultWidget: circleAvatar),
issuer: credential.issuer, defaultWidget: circleAvatar)
: null,
title: helper.title, title: helper.title,
subtitle: subtitle, subtitle: subtitle,
semanticTitle: _a11yCredentialLabel( semanticTitle: _a11yCredentialLabel(
@ -122,6 +117,5 @@ class _AccountViewState extends ConsumerState<AccountView> {
: null, : null,
buildPopupActions: (_) => helper.buildActions(), buildPopupActions: (_) => helper.buildActions(),
); );
});
} }
} }