Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Removed: scale state controller - pt2

Muhammed Ayimen20a6113562b6
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 3392282cde..8d66288d3a 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -54,14 +54,14 @@ android {
multiDexEnabled true
}
- // signingConfigs {
- // release {
- // storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : file(System.getenv("SIGNING_KEY_PATH"))
- // keyAlias keystoreProperties['keyAlias'] ? keystoreProperties['keyAlias'] : System.getenv("SIGNING_KEY_ALIAS")
- // keyPassword keystoreProperties['keyPassword'] ? keystoreProperties['keyPassword'] : System.getenv("SIGNING_KEY_PASSWORD")
- // storePassword keystoreProperties['storePassword'] ? keystoreProperties['storePassword'] : System.getenv("SIGNING_STORE_PASSWORD")
- // }
- // }
+ signingConfigs {
+ release {
+ storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : file(System.getenv("SIGNING_KEY_PATH"))
+ keyAlias keystoreProperties['keyAlias'] ? keystoreProperties['keyAlias'] : System.getenv("SIGNING_KEY_ALIAS")
+ keyPassword keystoreProperties['keyPassword'] ? keystoreProperties['keyPassword'] : System.getenv("SIGNING_KEY_PASSWORD")
+ storePassword keystoreProperties['storePassword'] ? keystoreProperties['storePassword'] : System.getenv("SIGNING_STORE_PASSWORD")
+ }
+ }
flavorDimensions "default"
productFlavors {
@@ -84,7 +84,7 @@ android {
buildTypes {
release {
- signingConfig signingConfigs.debug
+ signingConfig signingConfigs.release
}
debug {
applicationIdSuffix '.debug'
diff --git a/lib/ui/viewer/file/zoomable_image.dart b/lib/ui/viewer/file/zoomable_image.dart
index 0165551f50..69f3fc132e 100644
--- a/lib/ui/viewer/file/zoomable_image.dart
+++ b/lib/ui/viewer/file/zoomable_image.dart
@@ -54,8 +54,6 @@ class _ZoomableImageState extends State<ZoomableImage>
bool _loadedLargeThumbnail = false;
bool _loadingFinalImage = false;
bool _loadedFinalImage = false;
- // ValueChanged<PhotoViewScaleState>? _scaleStateChangedCallback;
- final bool _isZooming = false;
PhotoViewController _photoViewController = PhotoViewController();
@override
@@ -63,14 +61,6 @@ class _ZoomableImageState extends State<ZoomableImage>
_photo = widget.photo;
_logger = Logger("ZoomableImage");
_logger.info('initState for ${_photo.generatedID} with tag ${_photo.tag}');
- // _scaleStateChangedCallback = (value) {
- // if (widget.shouldDisableScroll != null) {
- // widget.shouldDisableScroll!(value != PhotoViewScaleState.initial);
- // }
- // _isZooming = value != PhotoViewScaleState.initial;
- // debugPrint("isZooming = $_isZooming, currentState $value");
- // // _logger.info('is reakky zooming $_isZooming with state $value');
- // };
super.initState();
}
@@ -111,21 +101,16 @@ class _ZoomableImageState extends State<ZoomableImage>
content = const EnteLoadingWidget();
}
- final GestureDragUpdateCallback? verticalDragCallback = _isZooming
- ? null
- : (d) => {
- if (!_isZooming)
- {
- if (d.delta.dy > dragSensitivity)
- {
- {Navigator.of(context).pop()},
- }
- else if (d.delta.dy < (dragSensitivity * -1))
- {
- showDetailsSheet(context, widget.photo),
- },
- },
- };
+ verticalDragCallback(d) => {
+ if (d.delta.dy > dragSensitivity)
+ {
+ {Navigator.of(context).pop()},
+ }
+ else if (d.delta.dy < (dragSensitivity * -1))
+ {
+ showDetailsSheet(context, widget.photo),
+ },
+ };
return GestureDetector(
onVerticalDragUpdate: verticalDragCallback,
child: content,
@@ -266,15 +251,14 @@ class _ZoomableImageState extends State<ZoomableImage>
required ImageProvider? previewImageProvider,
required ImageProvider finalImageProvider,
}) async {
- final bool shouldFixPosition = previewImageProvider != null &&
- _isZooming &&
- _photoViewController.scale != null;
+ final bool shouldFixPosition =
+ previewImageProvider != null && _photoViewController.scale != null;
ImageInfo? finalImageInfo;
if (shouldFixPosition) {
if (kDebugMode) {
showToast(
context,
- 'Updating photo scale zooming: $_isZooming and scale: ${_photoViewController.scale}',
+ 'Updating photo scale zooming and scale: ${_photoViewController.scale}',
);
}
final prevImageInfo = await getImageInfo(previewImageProvider);