Skip to content

Commit 5888721

Browse files
committed
feat(discover): enhance source list tile with interactive icon
- Replace TextButton with IconButton for follow/unfollow action - Add visual feedback and tooltips for follow/unfollow status - Adjust tile padding for better consistency with design guidelines
1 parent 98e4e92 commit 5888721

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

lib/discover/view/source_list_page.dart

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,13 @@ class _SourceListTile extends StatelessWidget {
235235
maxLines: 1,
236236
overflow: TextOverflow.ellipsis,
237237
),
238-
trailing: TextButton(
238+
trailing: IconButton(
239+
icon: isFollowing
240+
? Icon(Icons.check_circle, color: theme.colorScheme.primary)
241+
: const Icon(Icons.add_circle_outline),
242+
tooltip: isFollowing
243+
? l10n.unfollowSourceTooltip(source.name)
244+
: l10n.followSourceTooltip(source.name),
239245
onPressed: () {
240246
// If the user is unfollowing, always allow it.
241247
if (isFollowing) {
@@ -262,14 +268,15 @@ class _SourceListTile extends StatelessWidget {
262268
}
263269
}
264270
},
265-
child: Text(
266-
isFollowing ? l10n.unfollowButtonText : l10n.followButtonText,
267-
),
268271
),
269272
onTap: () => context.pushNamed(
270273
Routes.entityDetailsName,
271274
pathParameters: {'type': ContentType.source.name, 'id': source.id},
272275
),
276+
contentPadding: const EdgeInsets.symmetric(
277+
horizontal: AppSpacing.lg,
278+
vertical: AppSpacing.sm,
279+
),
273280
);
274281
}
275282
}

0 commit comments

Comments
 (0)