From 32b65fb634e6f0c41a2b8450a0dab7b6a9ad55c7 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Sun, 10 May 2026 23:09:10 +0200 Subject: [PATCH] feat: Disable swipe on calendar view --- lib/src/ui/pages/calendar.dart | 108 +++++++++++++++++---------------- 1 file changed, 57 insertions(+), 51 deletions(-) diff --git a/lib/src/ui/pages/calendar.dart b/lib/src/ui/pages/calendar.dart index b512198..717dd55 100644 --- a/lib/src/ui/pages/calendar.dart +++ b/lib/src/ui/pages/calendar.dart @@ -103,6 +103,7 @@ class CalendarPageState extends State { itemBuilder: (context, index) { final anime = data[day]![index]; return GridItem( + enableDrag: false, child: AnimeCoverImage( url: anime.thumbnailUrl, hero: 'calendar_${anime.id}', @@ -191,58 +192,63 @@ class CalendarPageState extends State { ], ), drawer: getDrawer(context), - body: CustomScrollView( - slivers: [ - // Render all available weekdays - ..._renderWeekdayList( - context, - Weekday.unknown, - airingAnimeMap, - ), - ..._renderWeekdayList( - context, - Weekday.monday, - airingAnimeMap, - ), - ..._renderWeekdayList( - context, - Weekday.tuesday, - airingAnimeMap, - ), - ..._renderWeekdayList( - context, - Weekday.wednesday, - airingAnimeMap, - ), - ..._renderWeekdayList( - context, - Weekday.thursday, - airingAnimeMap, - ), - ..._renderWeekdayList( - context, - Weekday.friday, - airingAnimeMap, - ), - ..._renderWeekdayList( - context, - Weekday.saturday, - airingAnimeMap, - ), - ..._renderWeekdayList( - context, - Weekday.sunday, - airingAnimeMap, - ), - - // Provide a nice bottom padding, while keeping the elastic effect attached - // to the bottom-most edge. - const SliverToBoxAdapter( - child: SizedBox( - height: 16, + body: Padding( + padding: const EdgeInsetsGeometry.symmetric( + horizontal: 12, + ), + child: CustomScrollView( + slivers: [ + // Render all available weekdays + ..._renderWeekdayList( + context, + Weekday.unknown, + airingAnimeMap, ), - ), - ], + ..._renderWeekdayList( + context, + Weekday.monday, + airingAnimeMap, + ), + ..._renderWeekdayList( + context, + Weekday.tuesday, + airingAnimeMap, + ), + ..._renderWeekdayList( + context, + Weekday.wednesday, + airingAnimeMap, + ), + ..._renderWeekdayList( + context, + Weekday.thursday, + airingAnimeMap, + ), + ..._renderWeekdayList( + context, + Weekday.friday, + airingAnimeMap, + ), + ..._renderWeekdayList( + context, + Weekday.saturday, + airingAnimeMap, + ), + ..._renderWeekdayList( + context, + Weekday.sunday, + airingAnimeMap, + ), + + // Provide a nice bottom padding, while keeping the elastic effect attached + // to the bottom-most edge. + const SliverToBoxAdapter( + child: SizedBox( + height: 16, + ), + ), + ], + ), ), ), ),