1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Keep previous tab for next load

This commit is contained in:
Zhiyuan Zheng
2021-02-11 23:42:13 +01:00
parent 313b7af4a8
commit 3303864394
4 changed files with 39 additions and 12 deletions

View File

@ -70,7 +70,7 @@ const queryFunction = ({
})
case 'Account_Default':
if (pageParam && pageParam.pointer === 'max_id') {
if (pageParam && pageParam.hasOwnProperty('max_id')) {
return client<Mastodon.Status[]>({
method: 'get',
instance: 'local',
@ -101,7 +101,7 @@ const queryFunction = ({
})
return {
body: uniqBy([...res1.body, ...res2.body], 'id'),
...(res2.links.next && { links: { max_id: res2.links.next } }),
...(res2.links.next && { links: { next: res2.links.next } }),
pinned
}
})