mirror of
https://github.com/ente-io/ente.git
synced 2025-08-08 15:30:40 +00:00
[mob] Switch to list for maintaining order
This commit is contained in:
parent
2c4dd13ab0
commit
9c1f744f73
@ -178,7 +178,7 @@ class SemanticSearchService {
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<Set<int>> getMatchingFileIDs(
|
Future<List<int>> getMatchingFileIDs(
|
||||||
String query,
|
String query,
|
||||||
double minimumSimilarity,
|
double minimumSimilarity,
|
||||||
) async {
|
) async {
|
||||||
@ -187,7 +187,7 @@ class SemanticSearchService {
|
|||||||
textEmbedding,
|
textEmbedding,
|
||||||
minimumSimilarity: minimumSimilarity,
|
minimumSimilarity: minimumSimilarity,
|
||||||
);
|
);
|
||||||
final result = <int>{};
|
final result = <int>[];
|
||||||
for (final r in queryResults) {
|
for (final r in queryResults) {
|
||||||
result.add(r.id);
|
result.add(r.id);
|
||||||
}
|
}
|
||||||
|
@ -25,13 +25,13 @@ import "package:shared_preferences/shared_preferences.dart";
|
|||||||
|
|
||||||
class MagicCache {
|
class MagicCache {
|
||||||
final String title;
|
final String title;
|
||||||
final Set<int> fileUploadedIDs;
|
final List<int> fileUploadedIDs;
|
||||||
MagicCache(this.title, this.fileUploadedIDs);
|
MagicCache(this.title, this.fileUploadedIDs);
|
||||||
|
|
||||||
factory MagicCache.fromJson(Map<String, dynamic> json) {
|
factory MagicCache.fromJson(Map<String, dynamic> json) {
|
||||||
return MagicCache(
|
return MagicCache(
|
||||||
json['title'],
|
json['title'],
|
||||||
Set<int>.from(json['fileUploadedIDs']),
|
List<int>.from(json['fileUploadedIDs']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user