hide note preview if it's already quoted - fixes #888

I do not particularly _love_ this solution, but it is simple and
effective

I can't find another reliable way to determine if a link goes to a
local note of the given id, apart from fetching the link
This commit is contained in:
dakkar 2025-02-10 11:37:03 +00:00
parent 50a3e55be4
commit c6eb1ffde3
5 changed files with 13 additions and 5 deletions

View file

@ -122,7 +122,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<MkPoll v-if="appearNote.poll" ref="pollViewer" :noteId="appearNote.id" :poll="appearNote.poll" :local="!appearNote.user.host" :class="$style.poll"/>
<div v-if="isEnabledUrlPreview">
<MkUrlPreview v-for="url in urls" :key="url" :url="url" :compact="true" :detail="true" :showAsQuote="true" style="margin-top: 6px;"/>
<MkUrlPreview v-for="url in urls" :key="url" :url="url" :compact="true" :detail="true" :showAsQuote="true" :skipNoteIds="[appearNote.renote?.id]" style="margin-top: 6px;"/>
</div>
<div v-if="appearNote.renote" :class="$style.quote"><SkNoteSimple :note="appearNote.renote" :class="$style.quoteNote" :expandAllCws="props.expandAllCws"/></div>
</div>