search: fix order of result merging
During a search, we get the results from oldest --> newest. When we hit the more button, we get the results of the second batch in the same order. However, logically to the first batch everything is older, so we need to prepend it to the result array, not append. msg DB logical ID A 3 5 B 2 4 C 1 3 D 3 2 E 2 1 F 1 0
This commit is contained in:
parent
deeea274da
commit
8204c3481a
@ -354,7 +354,7 @@ const mutations: Mutations = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const results = [...state.messageSearchResults.results, ...value.results];
|
const results = [...value.results, ...state.messageSearchResults.results];
|
||||||
|
|
||||||
state.messageSearchResults = {
|
state.messageSearchResults = {
|
||||||
results,
|
results,
|
||||||
|
Loading…
Reference in New Issue
Block a user