mirror of
https://github.com/immich-app/immich.git
synced 2025-11-29 02:19:47 +09:00
refactor(mobile): migrate all Hive boxes to Isar database (#2036)
This commit is contained in:
committed by
GitHub
parent
0616a66b05
commit
eccde8fa07
@@ -1,10 +1,8 @@
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:immich_mobile/shared/models/album.dart';
|
||||
import 'package:immich_mobile/shared/models/asset.dart';
|
||||
import 'package:immich_mobile/shared/models/store.dart';
|
||||
import 'package:openapi/api.dart';
|
||||
|
||||
import '../constants/hive_box.dart';
|
||||
|
||||
String getThumbnailUrl(
|
||||
final Asset asset, {
|
||||
ThumbnailFormat type = ThumbnailFormat.WEBP,
|
||||
@@ -48,8 +46,7 @@ String getAlbumThumbNailCacheKey(
|
||||
}
|
||||
|
||||
String getImageUrl(final Asset asset) {
|
||||
final box = Hive.box(userInfoBox);
|
||||
return '${box.get(serverEndpointKey)}/asset/file/${asset.remoteId}?isThumb=false';
|
||||
return '${Store.get(StoreKey.serverEndpoint)}/asset/file/${asset.remoteId}?isThumb=false';
|
||||
}
|
||||
|
||||
String getImageCacheKey(final Asset asset) {
|
||||
@@ -60,7 +57,5 @@ String _getThumbnailUrl(
|
||||
final String id, {
|
||||
ThumbnailFormat type = ThumbnailFormat.WEBP,
|
||||
}) {
|
||||
final box = Hive.box(userInfoBox);
|
||||
|
||||
return '${box.get(serverEndpointKey)}/asset/thumbnail/$id?format=${type.value}';
|
||||
return '${Store.get(StoreKey.serverEndpoint)}/asset/thumbnail/$id?format=${type.value}';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user