client.user.subscribe())
function reorderAndFilter(items: mastodon.v1.Status[]) {
return reorderedTimeline(items, 'home')
}
+
+const followedTags = (await useMasto().client.value.v1.followedTags.list({ limit: 0 }))
diff --git a/components/timeline/TimelinePaginator.vue b/components/timeline/TimelinePaginator.vue
index 5c1d7b97..ab806e11 100644
--- a/components/timeline/TimelinePaginator.vue
+++ b/components/timeline/TimelinePaginator.vue
@@ -4,11 +4,12 @@ import type { mastodon } from 'masto'
import { DynamicScrollerItem } from 'vue-virtual-scroller'
import 'vue-virtual-scroller/dist/vue-virtual-scroller.css'
-const { account, buffer = 10, endMessage = true } = defineProps<{
+const { account, buffer = 10, endMessage = true, followedTags = [] } = defineProps<{
paginator: mastodon.Paginator
stream?: mastodon.streaming.Subscription
context?: mastodon.v2.FilterContext
account?: mastodon.v1.Account
+ followedTags?: mastodon.v1.Tag[]
preprocess?: (items: mastodon.v1.Status[]) => mastodon.v1.Status[]
buffer?: number
endMessage?: boolean | string
@@ -20,6 +21,12 @@ const virtualScroller = usePreferences('experimentalVirtualScroller')
const showOriginSite = computed(() =>
account && account.id !== currentUser.value?.account.id && getServerName(account) !== currentServer.value,
)
+
+function getFollowedTag(status: mastodon.v1.Status): string | null {
+ const followedTagNames = followedTags.map(tag => tag.name)
+ const followedStatusTags = status.tags.filter(tag => followedTagNames.includes(tag.name))
+ return followedStatusTags.length ? followedStatusTags[0]?.name : null
+}
@@ -32,11 +39,11 @@ const showOriginSite = computed(() =>
-
+
-
+
diff --git a/components/timeline/TimelinePublic.vue b/components/timeline/TimelinePublic.vue
index 2a110e9a..f8860919 100644
--- a/components/timeline/TimelinePublic.vue
+++ b/components/timeline/TimelinePublic.vue
@@ -6,10 +6,12 @@ const stream = useStreaming(client => client.public.subscribe())
function reorderAndFilter(items: mastodon.v1.Status[]) {
return reorderedTimeline(items, 'public')
}
+
+const followedTags = (await useMasto().client.value.v1.followedTags.list({ limit: 0 }))
-
+
diff --git a/components/timeline/TimelinePublicLocal.vue b/components/timeline/TimelinePublicLocal.vue
index 4f3c11ac..d130223d 100644
--- a/components/timeline/TimelinePublicLocal.vue
+++ b/components/timeline/TimelinePublicLocal.vue
@@ -6,10 +6,12 @@ const stream = useStreaming(client => client.public.local.subscribe())
function reorderAndFilter(items: mastodon.v1.Status[]) {
return reorderedTimeline(items, 'public')
}
+
+const followedTags = (await useMasto().client.value.v1.followedTags.list({ limit: 0 }))
-
+
diff --git a/pages/[[server]]/tags/[tag].vue b/pages/[[server]]/tags/[tag].vue
index d43d75bf..b4e85cff 100644
--- a/pages/[[server]]/tags/[tag].vue
+++ b/pages/[[server]]/tags/[tag].vue
@@ -23,6 +23,7 @@ onReactivated(() => {
// The user will see the previous content first, and any changes will be updated to the UI when the request is completed
refresh()
})
+const followedTags = (await useMasto().client.value.v1.followedTags.list({ limit: 0 }))
@@ -38,7 +39,7 @@ onReactivated(() => {
-
+