feat(mobile): deep links (#19232)

* add deep linking on ios app

* add deeplinking to android

* code review fixes

* lint

* cleanly handle malformed URIs when launching app

* refactor deep link builder/service, still have bug with navigation stack not containing TabControllerRoute

* fix: tab controller insertion conditions

* add my.immich.app app linking

* chore: remove one-liner if statement

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
Brandon Wees
2025-06-24 09:20:24 -05:00
committed by GitHub
parent c759233d8c
commit 7d0e8f50f7
14 changed files with 251 additions and 5 deletions
+30
View File
@@ -59,4 +59,34 @@ class MemoryService {
return null;
}
}
Future<Memory?> getMemoryById(String id) async {
try {
final memoryResponse = await _apiService.memoriesApi.getMemory(id);
if (memoryResponse == null) {
return null;
}
final dbAssets = await _assetRepository
.getAllByRemoteId(memoryResponse.assets.map((e) => e.id));
if (dbAssets.isEmpty) {
log.warning("No assets found for memory with ID: $id");
return null;
}
final yearsAgo = DateTime.now().year - memoryResponse.data.year;
final String title = 'years_ago'.t(
args: {
'years': yearsAgo.toString(),
},
);
return Memory(
title: title,
assets: dbAssets,
);
} catch (error, stack) {
log.severe("Cannot get memory with ID: $id", error, stack);
return null;
}
}
}