refactor and unify how query strings are formed

This commit is contained in:
Henry Jameson 2026-06-16 23:14:52 +03:00
commit bd06c8801a
7 changed files with 263 additions and 146 deletions

View file

@ -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
}
}