[PR #4045] [MERGED] feat(mobile): use map settings from server-config #10219

Closed
opened 2026-02-05 14:18:01 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/4045
Author: @shenlong-tanwen
Created: 9/10/2023
Status: Merged
Merged: 9/28/2023
Merged by: @alextran1502

Base: mainHead: feat/server-config-mobile


📝 Commits (2)

  • 89ab936 feat(mobile): use map settings from server-config to enable / disable map
  • b122062 refactor(mobile): remove async await for server info update

📊 Changes

8 files changed (+113 additions, -12 deletions)

View changed files

📝 mobile/lib/modules/home/views/home_page.dart (+1 -1)
📝 mobile/lib/modules/map/ui/map_thumbnail.dart (+4 -2)
📝 mobile/lib/modules/map/views/map_page.dart (+4 -2)
📝 mobile/lib/modules/search/ui/curated_places_row.dart (+27 -5)
📝 mobile/lib/modules/search/views/search_page.dart (+4 -0)
📝 mobile/lib/shared/models/server_info_state.model.dart (+13 -1)
📝 mobile/lib/shared/providers/server_info.provider.dart (+41 -0)
📝 mobile/lib/shared/services/server_info.service.dart (+19 -1)

📄 Description

Changes made in this PR

  • Read and store server features and config data in ServerInfoState
  • Enable / Disable map view based on the value from server features
  • Use the map tile url from server config

How was this tested

  • Disable map from web console and ensured that "Your places" thumbnail is removed from curated places
  • Enabled map from web console and ensured that "Your places" gets added back
  • Change map tile url in web and ensured that the new tile URL is used by the mobile app as well
Note:
  • Different map tile URLs have different max zoom level and we might have to probably handle that as a map setting as well.
  • Map page attribution is static for now. It has to be updated based on the tile url or not show it at all if the default tile is not used
  • Server features and Server config data are only fetched on app opening and are reloaded only when the app is restarted. Once we start using websockets for pushing server config, we can update the store in mobile devices using that as well

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/4045 **Author:** [@shenlong-tanwen](https://github.com/shenlong-tanwen) **Created:** 9/10/2023 **Status:** ✅ Merged **Merged:** 9/28/2023 **Merged by:** [@alextran1502](https://github.com/alextran1502) **Base:** `main` ← **Head:** `feat/server-config-mobile` --- ### 📝 Commits (2) - [`89ab936`](https://github.com/immich-app/immich/commit/89ab936450770627013d925c50834d3ecc16cd74) feat(mobile): use map settings from server-config to enable / disable map - [`b122062`](https://github.com/immich-app/immich/commit/b122062b0d0c55bc6125f62fc8a830e210bad810) refactor(mobile): remove async await for server info update ### 📊 Changes **8 files changed** (+113 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `mobile/lib/modules/home/views/home_page.dart` (+1 -1) 📝 `mobile/lib/modules/map/ui/map_thumbnail.dart` (+4 -2) 📝 `mobile/lib/modules/map/views/map_page.dart` (+4 -2) 📝 `mobile/lib/modules/search/ui/curated_places_row.dart` (+27 -5) 📝 `mobile/lib/modules/search/views/search_page.dart` (+4 -0) 📝 `mobile/lib/shared/models/server_info_state.model.dart` (+13 -1) 📝 `mobile/lib/shared/providers/server_info.provider.dart` (+41 -0) 📝 `mobile/lib/shared/services/server_info.service.dart` (+19 -1) </details> ### 📄 Description ### Changes made in this PR - Read and store server features and config data in ServerInfoState - Enable / Disable map view based on the value from server features - Use the map tile url from server config ### How was this tested - Disable map from web console and ensured that "Your places" thumbnail is removed from curated places - Enabled map from web console and ensured that "Your places" gets added back - Change map tile url in web and ensured that the new tile URL is used by the mobile app as well ##### Note: - Different map tile URLs have different max zoom level and we might have to probably handle that as a map setting as well. - Map page attribution is static for now. It has to be updated based on the tile url or not show it at all if the default tile is not used - Server features and Server config data are only fetched on app opening and are reloaded only when the app is restarted. Once we start using websockets for pushing server config, we can update the store in mobile devices using that as well --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 14:18:01 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#10219