mirror of
https://github.com/immich-app/immich.git
synced 2026-03-11 20:31:07 -04:00
Search results are replaced with a spinner when loading the next page, which is quite jarring. Search results now remain visible when loading the next page with a spinner at the bottom. The next page also loads sooner, which makes it feel a lot smoother. Co-authored-by: Alex <alex.tran1502@gmail.com>
24 lines
682 B
Dart
24 lines
682 B
Dart
import 'package:collection/collection.dart';
|
|
import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
|
|
|
|
class SearchResult {
|
|
final List<BaseAsset> assets;
|
|
final int? nextPage;
|
|
|
|
const SearchResult({required this.assets, this.nextPage});
|
|
|
|
@override
|
|
String toString() => 'SearchResult(assets: ${assets.length}, nextPage: $nextPage)';
|
|
|
|
@override
|
|
bool operator ==(covariant SearchResult other) {
|
|
if (identical(this, other)) return true;
|
|
final listEquals = const DeepCollectionEquality().equals;
|
|
|
|
return listEquals(other.assets, assets) && other.nextPage == nextPage;
|
|
}
|
|
|
|
@override
|
|
int get hashCode => assets.hashCode ^ nextPage.hashCode;
|
|
}
|