From 964af3157e98922d9d9b8875188caf1f3cb704c8 Mon Sep 17 00:00:00 2001 From: nixos script Date: Sat, 20 Apr 2024 14:26:26 +0800 Subject: [PATCH] fix #527 --- lib/channels/views/screens/channel.dart | 1 + lib/home/views/screens/home.dart | 1 + lib/search/views/screens/search.dart | 1 + lib/videos/views/screens/video.dart | 3 ++- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/channels/views/screens/channel.dart b/lib/channels/views/screens/channel.dart index 304c16d9..e877a03c 100644 --- a/lib/channels/views/screens/channel.dart +++ b/lib/channels/views/screens/channel.dart @@ -28,6 +28,7 @@ class ChannelScreen extends StatelessWidget { var deviceType = getDeviceType(); return AutoTabsRouter.tabBar( key: ValueKey(channelState.channel), + physics: const NeverScrollableScrollPhysics(), routes: [ ChannelInfoRoute(channel: channelState.channel), ChannelVideoRoute(channel: channelState.channel), diff --git a/lib/home/views/screens/home.dart b/lib/home/views/screens/home.dart index 099ee597..65506622 100644 --- a/lib/home/views/screens/home.dart +++ b/lib/home/views/screens/home.dart @@ -128,6 +128,7 @@ class _MainScreenState extends State { key: ValueKey(appState.server?.url), homeIndex: selectedIndex, routes: allowedPages.map((e) => e.route!).toList(), + physics: const NeverScrollableScrollPhysics(), builder: (context, child, controller) { final tabsRouter = AutoTabsRouter.of(context); final selectedPage = allowedPages[tabsRouter.activeIndex]; diff --git a/lib/search/views/screens/search.dart b/lib/search/views/screens/search.dart index c74acaad..a72b59ea 100644 --- a/lib/search/views/screens/search.dart +++ b/lib/search/views/screens/search.dart @@ -35,6 +35,7 @@ class SearchScreen extends StatelessWidget { builder: (context, state) { var cubit = context.read(); return AutoTabsRouter.tabBar( + physics: const NeverScrollableScrollPhysics(), routes: const [ SearchVideoRoute(), SearchChannelRoute(), diff --git a/lib/videos/views/screens/video.dart b/lib/videos/views/screens/video.dart index 1c431fa5..6dd0d551 100644 --- a/lib/videos/views/screens/video.dart +++ b/lib/videos/views/screens/video.dart @@ -93,7 +93,7 @@ class VideoScreen extends StatelessWidget { settings.state.autoplayVideoOnLoad && previous.video != current.video, listener: (context, state) { - AutoRouter.of(context).pop(); + AutoRouter.of(context).maybePop(); context.read().playVideo(false); }, builder: (context, videoState) { @@ -117,6 +117,7 @@ class VideoScreen extends StatelessWidget { opacity: videoState.opacity, child: AutoTabsRouter.tabBar( key: ValueKey(videoState.video), + physics: const NeverScrollableScrollPhysics(), routes: [ VideoInfoRoute( video: videoState.video,