mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 17:03:49 +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
|
...(opts.detail
|
||||||
? {
|
? {
|
||||||
reply: note.replyId
|
reply: note.replyId
|
||||||
? this.pack(note.reply || note.replyId, me, {
|
? this.tryPack(note.reply || note.replyId, me, {
|
||||||
detail: false,
|
detail: false,
|
||||||
_hint_: options?._hint_,
|
_hint_: options?._hint_,
|
||||||
})
|
})
|
||||||
@ -283,6 +283,24 @@ export const NoteRepository = db.getRepository(Note).extend({
|
|||||||
return packed;
|
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(
|
async packMany(
|
||||||
notes: Note[],
|
notes: Note[],
|
||||||
me?: { id: User["id"] } | null | undefined,
|
me?: { id: User["id"] } | null | undefined,
|
||||||
|
@ -25,6 +25,15 @@
|
|||||||
>
|
>
|
||||||
<i class="ph-arrow-bend-left-up ph-bold ph-lg"></i>
|
<i class="ph-arrow-bend-left-up ph-bold ph-lg"></i>
|
||||||
</MkA>
|
</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
|
<Mfm
|
||||||
v-if="note.cw != ''"
|
v-if="note.cw != ''"
|
||||||
class="text"
|
class="text"
|
||||||
@ -97,6 +106,15 @@
|
|||||||
>
|
>
|
||||||
<i class="ph-arrow-bend-left-up ph-bold ph-lg"></i>
|
<i class="ph-arrow-bend-left-up ph-bold ph-lg"></i>
|
||||||
</MkA>
|
</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>
|
</template>
|
||||||
<Mfm
|
<Mfm
|
||||||
v-if="note.text"
|
v-if="note.text"
|
||||||
|
Loading…
Reference in New Issue
Block a user