Clarify MyList filter intent (#2167)

zio/stable
Eric Bailey 2023-12-11 15:55:14 -06:00 committed by GitHub
parent 99cf6b626f
commit f7ec7f700e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -5,7 +5,11 @@ import {accumulate} from '#/lib/async/accumulate'
import {useSession, getAgent} from '#/state/session'
import {STALE} from '#/state/queries'
export type MyListsFilter = 'all' | 'curate' | 'mod'
export type MyListsFilter =
| 'all'
| 'curate'
| 'mod'
| 'all-including-subscribed'
export const RQKEY = (filter: MyListsFilter) => ['my-lists', filter]
export function useMyListsQuery(filter: MyListsFilter) {
@ -29,7 +33,7 @@ export function useMyListsQuery(filter: MyListsFilter) {
})),
),
]
if (filter === 'all' || filter === 'mod') {
if (filter === 'all-including-subscribed' || filter === 'mod') {
promises.push(
accumulate(cursor =>
getAgent()