mirror of
https://github.com/immich-app/immich.git
synced 2025-01-16 16:56:46 +01:00
Fixes an issue where thumbnails fail to load if too many thumbnail requests are made simultaenously
This commit is contained in:
parent
4532db552e
commit
ef2f605635
2 changed files with 8 additions and 4 deletions
|
@ -13,7 +13,9 @@ import 'package:immich_mobile/shared/models/store.dart';
|
||||||
import 'package:immich_mobile/utils/image_url_builder.dart';
|
import 'package:immich_mobile/utils/image_url_builder.dart';
|
||||||
|
|
||||||
/// Our Image Provider HTTP client to make the request
|
/// Our Image Provider HTTP client to make the request
|
||||||
final _httpClient = HttpClient()..autoUncompress = false;
|
final _httpClient = HttpClient()
|
||||||
|
..autoUncompress = false
|
||||||
|
..maxConnectionsPerHost = 10;
|
||||||
|
|
||||||
/// The remote image provider
|
/// The remote image provider
|
||||||
class ImmichRemoteImageProvider
|
class ImmichRemoteImageProvider
|
||||||
|
|
|
@ -12,15 +12,17 @@ import 'package:immich_mobile/shared/models/asset.dart';
|
||||||
import 'package:immich_mobile/shared/models/store.dart';
|
import 'package:immich_mobile/shared/models/store.dart';
|
||||||
import 'package:immich_mobile/utils/image_url_builder.dart';
|
import 'package:immich_mobile/utils/image_url_builder.dart';
|
||||||
|
|
||||||
|
/// Our HTTP client to make the request
|
||||||
|
final _httpClient = HttpClient()
|
||||||
|
..autoUncompress = false
|
||||||
|
..maxConnectionsPerHost = 100;
|
||||||
|
|
||||||
/// The remote image provider
|
/// The remote image provider
|
||||||
class ImmichRemoteThumbnailProvider
|
class ImmichRemoteThumbnailProvider
|
||||||
extends ImageProvider<ImmichRemoteThumbnailProvider> {
|
extends ImageProvider<ImmichRemoteThumbnailProvider> {
|
||||||
/// The [Asset.remoteId] of the asset to fetch
|
/// The [Asset.remoteId] of the asset to fetch
|
||||||
final String assetId;
|
final String assetId;
|
||||||
|
|
||||||
/// Our HTTP client to make the request
|
|
||||||
final _httpClient = HttpClient()..autoUncompress = false;
|
|
||||||
|
|
||||||
ImmichRemoteThumbnailProvider({
|
ImmichRemoteThumbnailProvider({
|
||||||
required this.assetId,
|
required this.assetId,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue