👽 Update the models to match API

This commit is contained in:
2025-12-31 01:43:23 +08:00
parent 3670fe0f10
commit b3ae4ab36f
5 changed files with 75 additions and 73 deletions

View File

@@ -33,7 +33,7 @@ class ApActorListItem extends StatelessWidget {
String _getUsername() {
if (actor.username?.isNotEmpty ?? false) {
return '@${actor.username}';
return '${actor.username}@${actor.instance.domain}';
}
return actor.id;
}
@@ -80,17 +80,19 @@ class ApActorListItem extends StatelessWidget {
Positioned(
right: 0,
bottom: 0,
child: Container(
padding: const EdgeInsets.all(4),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.primary,
shape: BoxShape.circle,
),
child: Icon(
Symbols.public,
size: 12,
color: Theme.of(context).colorScheme.onPrimary,
),
child: CircleAvatar(
backgroundImage: actor.instance.iconUrl != null
? CachedNetworkImageProvider(actor.instance.iconUrl!)
: null,
radius: 8,
backgroundColor: Theme.of(context).colorScheme.primary,
child: actor.instance.iconUrl == null
? Icon(
Symbols.public,
size: 12,
color: Theme.of(context).colorScheme.onPrimary,
)
: null,
),
),
],