From 80ad9a2a3bd62c5e4e701da9d69030fa4cd4d7a4 Mon Sep 17 00:00:00 2001 From: Simon Ding Date: Mon, 10 Feb 2025 11:22:25 +0800 Subject: [PATCH] feat: horizontal scroll, fix #11 --- ui/lib/widgets/resource_list.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/lib/widgets/resource_list.dart b/ui/lib/widgets/resource_list.dart index a944505..1bb77f8 100644 --- a/ui/lib/widgets/resource_list.dart +++ b/ui/lib/widgets/resource_list.dart @@ -23,7 +23,7 @@ class ResourceList extends ConsumerWidget { seasonNumber: seasonNum, episodeNumber: episodeNum ))); - return torrents.when( + var widgets = torrents.when( data: (v) { bool hasPrivate = false; for (final item in v) { @@ -83,5 +83,9 @@ class ResourceList extends ConsumerWidget { : Text("$err"); }, loading: () => const MyProgressIndicator()); + return isSmallScreen(context) + ? SingleChildScrollView( + scrollDirection: Axis.horizontal, child: widgets) + : widgets; } }