upd: change unrenote function

This commit is contained in:
Mar0xy 2023-10-13 22:29:14 +02:00
parent b4c81eb4ef
commit 96d99f04fb
No known key found for this signature in database
GPG Key ID: 56569BBE47D2C828
2 changed files with 4 additions and 4 deletions

View File

@ -66,7 +66,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}); });
for (const note of renotes) { for (const note of renotes) {
this.noteDeleteService.delete(await this.usersRepository.findOneByOrFail({ id: me.id }), note, false, me); this.noteDeleteService.delete(await this.usersRepository.findOneByOrFail({ id: me.id }), note, false);
} }
}); });
} }

View File

@ -102,7 +102,7 @@ SPDX-License-Identifier: AGPL-3.0-only
class="_button" class="_button"
:style="renoted ? 'color: var(--accent) !important;' : ''" :style="renoted ? 'color: var(--accent) !important;' : ''"
v-on:click.stop v-on:click.stop
@mousedown="renoted ? undoRenote() : renote()" @mousedown="renoted ? undoRenote(appearNote) : renote()"
> >
<i class="ph-rocket-launch ph-bold ph-lg"></i> <i class="ph-rocket-launch ph-bold ph-lg"></i>
<p v-if="appearNote.renoteCount > 0" :class="$style.footerButtonCount">{{ appearNote.renoteCount }}</p> <p v-if="appearNote.renoteCount > 0" :class="$style.footerButtonCount">{{ appearNote.renoteCount }}</p>
@ -442,10 +442,10 @@ function undoReact(note): void {
}); });
} }
function undoRenote() : void { function undoRenote(note) : void {
if (!renoted.value) return; if (!renoted.value) return;
os.api("notes/unrenote", { os.api("notes/unrenote", {
noteId: appearNote.id, noteId: note.id,
}); });
renoted.value = false; renoted.value = false;
} }