server: sort catchup ids by timestamp across all sources
This commit is contained in:
parent
e1a502ac4b
commit
9bf53afebf
@ -331,10 +331,15 @@ impl QueryRoot {
|
||||
notmuch_results.len(),
|
||||
);
|
||||
|
||||
let results: Vec<_> = newsreader_results
|
||||
let mut results: Vec<_> = newsreader_results
|
||||
.into_iter()
|
||||
.chain(notmuch_results)
|
||||
.collect();
|
||||
// The leading '-' is to reverse sort
|
||||
results.sort_by_key(|item| match item {
|
||||
ThreadSummaryCursor::Newsreader(_, ts) => -ts.timestamp,
|
||||
ThreadSummaryCursor::Notmuch(_, ts) => -ts.timestamp,
|
||||
});
|
||||
let ids = results
|
||||
.into_iter()
|
||||
.map(|r| match r {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user