diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index ea94fca9..bd52d568 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -25,7 +25,7 @@ jobs: update_mailgun_template: runs-on: ubuntu-latest - name: Update 'main' template on Mailgun + name: Update templates on Mailgun steps: - name: Checkout uses: actions/checkout@v2 diff --git a/src/components/Views/Expo/Expo.tsx b/src/components/Views/Expo/Expo.tsx index 4076e0cb..12bf38e1 100644 --- a/src/components/Views/Expo/Expo.tsx +++ b/src/components/Views/Expo/Expo.tsx @@ -41,7 +41,7 @@ export const Expo = (props: Props) => { }) const getLoadShoutsFilters = (additionalFilters: LoadShoutsFilters = {}): LoadShoutsFilters => { - const filters = { visibility: 'public', ...additionalFilters } + const filters = { published: true, ...additionalFilters } filters.layouts = [] if (props.layout) { diff --git a/src/components/Views/Feed/Feed.tsx b/src/components/Views/Feed/Feed.tsx index a717cf12..ddc26304 100644 --- a/src/components/Views/Feed/Feed.tsx +++ b/src/components/Views/Feed/Feed.tsx @@ -182,7 +182,9 @@ export const FeedView = (props: Props) => { } const visibilityMode = searchParams().visibility - if (visibilityMode && visibilityMode !== 'all') { + if (visibilityMode === 'all') { + options.filters = { ...options.filters } + } else if (visibilityMode) { options.filters = { ...options.filters, published: visibilityMode === 'public' } } diff --git a/src/pages/topic.page.server.ts b/src/pages/topic.page.server.ts index e19d70fa..a14c24cf 100644 --- a/src/pages/topic.page.server.ts +++ b/src/pages/topic.page.server.ts @@ -16,7 +16,7 @@ export const onBeforeRender = async (pageContext: PageContext) => { } const topicShouts = await apiClient.getShouts({ - filters: { topic: topic.slug, visibility: 'public' }, + filters: { topic: topic.slug, published: true }, limit: PRERENDERED_ARTICLES_COUNT, }) diff --git a/src/pages/topic.page.tsx b/src/pages/topic.page.tsx index 424e927b..641fb210 100644 --- a/src/pages/topic.page.tsx +++ b/src/pages/topic.page.tsx @@ -21,7 +21,7 @@ export const TopicPage = (props: PageProps) => { const preload = () => Promise.all([ loadShouts({ - filters: { topic: slug(), visibility: 'public' }, + filters: { topic: slug(), published: true }, limit: PRERENDERED_ARTICLES_COUNT, offset: 0, }),