fix(profile): incorrect "pinned post" label shown on other account (#3320)
This commit is contained in:
parent
e12b1d2b6c
commit
548183e14a
2 changed files with 8 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import type { mastodon } from 'masto'
|
||||
|
||||
const { actions = true, older, newer, hasOlder, hasNewer, main, ...props } = defineProps<{
|
||||
const { actions = true, older, newer, hasOlder, hasNewer, main, account, ...props } = defineProps<{
|
||||
status: mastodon.v1.Status
|
||||
followedTag?: string | null
|
||||
actions?: boolean
|
||||
|
@ -20,6 +20,7 @@ const { actions = true, older, newer, hasOlder, hasNewer, main, ...props } = def
|
|||
// When looking into a detailed view of a post, we can simplify the replying badges
|
||||
// to the main expanded post
|
||||
main?: mastodon.v1.Status
|
||||
account?: mastodon.v1.Account
|
||||
}>()
|
||||
|
||||
const userSettings = useUserSettings()
|
||||
|
@ -60,7 +61,10 @@ const timeago = useTimeAgo(() => status.value.createdAt, timeAgoOptions)
|
|||
const isSelfReply = computed(() => status.value.inReplyToAccountId === status.value.account.id)
|
||||
const collapseRebloggedBy = computed(() => rebloggedBy.value?.id === status.value.account.id)
|
||||
const isDM = computed(() => status.value.visibility === 'direct')
|
||||
const isPinned = computed(() => status.value.pinned)
|
||||
const isPinned = computed(
|
||||
() =>
|
||||
!!props.status.pinned && account?.id === status.value.account.id,
|
||||
)
|
||||
|
||||
const showUpperBorder = computed(() => newer && !directReply.value)
|
||||
const showReplyTo = computed(() => !replyToMain.value && !directReply.value)
|
||||
|
|
|
@ -39,11 +39,11 @@ function getFollowedTag(status: mastodon.v1.Status): string | null {
|
|||
<template #default="{ item, older, newer, active }">
|
||||
<template v-if="virtualScroller">
|
||||
<DynamicScrollerItem :item="item" :active="active" tag="article">
|
||||
<StatusCard :followed-tag="getFollowedTag(item)" :status="item" :context="context" :older="older" :newer="newer" />
|
||||
<StatusCard :followed-tag="getFollowedTag(item)" :status="item" :context="context" :older="older" :newer="newer" :account="account" />
|
||||
</DynamicScrollerItem>
|
||||
</template>
|
||||
<template v-else>
|
||||
<StatusCard :followed-tag="getFollowedTag(item)" :status="item" :context="context" :older="older" :newer="newer" />
|
||||
<StatusCard :followed-tag="getFollowedTag(item)" :status="item" :context="context" :older="older" :newer="newer" :account="account" />
|
||||
</template>
|
||||
</template>
|
||||
<template v-if="context === 'account' " #done="{ items }">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue