1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-25 09:01:22 +02:00
immich/mobile/lib/utils/tuple.dart
Fynn Petersen-Frey 47f5e4134e
feat(mobile): use cached asset info if unchanged instead of downloading all assets (#1017)
* feat(mobile): use cached asset info if unchanged instead of downloading all assets

This adds an HTTP ETag to the getAllAssets endpoint and client-side support in the app.
If locally cache content is identical to the content on the server, the potentially large list of all assets does not need to be downloaded.

* use ts import instead of require
2022-11-26 10:16:02 -06:00

9 lines
190 B
Dart

/// An immutable pair or 2-tuple
/// TODO replace with Record once Dart 2.19 is available
class Pair<T1, T2> {
final T1 first;
final T2 second;
const Pair(this.first, this.second);
}