Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob] Panorama state fix

Neeraj Guptaaf469ac23bd9
diff --git a/mobile/lib/ui/viewer/file/file_bottom_bar.dart b/mobile/lib/ui/viewer/file/file_bottom_bar.dart
index 1f31819118..952d0ad153 100644
--- a/mobile/lib/ui/viewer/file/file_bottom_bar.dart
+++ b/mobile/lib/ui/viewer/file/file_bottom_bar.dart
@@ -44,16 +44,16 @@ class FileBottomBar extends StatefulWidget {
class FileBottomBarState extends State<FileBottomBar> {
final GlobalKey shareButtonKey = GlobalKey();
late bool isPanorama;
- bool _isPanoramaCheckInitiated = false;
+ int? lastFileGenID;
@override
void initState() {
super.initState();
- isPanorama = widget.file.isPanorama() ?? false;
}
@override
Widget build(BuildContext context) {
+ isPanorama = widget.file.isPanorama() ?? false;
_checkPanorama();
return _getBottomBar();
}
@@ -61,10 +61,10 @@ class FileBottomBarState extends State<FileBottomBar> {
// _checkPanorama() method is used to check if the file is a panorama image.
// This handles the case when the the file dims (width and height) are not available.
Future<void> _checkPanorama() async {
- if (_isPanoramaCheckInitiated || widget.file.hasDims) {
+ if (lastFileGenID == widget.file.generatedID) {
return;
}
- _isPanoramaCheckInitiated = true;
+ lastFileGenID = widget.file.generatedID;
final result = await checkIfPanorama(widget.file);
if (mounted && isPanorama == !result) {
isPanorama = result;
diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml
index 8e38a4cca5..cb801f6ef5 100644
--- a/mobile/pubspec.yaml
+++ b/mobile/pubspec.yaml
@@ -12,7 +12,7 @@ description: ente photos application
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
-version: 0.9.10+910
+version: 0.9.11+911
publish_to: none
environment: