mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(mobile): lazy loading of assets (#2413)
This commit is contained in:
parent
93863b0629
commit
0dde76bbbc
54 changed files with 1494 additions and 2328 deletions
|
|
@ -35,6 +35,10 @@ class Store {
|
|||
return value;
|
||||
}
|
||||
|
||||
/// Watches a specific key for changes
|
||||
static Stream<T?> watch<T>(StoreKey<T> key) =>
|
||||
_db.storeValues.watchObject(key.id).map((e) => e?._extract(key));
|
||||
|
||||
/// Returns the stored value for the given key (possibly null)
|
||||
static T? tryGet<T>(StoreKey<T> key) => _cache[key.id];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue