mirror of
https://github.com/immich-app/immich.git
synced 2025-12-24 09:14:58 +03:00
feat(mobile): enabled DCM (#17957)
* enable DCM in CI * chore: up version * chore: up version --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
committed by
GitHub
parent
16f83c0aa9
commit
b890440f6b
@@ -1,4 +1,3 @@
|
||||
// ignore_for_file: library_private_types_in_public_api
|
||||
// Based on https://stackoverflow.com/a/52625182
|
||||
|
||||
import 'dart:async';
|
||||
@@ -164,7 +163,6 @@ class _CustomLongPressGestureRecognizer extends LongPressGestureRecognizer {
|
||||
}
|
||||
}
|
||||
|
||||
// ignore: prefer-single-widget-per-file
|
||||
class AssetIndexWrapper extends SingleChildRenderObjectWidget {
|
||||
final int rowIndex;
|
||||
final int sectionIndex;
|
||||
@@ -177,6 +175,7 @@ class AssetIndexWrapper extends SingleChildRenderObjectWidget {
|
||||
});
|
||||
|
||||
@override
|
||||
// ignore: library_private_types_in_public_api
|
||||
_AssetIndexProxy createRenderObject(BuildContext context) {
|
||||
return _AssetIndexProxy(
|
||||
index: AssetIndex(rowIndex: rowIndex, sectionIndex: sectionIndex),
|
||||
@@ -186,6 +185,7 @@ class AssetIndexWrapper extends SingleChildRenderObjectWidget {
|
||||
@override
|
||||
void updateRenderObject(
|
||||
BuildContext context,
|
||||
// ignore: library_private_types_in_public_api
|
||||
_AssetIndexProxy renderObject,
|
||||
) {
|
||||
renderObject.index =
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
// ignore_for_file: prefer-single-widget-per-file
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||
|
||||
@@ -80,8 +80,7 @@ class DraggableScrollbar extends StatefulWidget {
|
||||
this.labelTextBuilder,
|
||||
this.labelConstraints,
|
||||
}) : assert(child.scrollDirection == Axis.vertical),
|
||||
scrollThumbBuilder =
|
||||
_thumbRRectBuilder(scrollThumbKey, alwaysVisibleScrollThumb);
|
||||
scrollThumbBuilder = _thumbRRectBuilder(alwaysVisibleScrollThumb);
|
||||
|
||||
DraggableScrollbar.arrows({
|
||||
super.key,
|
||||
@@ -97,8 +96,7 @@ class DraggableScrollbar extends StatefulWidget {
|
||||
this.labelTextBuilder,
|
||||
this.labelConstraints,
|
||||
}) : assert(child.scrollDirection == Axis.vertical),
|
||||
scrollThumbBuilder =
|
||||
_thumbArrowBuilder(scrollThumbKey, alwaysVisibleScrollThumb);
|
||||
scrollThumbBuilder = _thumbArrowBuilder(alwaysVisibleScrollThumb);
|
||||
|
||||
DraggableScrollbar.semicircle({
|
||||
super.key,
|
||||
@@ -201,7 +199,6 @@ class DraggableScrollbar extends StatefulWidget {
|
||||
}
|
||||
|
||||
static ScrollThumbBuilder _thumbArrowBuilder(
|
||||
Key? scrollThumbKey,
|
||||
bool alwaysVisibleScrollThumb,
|
||||
) {
|
||||
return (
|
||||
@@ -239,7 +236,6 @@ class DraggableScrollbar extends StatefulWidget {
|
||||
}
|
||||
|
||||
static ScrollThumbBuilder _thumbRRectBuilder(
|
||||
Key? scrollThumbKey,
|
||||
bool alwaysVisibleScrollThumb,
|
||||
) {
|
||||
return (
|
||||
|
||||
@@ -48,7 +48,7 @@ class ThumbnailImage extends ConsumerWidget {
|
||||
// Assets from response DTOs do not have an isar id, querying which would give us the default autoIncrement id
|
||||
final isFromDto = asset.id == noDbId;
|
||||
|
||||
Widget buildSelectionIcon(Asset asset) {
|
||||
Widget buildSelectionIcon() {
|
||||
if (isSelected) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
@@ -233,7 +233,7 @@ class ThumbnailImage extends ConsumerWidget {
|
||||
padding: const EdgeInsets.all(3.0),
|
||||
child: Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: buildSelectionIcon(asset),
|
||||
child: buildSelectionIcon(),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -235,7 +235,6 @@ class BottomGalleryBar extends ConsumerWidget {
|
||||
|
||||
ref.read(downloadStateProvider.notifier).downloadAsset(
|
||||
asset,
|
||||
context,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ class GalleryAppBar extends ConsumerWidget {
|
||||
}
|
||||
|
||||
handleDownloadAsset() {
|
||||
ref.read(downloadStateProvider.notifier).downloadAsset(asset, context);
|
||||
ref.read(downloadStateProvider.notifier).downloadAsset(asset);
|
||||
}
|
||||
|
||||
handleLocateAsset() async {
|
||||
|
||||
@@ -13,7 +13,8 @@ OctoSet blurHashOrPlaceholder(
|
||||
}) {
|
||||
return OctoSet(
|
||||
placeholderBuilder: blurHashPlaceholderBuilder(blurhash, fit: fit),
|
||||
errorBuilder: blurHashErrorBuilder(blurhash, fit: fit),
|
||||
errorBuilder:
|
||||
blurHashErrorBuilder(blurhash, fit: fit, message: errorMessage),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ mixin HitCornersDetector on PhotoViewControllerDelegate {
|
||||
bool _shouldMoveAxis(
|
||||
HitCorners hitCorners,
|
||||
double mainAxisMove,
|
||||
double crossAxisMove,
|
||||
) {
|
||||
if (mainAxisMove == 0) {
|
||||
return false;
|
||||
@@ -47,17 +46,15 @@ mixin HitCornersDetector on PhotoViewControllerDelegate {
|
||||
bool _shouldMoveX(Offset move) {
|
||||
final hitCornersX = _hitCornersX();
|
||||
final mainAxisMove = move.dx;
|
||||
final crossAxisMove = move.dy;
|
||||
|
||||
return _shouldMoveAxis(hitCornersX, mainAxisMove, crossAxisMove);
|
||||
return _shouldMoveAxis(hitCornersX, mainAxisMove);
|
||||
}
|
||||
|
||||
bool _shouldMoveY(Offset move) {
|
||||
final hitCornersY = _hitCornersY();
|
||||
final mainAxisMove = move.dy;
|
||||
final crossAxisMove = move.dx;
|
||||
|
||||
return _shouldMoveAxis(hitCornersY, mainAxisMove, crossAxisMove);
|
||||
return _shouldMoveAxis(hitCornersY, mainAxisMove);
|
||||
}
|
||||
|
||||
bool shouldMove(Offset move, Axis mainAxis) {
|
||||
|
||||
Reference in New Issue
Block a user