fix(search): sort search results by received date descending #520

Merged
guettlibot merged 6 commits from issue-509-fix-search-result-sorting into main 2026-06-07 02:24:25 +00:00
2 changed files with 2 additions and 4 deletions
Showing only changes of commit cf2bfa383b - Show all commits
@@ -2993,9 +2993,7 @@ class EmailRepositoryImpl implements EmailRepository {
static String _toFtsQuery(String query) {
final words = query
.trim()
.split(RegExp(r'\s+'))
.where((w) => w.isNotEmpty)
.map((w) => w.replaceAll(RegExp(r'[^\w]'), ''))
.split(RegExp(r'[^\w]+'))
.where((w) => w.isNotEmpty)
.toList();
if (words.isEmpty) return '';
+1 -1
View File
@@ -132,7 +132,7 @@ void main() {
tearDown(() => db.close());
test('chaos monkey — random operations do not crash the repository',
() async {
timeout: Timeout.none, () async {
final seedStr = _env('CHAOS_SEED');
final seed = seedStr.isEmpty
? DateTime.now().millisecondsSinceEpoch