fixed os global search query

This commit is contained in:
Thibault Deckers 2022-04-20 21:59:06 +09:00
parent c5a0b7a149
commit 2ca6447c1e

View file

@ -220,8 +220,8 @@ class SqfliteMetadataDb implements MetadataDb {
Future<Set<AvesEntry>> searchLiveEntries(String query, {int? limit}) async { Future<Set<AvesEntry>> searchLiveEntries(String query, {int? limit}) async {
final rows = await _db.query( final rows = await _db.query(
entryTable, entryTable,
where: 'title LIKE ? AND trashed = ?', where: '(title LIKE ? OR path LIKE ?) AND trashed = ?',
whereArgs: ['%$query%', 0], whereArgs: ['%$query%', '%$query%', 0],
orderBy: 'sourceDateTakenMillis DESC', orderBy: 'sourceDateTakenMillis DESC',
limit: limit, limit: limit,
); );