From a08f56676dddc6fadd78d64568555433e4163f4b Mon Sep 17 00:00:00 2001 From: Ayo Ayco Date: Mon, 23 Jan 2023 20:33:21 +0100 Subject: [PATCH] feat: totally hide strict filters (#948) --- .eslintignore | 1 + .../conversation/ConversationPaginator.vue | 8 +++- .../notification/NotificationPaginator.vue | 8 +++- components/status/StatusCard.vue | 13 ------- components/status/StatusContent.vue | 2 +- components/status/StatusSpoiler.vue | 6 +-- components/timeline/TimelineHome.vue | 5 ++- components/timeline/TimelinePublic.vue | 5 ++- composables/timeline.ts | 16 ++++++-- locales/cs-CZ.json | 1 - locales/de-DE.json | 1 - locales/fr-FR.json | 1 - locales/nl-NL.json | 1 - locales/uk-UA.json | 1 - locales/zh-CN.json | 1 - locales/zh-TW.json | 1 - pages/[[server]]/@[account]/index/index.vue | 6 ++- tests/reorder-timeline.test.ts | 38 ++++++++++++++++++- 18 files changed, 82 insertions(+), 33 deletions(-) diff --git a/.eslintignore b/.eslintignore index 28b79860..b2365300 100644 --- a/.eslintignore +++ b/.eslintignore @@ -8,3 +8,4 @@ Dockerfile public/ https-dev-config/localhost.crt https-dev-config/localhost.key +Dockerfile diff --git a/components/conversation/ConversationPaginator.vue b/components/conversation/ConversationPaginator.vue index 40a4c7c7..e41292c4 100644 --- a/components/conversation/ConversationPaginator.vue +++ b/components/conversation/ConversationPaginator.vue @@ -4,10 +4,16 @@ import type { Paginator, mastodon } from 'masto' const { paginator } = defineProps<{ paginator: Paginator }>() + +function preprocess(items: mastodon.v1.Conversation[]): mastodon.v1.Conversation[] { + return items.filter(items => !items.lastStatus?.filtered?.find( + filter => filter.filter.filterAction === 'hide' && filter.filter.context.includes('thread'), + )) +}