Skip to content

armgit / ente

Public Imported from GitHub
0

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

Removed: should _shouldDisableScroll parameter from all the file that have called it

Muhammed Ayimen97dfb9170934
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 8d66288d3a..3392282cde 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.release
+ signingConfig signingConfigs.debug
}
debug {
applicationIdSuffix '.debug'
diff --git a/lib/ui/home/memories/full_screen_memory.dart b/lib/ui/home/memories/full_screen_memory.dart
index 12c4d07ce0..8ead1ad699 100644
--- a/lib/ui/home/memories/full_screen_memory.dart
+++ b/lib/ui/home/memories/full_screen_memory.dart
@@ -327,14 +327,6 @@ class _FullScreenMemoryState extends State<FullScreenMemory> {
file,
autoPlay: false,
tagPrefix: "memories",
- shouldDisableScroll: (value) {
- if (value == _shouldDisableScroll) {
- return;
- }
- setState(() {
- _shouldDisableScroll = value;
- });
- },
backgroundDecoration: const BoxDecoration(
color: Colors.transparent,
),
diff --git a/lib/ui/viewer/file/detail_page.dart b/lib/ui/viewer/file/detail_page.dart
index 33f09ea9f6..ea4025dd1d 100644
--- a/lib/ui/viewer/file/detail_page.dart
+++ b/lib/ui/viewer/file/detail_page.dart
@@ -73,7 +73,6 @@ class DetailPage extends StatefulWidget {
class _DetailPageState extends State<DetailPage> {
static const kLoadLimit = 100;
final _logger = Logger("DetailPageState");
- bool _shouldDisableScroll = false;
List<EnteFile>? _files;
late PageController _pageController;
final _selectedIndexNotifier = ValueNotifier(0);
@@ -172,14 +171,6 @@ class _DetailPageState extends State<DetailPage> {
file,
autoPlay: shouldAutoPlay(),
tagPrefix: widget.config.tagPrefix,
- shouldDisableScroll: (value) {
- if (_shouldDisableScroll != value) {
- setState(() {
- _logger.fine('setState $_shouldDisableScroll to $value');
- _shouldDisableScroll = value;
- });
- }
- },
playbackCallback: (isPlaying) {
Future.delayed(Duration.zero, () {
_toggleFullScreen(shouldEnable: isPlaying);
@@ -222,9 +213,7 @@ class _DetailPageState extends State<DetailPage> {
}
_preloadEntries();
},
- physics: _shouldDisableScroll
- ? const NeverScrollableScrollPhysics()
- : const FastScrollPhysics(speedFactor: 4.0),
+ physics: const FastScrollPhysics(speedFactor: 4.0),
controller: _pageController,
itemCount: _files!.length,
);
diff --git a/lib/ui/viewer/file/file_widget.dart b/lib/ui/viewer/file/file_widget.dart
index 6e6dcc7f17..754cb1a678 100644
--- a/lib/ui/viewer/file/file_widget.dart
+++ b/lib/ui/viewer/file/file_widget.dart
@@ -8,7 +8,6 @@ import "package:photos/ui/viewer/file/zoomable_live_image_new.dart";
class FileWidget extends StatelessWidget {
final EnteFile file;
final String? tagPrefix;
- final Function(bool)? shouldDisableScroll;
final Function(bool)? playbackCallback;
final BoxDecoration? backgroundDecoration;
final bool? autoPlay;
@@ -16,7 +15,6 @@ class FileWidget extends StatelessWidget {
const FileWidget(
this.file, {
this.autoPlay,
- this.shouldDisableScroll,
this.playbackCallback,
this.tagPrefix,
this.backgroundDecoration,
@@ -32,7 +30,6 @@ class FileWidget extends StatelessWidget {
file.fileType == FileType.image) {
return ZoomableLiveImageNew(
file,
- shouldDisableScroll: shouldDisableScroll,
tagPrefix: tagPrefix,
backgroundDecoration: backgroundDecoration,
key: key ?? ValueKey(fileKey),
diff --git a/lib/ui/viewer/file/zoomable_image.dart b/lib/ui/viewer/file/zoomable_image.dart
index 9c1b6a821d..12e607927b 100644
--- a/lib/ui/viewer/file/zoomable_image.dart
+++ b/lib/ui/viewer/file/zoomable_image.dart
@@ -26,7 +26,6 @@ import "package:photos/utils/toast_util.dart";
class ZoomableImage extends StatefulWidget {
final EnteFile photo;
- final Function(bool)? shouldDisableScroll;
final String? tagPrefix;
final Decoration? backgroundDecoration;
final bool shouldCover;
@@ -34,7 +33,6 @@ class ZoomableImage extends StatefulWidget {
const ZoomableImage(
this.photo, {
Key? key,
- this.shouldDisableScroll,
required this.tagPrefix,
this.backgroundDecoration,
this.shouldCover = false,
diff --git a/lib/ui/viewer/file/zoomable_live_image.dart b/lib/ui/viewer/file/zoomable_live_image.dart
index f7e2aa55af..28564f673e 100644
--- a/lib/ui/viewer/file/zoomable_live_image.dart
+++ b/lib/ui/viewer/file/zoomable_live_image.dart
@@ -16,14 +16,12 @@ import 'package:video_player/video_player.dart';
class ZoomableLiveImage extends StatefulWidget {
final EnteFile enteFile;
- final Function(bool)? shouldDisableScroll;
final String? tagPrefix;
final Decoration? backgroundDecoration;
const ZoomableLiveImage(
this.enteFile, {
Key? key,
- this.shouldDisableScroll,
required this.tagPrefix,
this.backgroundDecoration,
}) : super(key: key);
@@ -45,8 +43,9 @@ class _ZoomableLiveImageState extends State<ZoomableLiveImage>
@override
void initState() {
_enteFile = widget.enteFile;
- _logger.info('initState for ${_enteFile.generatedID} with tag ${_enteFile
- .tag} and name ${_enteFile.displayName}');
+ _logger.info(
+ 'initState for ${_enteFile.generatedID} with tag ${_enteFile.tag} and name ${_enteFile.displayName}',
+ );
super.initState();
}
@@ -76,7 +75,6 @@ class _ZoomableLiveImageState extends State<ZoomableLiveImage>
content = ZoomableImage(
_enteFile,
tagPrefix: widget.tagPrefix,
- shouldDisableScroll: widget.shouldDisableScroll,
backgroundDecoration: widget.backgroundDecoration,
);
}
@@ -138,7 +136,8 @@ class _ZoomableLiveImageState extends State<ZoomableLiveImage>
}
Future<File?> _getLivePhotoVideo() async {
- if (_enteFile.isRemoteFile && !(await isFileCached(_enteFile, liveVideo: true))) {
+ if (_enteFile.isRemoteFile &&
+ !(await isFileCached(_enteFile, liveVideo: true))) {
showShortToast(context, S.of(context).downloading);
}
@@ -206,5 +205,4 @@ class _ZoomableLiveImageState extends State<ZoomableLiveImage>
}
});
}
-
}
diff --git a/lib/ui/viewer/file/zoomable_live_image_new.dart b/lib/ui/viewer/file/zoomable_live_image_new.dart
index fd4aafc9ba..1ad54660a5 100644
--- a/lib/ui/viewer/file/zoomable_live_image_new.dart
+++ b/lib/ui/viewer/file/zoomable_live_image_new.dart
@@ -16,14 +16,12 @@ import 'package:photos/utils/toast_util.dart';
class ZoomableLiveImageNew extends StatefulWidget {
final EnteFile enteFile;
- final Function(bool)? shouldDisableScroll;
final String? tagPrefix;
final Decoration? backgroundDecoration;
const ZoomableLiveImageNew(
this.enteFile, {
Key? key,
- this.shouldDisableScroll,
required this.tagPrefix,
this.backgroundDecoration,
}) : super(key: key);
@@ -77,7 +75,6 @@ class _ZoomableLiveImageNewState extends State<ZoomableLiveImageNew>
content = ZoomableImage(
_enteFile,
tagPrefix: widget.tagPrefix,
- shouldDisableScroll: widget.shouldDisableScroll,
backgroundDecoration: widget.backgroundDecoration,
);
}