diff options
| author | dakkar <dakkar@thenautilus.net> | 2024-06-12 17:28:14 +0100 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2024-06-12 17:49:13 +0100 |
| commit | 935cb73c0b3df02a75cf65359c169ce7e05722e4 (patch) | |
| tree | fcc6a828aa760ebdcbf915fd144ef88a750071fc /packages/frontend/src/components/MkNote.vue | |
| parent | semicolons (diff) | |
| download | sharkey-935cb73c0b3df02a75cf65359c169ce7e05722e4.tar.gz sharkey-935cb73c0b3df02a75cf65359c169ce7e05722e4.tar.bz2 sharkey-935cb73c0b3df02a75cf65359c169ce7e05722e4.zip | |
more robust "only one renote at a time" logic
this blocks the button as well, not just the hotkey
Diffstat (limited to 'packages/frontend/src/components/MkNote.vue')
| -rw-r--r-- | packages/frontend/src/components/MkNote.vue | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index ddd693dc79..60e6100a8f 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -336,7 +336,7 @@ let renoting = false; const keymap = { 'r': () => reply(true), 'e|a|plus': () => react(true), - '(q)': () => { if (canRenote.value && !renoted.value && !renoting) { renoting = true; renote(appearNote.value.visibility); } }, + '(q)': () => { if (canRenote.value && !renoted.value && !renoting) renote(appearNote.value.visibility); }, 'up|k|shift+tab': focusBefore, 'down|j|tab': focusAfter, 'esc': blur, @@ -414,6 +414,8 @@ if (!props.mock) { } function boostVisibility() { + if (renoting) return; + if (!defaultStore.state.showVisibilitySelectorOnBoost) { renote(defaultStore.state.visibilityOnBoost); } else { @@ -425,6 +427,8 @@ function renote(visibility: Visibility, localOnly: boolean = false) { pleaseLogin(); showMovedDialog(); + renoting = true; + if (appearNote.value.channel) { const el = renoteButton.value as HTMLElement | null | undefined; if (el) { |