refactor and unify how query strings are formed
This commit is contained in:
parent
c062ae66e3
commit
bd06c8801a
7 changed files with 263 additions and 146 deletions
|
|
@ -41,7 +41,7 @@ const fetchAndUpdate = ({
|
|||
bookmarkFolderId = false,
|
||||
tag = false,
|
||||
until,
|
||||
since,
|
||||
sinceId,
|
||||
}) => {
|
||||
const args = { timeline, credentials }
|
||||
const rootState = store.rootState || store.state
|
||||
|
|
@ -53,10 +53,10 @@ const fetchAndUpdate = ({
|
|||
if (older) {
|
||||
args.until = until || timelineData.minId
|
||||
} else {
|
||||
if (since === undefined) {
|
||||
args.since = timelineData.maxId
|
||||
} else if (since !== null) {
|
||||
args.since = since
|
||||
if (sinceId === undefined) {
|
||||
args.sinceId = timelineData.maxId
|
||||
} else if (sinceId !== null) {
|
||||
args.sinceId = sinceId
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue