more refactors and logs page handling
This commit is contained in:
+3
-3
@@ -49,12 +49,12 @@ class ImLocalImageProvider extends ImageProvider<ImLocalImageProvider> {
|
||||
// Load a small thumbnail
|
||||
final thumbBytes =
|
||||
await di<IDeviceAssetRepository>().getThumbnail(a.localId!);
|
||||
if (thumbBytes != null) {
|
||||
if (thumbBytes == null) {
|
||||
debugPrint("Loading thumb for ${a.name} failed");
|
||||
} else {
|
||||
final buffer = await ui.ImmutableBuffer.fromUint8List(thumbBytes);
|
||||
final codec = await decode(buffer);
|
||||
yield codec;
|
||||
} else {
|
||||
debugPrint("Loading thumb for ${a.name} failed");
|
||||
}
|
||||
|
||||
if (asset.isImage) {
|
||||
|
||||
+3
-3
@@ -56,12 +56,12 @@ class ImLocalThumbnailProvider extends ImageProvider<ImLocalThumbnailProvider> {
|
||||
// Load a small thumbnail
|
||||
final thumbBytes = await di<IDeviceAssetRepository>()
|
||||
.getThumbnail(a.localId!, width: 32, height: 32, quality: 75);
|
||||
if (thumbBytes != null) {
|
||||
if (thumbBytes == null) {
|
||||
debugPrint("Loading thumb for ${a.name} failed");
|
||||
} else {
|
||||
final buffer = await ui.ImmutableBuffer.fromUint8List(thumbBytes);
|
||||
final codec = await decode(buffer);
|
||||
yield codec;
|
||||
} else {
|
||||
debugPrint("Loading thumb for ${a.name} failed");
|
||||
}
|
||||
|
||||
final normalThumbBytes = await di<IDeviceAssetRepository>()
|
||||
|
||||
Reference in New Issue
Block a user