parent
18e82c0627
commit
70433db9d9
2 changed files with 9 additions and 9 deletions
|
@ -228,7 +228,7 @@ function like(): void {
|
||||||
noteId: props.note.id,
|
noteId: props.note.id,
|
||||||
override: defaultLike.value,
|
override: defaultLike.value,
|
||||||
});
|
});
|
||||||
const el = reactButton.value as HTMLElement | null | undefined;
|
const el = likeButton.value as HTMLElement | null | undefined;
|
||||||
if (el) {
|
if (el) {
|
||||||
const rect = el.getBoundingClientRect();
|
const rect = el.getBoundingClientRect();
|
||||||
const x = rect.left + (el.offsetWidth / 2);
|
const x = rect.left + (el.offsetWidth / 2);
|
||||||
|
|
|
@ -152,16 +152,16 @@ const isRenote = (
|
||||||
);
|
);
|
||||||
|
|
||||||
async function addReplyTo(replyNote: Misskey.entities.Note) {
|
async function addReplyTo(replyNote: Misskey.entities.Note) {
|
||||||
replies.value.unshift(replyNote);
|
replies.value.unshift(replyNote);
|
||||||
appearNote.value.repliesCount += 1;
|
appearNote.value.repliesCount += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function removeReply(id: Misskey.entities.Note['id']) {
|
async function removeReply(id: Misskey.entities.Note['id']) {
|
||||||
const replyIdx = replies.value.findIndex(note => note.id === id);
|
const replyIdx = replies.value.findIndex(note => note.id === id);
|
||||||
if (replyIdx >= 0) {
|
if (replyIdx >= 0) {
|
||||||
replies.value.splice(replyIdx, 1);
|
replies.value.splice(replyIdx, 1);
|
||||||
appearNote.value.repliesCount -= 1;
|
appearNote.value.repliesCount -= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
useNoteCapture({
|
useNoteCapture({
|
||||||
|
@ -237,7 +237,7 @@ function like(): void {
|
||||||
noteId: props.note.id,
|
noteId: props.note.id,
|
||||||
override: defaultLike.value,
|
override: defaultLike.value,
|
||||||
});
|
});
|
||||||
const el = reactButton.value as HTMLElement | null | undefined;
|
const el = likeButton.value as HTMLElement | null | undefined;
|
||||||
if (el) {
|
if (el) {
|
||||||
const rect = el.getBoundingClientRect();
|
const rect = el.getBoundingClientRect();
|
||||||
const x = rect.left + (el.offsetWidth / 2);
|
const x = rect.left + (el.offsetWidth / 2);
|
||||||
|
|
Loading…
Reference in a new issue