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

Search is done

This commit is contained in:
Zhiyuan Zheng
2020-12-19 01:57:57 +01:00
parent 7491478176
commit 54799aabb8
13 changed files with 250 additions and 109 deletions

View File

@ -77,28 +77,29 @@ export const timelineFetch = async ({
case 'Account_Default':
if (pageParam) {
if (pageParam.direction === 'prev') {
res = await client({
method: 'get',
instance: 'local',
url: `accounts/${account}/statuses`,
params: {
pinned: 'true',
...params
}
})
return Promise.resolve({ toots: res.body })
} else {
res = await client({
method: 'get',
instance: 'local',
url: `accounts/${account}/statuses`,
params: {
exclude_replies: 'true',
...params
}
})
return Promise.resolve({ toots: res.body })
switch (pageParam.direction) {
case 'prev':
res = await client({
method: 'get',
instance: 'local',
url: `accounts/${account}/statuses`,
params: {
pinned: 'true',
...params
}
})
return Promise.resolve({ toots: res.body })
case 'next':
res = await client({
method: 'get',
instance: 'local',
url: `accounts/${account}/statuses`,
params: {
exclude_replies: 'true',
...params
}
})
return Promise.resolve({ toots: res.body })
}
} else {
res = await client({

View File

@ -25,7 +25,8 @@ export const StyleConstants = {
},
Avatar: {
S: 52,
S: 36,
M: 52,
L: 104
}
}