From 2c356ec87f29cd0acbd0db456e808af1e0b55b1b Mon Sep 17 00:00:00 2001 From: martyfuhry Date: Wed, 1 Feb 2023 17:29:32 -0500 Subject: [PATCH] fix(mobile) uses clamping scroll physics on android (#1503) --- .../asset_viewer/views/gallery_viewer.dart | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart b/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart index 2ee580450a..0fde867c5b 100644 --- a/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart +++ b/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart @@ -259,7 +259,7 @@ class GalleryViewerPage extends HookConsumerWidget { ? const NeverScrollableScrollPhysics() // Don't allow paging while scrolled in : (Platform.isIOS ? const BouncingScrollPhysics() // Use bouncing physics for iOS - : const ImmichPageViewScrollPhysics() // Use heavy physics for Android + : const ClampingScrollPhysics() // Use heavy physics for Android ), itemCount: assetList.length, scrollDirection: Axis.horizontal, @@ -349,18 +349,3 @@ class GalleryViewerPage extends HookConsumerWidget { } } -class ImmichPageViewScrollPhysics extends ScrollPhysics { - const ImmichPageViewScrollPhysics({super.parent}); - - @override - ImmichPageViewScrollPhysics applyTo(ScrollPhysics? ancestor) { - return ImmichPageViewScrollPhysics(parent: buildParent(ancestor)!); - } - - @override - SpringDescription get spring => const SpringDescription( - mass: 100, - stiffness: 100, - damping: .90, - ); -}