fix(mobile): search page (#13833)

* fix(mobile): search page minor problems

* fix: flashing between search

* restore search size

* remove print statement

* linting
This commit is contained in:
Alex 2024-10-30 14:27:13 -05:00 committed by GitHub
parent 9d75c5b999
commit 318ab756cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 141 additions and 111 deletions

View file

@ -0,0 +1,37 @@
import 'package:collection/collection.dart';
import 'package:immich_mobile/entities/asset.entity.dart';
class SearchResult {
final List<Asset> assets;
final int? nextPage;
SearchResult({
required this.assets,
this.nextPage,
});
SearchResult copyWith({
List<Asset>? assets,
int? nextPage,
}) {
return SearchResult(
assets: assets ?? this.assets,
nextPage: nextPage ?? this.nextPage,
);
}
@override
String toString() => 'SearchResult(assets: $assets, 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;
}