fix reaction sound in NoteSub - fixes #1224
this bug comes from Misskey, and we kept it in SkNoteSub latest Misskey `develop` seems to have reworked the code significantly, so I'm not sure if we want to fix this now, or leave the bug in the 2025.5.½ release and avoid creating extra pain for the subsequent merges
This commit is contained in:
parent
8c196d5cb2
commit
d48bb31e49
2 changed files with 28 additions and 4 deletions
|
|
@ -202,8 +202,9 @@ async function reply(viaKeyboard = false): Promise<void> {
|
|||
function react(): void {
|
||||
pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
showMovedDialog();
|
||||
sound.playMisskeySfx('reaction');
|
||||
if (appearNote.value.reactionAcceptance === 'likeOnly') {
|
||||
sound.playMisskeySfx('reaction');
|
||||
|
||||
misskeyApi('notes/like', {
|
||||
noteId: appearNote.value.id,
|
||||
override: defaultLike.value,
|
||||
|
|
@ -219,7 +220,18 @@ function react(): void {
|
|||
}
|
||||
} else {
|
||||
blur();
|
||||
reactionPicker.show(reactButton.value ?? null, appearNote.value, reaction => {
|
||||
reactionPicker.show(reactButton.value ?? null, note.value, async (reaction) => {
|
||||
if (prefer.s.confirmOnReact) {
|
||||
const confirm = await os.confirm({
|
||||
type: 'question',
|
||||
text: i18n.tsx.reactAreYouSure({ emoji: reaction.replace('@.', '') }),
|
||||
});
|
||||
|
||||
if (confirm.canceled) return;
|
||||
}
|
||||
|
||||
sound.playMisskeySfx('reaction');
|
||||
|
||||
misskeyApi('notes/reactions/create', {
|
||||
noteId: appearNote.value.id,
|
||||
reaction: reaction,
|
||||
|
|
|
|||
|
|
@ -219,8 +219,9 @@ async function reply(viaKeyboard = false): Promise<void> {
|
|||
function react(): void {
|
||||
pleaseLogin({ openOnRemote: pleaseLoginContext.value });
|
||||
showMovedDialog();
|
||||
sound.playMisskeySfx('reaction');
|
||||
if (appearNote.value.reactionAcceptance === 'likeOnly') {
|
||||
sound.playMisskeySfx('reaction');
|
||||
|
||||
misskeyApi('notes/like', {
|
||||
noteId: appearNote.value.id,
|
||||
override: defaultLike.value,
|
||||
|
|
@ -236,7 +237,18 @@ function react(): void {
|
|||
}
|
||||
} else {
|
||||
blur();
|
||||
reactionPicker.show(reactButton.value ?? null, appearNote.value, reaction => {
|
||||
reactionPicker.show(reactButton.value ?? null, note.value, async (reaction) => {
|
||||
if (prefer.s.confirmOnReact) {
|
||||
const confirm = await os.confirm({
|
||||
type: 'question',
|
||||
text: i18n.tsx.reactAreYouSure({ emoji: reaction.replace('@.', '') }),
|
||||
});
|
||||
|
||||
if (confirm.canceled) return;
|
||||
}
|
||||
|
||||
sound.playMisskeySfx('reaction');
|
||||
|
||||
misskeyApi('notes/reactions/create', {
|
||||
noteId: appearNote.value.id,
|
||||
reaction: reaction,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue