mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 08:53:48 +01:00
Fix reply visibility errors
This commit is contained in:
parent
822898236b
commit
37aaeb8093
@ -246,7 +246,7 @@ export const NoteRepository = db.getRepository(Note).extend({
|
||||
...(opts.detail
|
||||
? {
|
||||
reply: note.replyId
|
||||
? this.pack(note.reply || note.replyId, me, {
|
||||
? this.tryPack(note.reply || note.replyId, me, {
|
||||
detail: false,
|
||||
_hint_: options?._hint_,
|
||||
})
|
||||
@ -283,6 +283,24 @@ export const NoteRepository = db.getRepository(Note).extend({
|
||||
return packed;
|
||||
},
|
||||
|
||||
async tryPack(
|
||||
src: Note["id"] | Note,
|
||||
me?: { id: User["id"] } | null | undefined,
|
||||
options?: {
|
||||
detail?: boolean;
|
||||
_hint_?: {
|
||||
myReactions: Map<Note["id"], NoteReaction | null>;
|
||||
};
|
||||
},
|
||||
): Promise<Packed<"Note"> | undefined> {
|
||||
try {
|
||||
return await this.pack(src, me, options);
|
||||
}
|
||||
catch {
|
||||
return undefined;
|
||||
}
|
||||
},
|
||||
|
||||
async packMany(
|
||||
notes: Note[],
|
||||
me?: { id: User["id"] } | null | undefined,
|
||||
|
@ -25,6 +25,15 @@
|
||||
>
|
||||
<i class="ph-arrow-bend-left-up ph-bold ph-lg"></i>
|
||||
</MkA>
|
||||
<MkA
|
||||
v-else-if="note.replyId && !note.reply"
|
||||
behavior="browser"
|
||||
v-tooltip="i18n.ts.jumpToPrevious"
|
||||
class="reply-icon"
|
||||
@click.stop
|
||||
>
|
||||
<i class="ph-arrow-bend-left-up ph-bold ph-lg"></i>
|
||||
</MkA>
|
||||
<Mfm
|
||||
v-if="note.cw != ''"
|
||||
class="text"
|
||||
@ -97,6 +106,15 @@
|
||||
>
|
||||
<i class="ph-arrow-bend-left-up ph-bold ph-lg"></i>
|
||||
</MkA>
|
||||
<MkA
|
||||
v-else-if="note.replyId && !note.reply"
|
||||
behavior="browser"
|
||||
v-tooltip="i18n.ts.jumpToPrevious"
|
||||
class="reply-icon"
|
||||
@click.stop
|
||||
>
|
||||
<i class="ph-arrow-bend-left-up ph-bold ph-lg"></i>
|
||||
</MkA>
|
||||
</template>
|
||||
<Mfm
|
||||
v-if="note.text"
|
||||
|
Loading…
Reference in New Issue
Block a user