High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(mobile): map crashes on Android (#10773)
Alexf23401d911c0
diff --git a/mobile/ios/Podfile.lock b/mobile/ios/Podfile.lockindex 87092a591b..bc79594ee9 100644--- a/mobile/ios/Podfile.lock+++ b/mobile/ios/Podfile.lock@@ -17,9 +17,9 @@ PODS:- fluttertoast (0.0.2):- Flutter- Toast- - FMDB (2.7.11):- - FMDB/standard (= 2.7.11)- - FMDB/standard (2.7.11)+ - FMDB (2.7.5):+ - FMDB/standard (= 2.7.5)+ - FMDB/standard (2.7.5)- geolocator_apple (1.2.0):- Flutter- image_picker_ios (0.0.1):@@ -28,10 +28,10 @@ PODS:- Flutter- isar_flutter_libs (1.0.0):- Flutter- - MapLibre (6.5.0)+ - MapLibre (5.14.0-pre3)- maplibre_gl (0.0.1):- Flutter- - MapLibre (= 6.5.0)+ - MapLibre (= 5.14.0-pre3)- package_info_plus (0.4.5):- Flutter- path_provider_foundation (0.0.1):@@ -44,7 +44,7 @@ PODS:- photo_manager (2.0.0):- Flutter- FlutterMacOS- - ReachabilitySwift (5.2.3)+ - ReachabilitySwift (5.0.0)- SAMKeychain (1.5.3)- share_plus (0.0.1):- Flutter@@ -54,7 +54,7 @@ PODS:- sqflite (0.0.3):- Flutter- FMDB (>= 2.7.5)- - Toast (4.1.1)+ - Toast (4.0.0)- url_launcher_ios (0.0.1):- Flutter- video_player_avfoundation (0.0.1):@@ -156,24 +156,24 @@ SPEC CHECKSUMS:flutter_udid: a2482c67a61b9c806ef59dd82ed8d007f1b7ac04flutter_web_auth: c25208760459cec375a3c39f6a8759165ca0fa4dfluttertoast: 31b00dabfa7fb7bacd9e7dbee580d7a2ff4bf265- FMDB: 57486c1117fd8e0e6b947b2f54c3f42bf8e57a4e+ FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82ageolocator_apple: 9157311f654584b9bb72686c55fc02a97b73f461image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5integration_test: ce0a3ffa1de96d1a89ca0ac26fca7ea18a749ef4isar_flutter_libs: b69f437aeab9c521821c3f376198c4371fa21073- MapLibre: 0ebfa9329d313cec8bf0a5ba5a336a1dc903785e- maplibre_gl: 943a491fffb3337c1b9de57fd377206d18c16e34+ MapLibre: 620fc933c1d6029b33738c905c1490d024e5d4ef+ maplibre_gl: a2efec727dd340e4c65e26d2b03b584f14881fd9package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6photo_manager: 4f6810b7dfc4feb03b461ac1a70dacf91fba7604- ReachabilitySwift: 7f151ff156cea1481a8411701195ac6a984f4979+ ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5cshare_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a- Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e+ Toast: 91b396c56ee72a5790816f40d3a94dd357abc196url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812video_player_avfoundation: 02011213dab73ae3687df27ce441fbbcc82b5579wakelock_plus: 8b09852c8876491e4b6d179e17dfe2a0b5f60d47diff --git a/mobile/lib/extensions/maplibrecontroller_extensions.dart b/mobile/lib/extensions/maplibrecontroller_extensions.dartindex 9636df012c..83074be137 100644--- a/mobile/lib/extensions/maplibrecontroller_extensions.dart+++ b/mobile/lib/extensions/maplibrecontroller_extensions.dart@@ -6,7 +6,7 @@ import 'package:immich_mobile/models/map/map_marker.model.dart';import 'package:immich_mobile/utils/map_utils.dart';import 'package:maplibre_gl/maplibre_gl.dart';-extension MapMarkers on MapLibreMapController {+extension MapMarkers on MaplibreMapController {static var _completer = Completer()..complete();Future<void> addGeoJSONSourceForMarkers(List<MapMarker> markers) async {diff --git a/mobile/lib/pages/search/map/map.page.dart b/mobile/lib/pages/search/map/map.page.dartindex 2bbc151cbe..d226ea55a3 100644--- a/mobile/lib/pages/search/map/map.page.dart+++ b/mobile/lib/pages/search/map/map.page.dart@@ -36,7 +36,7 @@ class MapPage extends HookConsumerWidget {@overrideWidget build(BuildContext context, WidgetRef ref) {- final mapController = useRef<MapLibreMapController?>(null);+ final mapController = useRef<MaplibreMapController?>(null);final markers = useRef<List<MapMarker>>([]);final markersInBounds = useRef<List<MapMarker>>([]);final bottomSheetStreamController = useStreamController<MapEvent>();@@ -156,7 +156,7 @@ class MapPage extends HookConsumerWidget {}}- void onMapCreated(MapLibreMapController controller) async {+ void onMapCreated(MaplibreMapController controller) async {mapController.value = controller;controller.addListener(() {if (controller.isCameraMoving && selectedMarker.value != null) {@@ -379,7 +379,7 @@ class _MapWithMarker extends StatelessWidget {child: Stack(children: [style.widgetWhen(- onData: (style) => MapLibreMap(+ onData: (style) => MaplibreMap(initialCameraPosition:const CameraPosition(target: LatLng(0, 0)),styleString: style,@@ -393,7 +393,7 @@ class _MapWithMarker extends StatelessWidget {tiltGesturesEnabled: false,dragEnabled: false,myLocationEnabled: false,- attributionButtonPosition: AttributionButtonPosition.topRight,+ attributionButtonPosition: AttributionButtonPosition.TopRight,rotateGesturesEnabled: false,),),diff --git a/mobile/lib/pages/search/map/map_location_picker.page.dart b/mobile/lib/pages/search/map/map_location_picker.page.dartindex 1ec6560c6a..db0c980c89 100644--- a/mobile/lib/pages/search/map/map_location_picker.page.dart+++ b/mobile/lib/pages/search/map/map_location_picker.page.dart@@ -24,7 +24,7 @@ class MapLocationPickerPage extends HookConsumerWidget {@overrideWidget build(BuildContext context, WidgetRef ref) {final selectedLatLng = useValueNotifier<LatLng>(initialLatLng);- final controller = useRef<MapLibreMapController?>(null);+ final controller = useRef<MaplibreMapController?>(null);final marker = useRef<Symbol?>(null);Future<void> onStyleLoaded() async {@@ -74,7 +74,7 @@ class MapLocationPickerPage extends HookConsumerWidget {bottomRight: Radius.circular(40),),),- child: MapLibreMap(+ child: MaplibreMap(initialCameraPosition:CameraPosition(target: initialLatLng, zoom: 12),styleString: style,diff --git a/mobile/lib/providers/search/search_page_state.provider.dart b/mobile/lib/providers/search/search_page_state.provider.dartindex f3409c33d1..d0e3720c0f 100644--- a/mobile/lib/providers/search/search_page_state.provider.dart+++ b/mobile/lib/providers/search/search_page_state.provider.dart@@ -41,7 +41,7 @@ final getAllPlacesProvider =final curatedContent = assetPlaces.map((data) => SearchCuratedContent(- label: data.exifInfo?.city ?? '',+ label: data.exifInfo!.city!,id: data.id,),)diff --git a/mobile/lib/widgets/map/map_thumbnail.dart b/mobile/lib/widgets/map/map_thumbnail.dartindex 6e0e9ac339..d02c016791 100644--- a/mobile/lib/widgets/map/map_thumbnail.dart+++ b/mobile/lib/widgets/map/map_thumbnail.dart@@ -41,10 +41,10 @@ class MapThumbnail extends HookConsumerWidget {@overrideWidget build(BuildContext context, WidgetRef ref) {final offsettedCentre = LatLng(centre.latitude + 0.002, centre.longitude);- final controller = useRef<MapLibreMapController?>(null);+ final controller = useRef<MaplibreMapController?>(null);final position = useValueNotifier<Point<num>?>(null);- Future<void> onMapCreated(MapLibreMapController mapController) async {+ Future<void> onMapCreated(MaplibreMapController mapController) async {controller.value = mapController;if (assetMarkerRemoteId != null) {// The iOS impl returns wrong toScreenLocation without the delay@@ -73,7 +73,7 @@ class MapThumbnail extends HookConsumerWidget {alignment: Alignment.center,children: [style.widgetWhen(- onData: (style) => MapLibreMap(+ onData: (style) => MaplibreMap(initialCameraPosition:CameraPosition(target: offsettedCentre, zoom: zoom),styleString: style,diff --git a/mobile/pubspec.lock b/mobile/pubspec.lockindex 8bf94d0da8..2804dd50a9 100644--- a/mobile/pubspec.lock+++ b/mobile/pubspec.lock@@ -911,27 +911,30 @@ packages:maplibre_gl:dependency: "direct main"description:- name: maplibre_gl- sha256: ea2fa443e7d5dc18db7f37a0f6f5af40642888c56b81a14441aeddea077adaea- url: "https://pub.dev"- source: hosted- version: "0.20.0"+ path: "."+ ref: acb428a005efd9832a0a8e7ef0945f899dfb3ca5+ resolved-ref: acb428a005efd9832a0a8e7ef0945f899dfb3ca5+ url: "https://github.com/maplibre/flutter-maplibre-gl.git"+ source: git+ version: "0.18.0"maplibre_gl_platform_interface:dependency: transitivedescription:- name: maplibre_gl_platform_interface- sha256: "718c3503f36936fbf35c34d6ddf8bf770474c5ba1e6cb1d8caece44efae424af"- url: "https://pub.dev"- source: hosted- version: "0.20.0"+ path: maplibre_gl_platform_interface+ ref: main+ resolved-ref: acb428a005efd9832a0a8e7ef0945f899dfb3ca5+ url: "https://github.com/maplibre/flutter-maplibre-gl.git"+ source: git+ version: "0.18.0"maplibre_gl_web:dependency: transitivedescription:- name: maplibre_gl_web- sha256: e7d71b08f24dca70e9c9cf841b096704a677e6239447d87220ec071355768149- url: "https://pub.dev"- source: hosted- version: "0.20.0"+ path: maplibre_gl_web+ ref: main+ resolved-ref: acb428a005efd9832a0a8e7ef0945f899dfb3ca5+ url: "https://github.com/maplibre/flutter-maplibre-gl.git"+ source: git+ version: "0.18.0"matcher:dependency: transitivedescription:diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yamlindex a56eb55174..f11933575c 100644--- a/mobile/pubspec.yaml+++ b/mobile/pubspec.yaml@@ -28,7 +28,11 @@ dependencies:video_player: ^2.8.2chewie: ^1.7.4socket_io_client: ^2.0.3+1- maplibre_gl: ^0.20.0+ # TODO: Update it to tag once next stable release+ maplibre_gl:+ git:+ url: https://github.com/maplibre/flutter-maplibre-gl.git+ ref: acb428a005efd9832a0a8e7ef0945f899dfb3ca5geolocator: ^11.0.0 # used to move to current location in map viewflutter_udid: ^3.0.0flutter_svg: ^2.0.9