Skip to content

Commit

Permalink
Merge pull request #531 from lamarios/fix/remove-horizontal-scroll-on…
Browse files Browse the repository at this point in the history
…-screens

fix #527
  • Loading branch information
lamarios authored Apr 27, 2024
2 parents 72f7b43 + 964af31 commit cbf393e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/channels/views/screens/channel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions lib/home/views/screens/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ class _MainScreenState extends State<MainContentScreen> {
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];
Expand Down
1 change: 1 addition & 0 deletions lib/search/views/screens/search.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class SearchScreen extends StatelessWidget {
builder: (context, state) {
var cubit = context.read<SearchCubit>();
return AutoTabsRouter.tabBar(
physics: const NeverScrollableScrollPhysics(),
routes: const [
SearchVideoRoute(),
SearchChannelRoute(),
Expand Down
3 changes: 2 additions & 1 deletion lib/videos/views/screens/video.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<VideoCubit>().playVideo(false);
},
builder: (context, videoState) {
Expand All @@ -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,
Expand Down

0 comments on commit cbf393e

Please sign in to comment.