mirror of
https://github.com/immich-app/immich.git
synced 2025-07-07 09:12:56 +02:00
(fix)mobile: Improve the gallery to improve scale, double tap, and swipe gesture detection (#1502)
* photoviewgallery * stiffer scrolling to react more like google photos * adds a dx threshhold for the swipe/up down from the original dropped point * stopped wrapping imageview in gallery viewer to avoid the double photoview issue. breaks imageview page pinch-to-zoom, so i need to fix that for other callers * refactors gallery view to use remoteimage directly and breaks imageviewpage * removed image_viewer_page * adds minscale * adds photo_view to repository * double tap to zoom out with hacked commit * double tapping! * got up and down swipe gestures working * fixed wrong cache and headers in image providers * fixed image quality and added videos back in * local loading asset image fix * precaches images * fixes lint errors * deleted remote_photo_view and more linters * fixes scale * load preview and load original * precache does original / preview as well * refactored image providers to nice functions and added JPEG thumbnail format to remote image thumbnail lookup * moved photo_view to shared/ui/ * three stage loading with webp and fixes some thumbnail fits * fixed local thumbnail * fixed paging in iOS
This commit is contained in:
parent
391bf052e4
commit
02f5a86ee9
22 changed files with 3460 additions and 448 deletions
mobile/lib/routing
|
@ -48,21 +48,6 @@ class _$AppRouter extends RootStackRouter {
|
|||
child: GalleryViewerPage(
|
||||
key: args.key, assetList: args.assetList, asset: args.asset));
|
||||
},
|
||||
ImageViewerRoute.name: (routeData) {
|
||||
final args = routeData.argsAs<ImageViewerRouteArgs>();
|
||||
return MaterialPageX<dynamic>(
|
||||
routeData: routeData,
|
||||
child: ImageViewerPage(
|
||||
key: args.key,
|
||||
heroTag: args.heroTag,
|
||||
asset: args.asset,
|
||||
authToken: args.authToken,
|
||||
isZoomedFunction: args.isZoomedFunction,
|
||||
isZoomedListener: args.isZoomedListener,
|
||||
loadPreview: args.loadPreview,
|
||||
loadOriginal: args.loadOriginal,
|
||||
showExifSheet: args.showExifSheet));
|
||||
},
|
||||
VideoViewerRoute.name: (routeData) {
|
||||
final args = routeData.argsAs<VideoViewerRouteArgs>();
|
||||
return MaterialPageX<dynamic>(
|
||||
|
@ -204,8 +189,6 @@ class _$AppRouter extends RootStackRouter {
|
|||
]),
|
||||
RouteConfig(GalleryViewerRoute.name,
|
||||
path: '/gallery-viewer-page', guards: [authGuard]),
|
||||
RouteConfig(ImageViewerRoute.name,
|
||||
path: '/image-viewer-page', guards: [authGuard]),
|
||||
RouteConfig(VideoViewerRoute.name,
|
||||
path: '/video-viewer-page', guards: [authGuard]),
|
||||
RouteConfig(BackupControllerRoute.name,
|
||||
|
@ -299,71 +282,6 @@ class GalleryViewerRouteArgs {
|
|||
}
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [ImageViewerPage]
|
||||
class ImageViewerRoute extends PageRouteInfo<ImageViewerRouteArgs> {
|
||||
ImageViewerRoute(
|
||||
{Key? key,
|
||||
required String heroTag,
|
||||
required Asset asset,
|
||||
required String authToken,
|
||||
required void Function() isZoomedFunction,
|
||||
required ValueNotifier<bool> isZoomedListener,
|
||||
required bool loadPreview,
|
||||
required bool loadOriginal,
|
||||
void Function()? showExifSheet})
|
||||
: super(ImageViewerRoute.name,
|
||||
path: '/image-viewer-page',
|
||||
args: ImageViewerRouteArgs(
|
||||
key: key,
|
||||
heroTag: heroTag,
|
||||
asset: asset,
|
||||
authToken: authToken,
|
||||
isZoomedFunction: isZoomedFunction,
|
||||
isZoomedListener: isZoomedListener,
|
||||
loadPreview: loadPreview,
|
||||
loadOriginal: loadOriginal,
|
||||
showExifSheet: showExifSheet));
|
||||
|
||||
static const String name = 'ImageViewerRoute';
|
||||
}
|
||||
|
||||
class ImageViewerRouteArgs {
|
||||
const ImageViewerRouteArgs(
|
||||
{this.key,
|
||||
required this.heroTag,
|
||||
required this.asset,
|
||||
required this.authToken,
|
||||
required this.isZoomedFunction,
|
||||
required this.isZoomedListener,
|
||||
required this.loadPreview,
|
||||
required this.loadOriginal,
|
||||
this.showExifSheet});
|
||||
|
||||
final Key? key;
|
||||
|
||||
final String heroTag;
|
||||
|
||||
final Asset asset;
|
||||
|
||||
final String authToken;
|
||||
|
||||
final void Function() isZoomedFunction;
|
||||
|
||||
final ValueNotifier<bool> isZoomedListener;
|
||||
|
||||
final bool loadPreview;
|
||||
|
||||
final bool loadOriginal;
|
||||
|
||||
final void Function()? showExifSheet;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ImageViewerRouteArgs{key: $key, heroTag: $heroTag, asset: $asset, authToken: $authToken, isZoomedFunction: $isZoomedFunction, isZoomedListener: $isZoomedListener, loadPreview: $loadPreview, loadOriginal: $loadOriginal, showExifSheet: $showExifSheet}';
|
||||
}
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [VideoViewerPage]
|
||||
class VideoViewerRoute extends PageRouteInfo<VideoViewerRouteArgs> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue