From 0dba2a99093134039d3247be2fa6de102090beb8 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Sat, 25 Jul 2026 14:51:39 +0200 Subject: [PATCH] fix: 'Watching with' should only show up for anime --- lib/src/ui/pages/details.dart | 124 +++++++++++++++++----------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/lib/src/ui/pages/details.dart b/lib/src/ui/pages/details.dart index 17d5a03..6aa7eb7 100644 --- a/lib/src/ui/pages/details.dart +++ b/lib/src/ui/pages/details.dart @@ -359,71 +359,71 @@ class DetailsPage extends StatelessWidget { ), ), ),*/ - Padding( - padding: const EdgeInsetsGeometry.symmetric( - vertical: 8, - horizontal: 8, - ), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only( - bottom: 8, - ), - child: Row( - children: [ - Text( - t.details.watchingWith.title, - style: Theme.of( - context, - ).textTheme.titleSmall, - ), - - Padding( - padding: const EdgeInsetsGeometry.only( - left: 4, + if (state.trackingType == TrackingMediumType.anime) + Padding( + padding: const EdgeInsetsGeometry.symmetric( + vertical: 8, + horizontal: 8, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only( + bottom: 8, + ), + child: Row( + children: [ + Text( + t.details.watchingWith.title, + style: Theme.of( + context, + ).textTheme.titleSmall, ), - child: IconButton( - onPressed: () async { - final bloc = context - .read(); - final watchers = await bloc - .getAllAnimeWatchers(); - final result = - await showModalBottomSheet< - AnimeWatcher? - >( - context: context, - builder: (ctx) => - DetailsWatcherSheet( - watchers: watchers, - ), - ); - if (result == null) { - return; - } - // Do not allow adding a watcher twice. - if (state.animeWatchers.any( - (watcher) => - watcher.name == result.name, - )) { - return; - } + Padding( + padding: const EdgeInsetsGeometry.only( + left: 4, + ), + child: IconButton( + onPressed: () async { + final bloc = context + .read(); + final watchers = await bloc + .getAllAnimeWatchers(); + final result = + await showModalBottomSheet< + AnimeWatcher? + >( + context: context, + builder: (ctx) => + DetailsWatcherSheet( + watchers: watchers, + ), + ); + if (result == null) { + return; + } - context.read().add( - AnimeWatcherAddedEvent(result), - ); - }, - icon: const Icon(Icons.add), + // Do not allow adding a watcher twice. + if (state.animeWatchers.any( + (watcher) => + watcher.name == result.name, + )) { + return; + } + + context.read().add( + AnimeWatcherAddedEvent(result), + ); + }, + icon: const Icon(Icons.add), + ), ), - ), - ], + ], + ), ), - ), - if (state.trackingType == TrackingMediumType.anime) if (state.animeWatchers.isNotEmpty) Wrap( children: [ @@ -446,9 +446,9 @@ class DetailsPage extends StatelessWidget { ) else Text(t.details.watchingWith.alone), - ], + ], + ), ), - ), Padding( padding: const EdgeInsets.symmetric( vertical: 8,