mirror of
https://github.com/KevinMidboe/immich.git
synced 2026-01-27 11:36:00 +00:00
Switch to plain fs based caching mechanism
This commit is contained in:
@@ -14,7 +14,7 @@ class AlbumNotifier extends StateNotifier<List<AlbumResponseDto>> {
|
||||
|
||||
getAllAlbums() async {
|
||||
|
||||
if (_albumCacheService.isValid() && state.isEmpty) {
|
||||
if (await _albumCacheService.isValid() && state.isEmpty) {
|
||||
state = await _albumCacheService.get();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/constants/hive_box.dart';
|
||||
import 'package:immich_mobile/modules/home/services/asset_cache.service.dart';
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
class AlbumCacheService extends JsonCache<List<AlbumResponseDto>> {
|
||||
AlbumCacheService() : super(albumListCacheBox, albumListCachedAssets);
|
||||
AlbumCacheService() : super("album_cache");
|
||||
|
||||
@override
|
||||
void put(List<AlbumResponseDto> data) {
|
||||
|
||||
Reference in New Issue
Block a user