mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-06-25 17:10:43 +00:00
fix(frontend): ノートの下書きをリセットする際、未アップロードのファイルについては添付予定が解除されない問題を修正 (#17568)
* fix(frontend): ノートの下書きをリセットする際、未アップロードのファイルについては添付予定が解除されない問題を修正(#17486) * fix(frontend): useUploader側にresetメソッドを追加し、そちらを呼び出す形に修正 * 現在のdisposeをresetにリネームして`items.value = [];`を追加する形に修正 * tweak --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
parent
23ff411b36
commit
e117456815
3 changed files with 9 additions and 1 deletions
|
|
@ -18,6 +18,7 @@
|
|||
- Fix: 「D」キーでダークモードを切り替える際にsyncDeviceDarkModeのチェックがバイパスされる問題を修正
|
||||
- Fix: パスキー登録完了時の認証ダイアログの入力値が使われていない問題を修正
|
||||
- Fix: メンションのサジェスト時に表示されるアイコン表示が画像サイズ次第で崩れる問題を修正
|
||||
- Fix: ノートの下書きをリセットする際、未アップロードのファイルについては添付予定が解除されない問題を修正
|
||||
- Fix: 画像アップロード時、フレームのキャプション付与が正しく行われないことがある問題を修正
|
||||
|
||||
### Server
|
||||
|
|
|
|||
|
|
@ -719,6 +719,7 @@ function clear() {
|
|||
poll.value = null;
|
||||
quoteId.value = null;
|
||||
scheduledAt.value = null;
|
||||
uploader.reset();
|
||||
}
|
||||
|
||||
function onKeydown(ev: KeyboardEvent) {
|
||||
|
|
|
|||
|
|
@ -759,12 +759,17 @@ export function useUploader(options: {
|
|||
item.preprocessedFile = markRaw(preprocessedFile);
|
||||
}
|
||||
|
||||
function dispose() {
|
||||
function reset() {
|
||||
for (const item of items.value) {
|
||||
if (item.thumbnail != null) URL.revokeObjectURL(item.thumbnail);
|
||||
}
|
||||
|
||||
abortAll();
|
||||
items.value = [];
|
||||
}
|
||||
|
||||
function dispose() {
|
||||
reset();
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
|
|
@ -776,6 +781,7 @@ export function useUploader(options: {
|
|||
addFiles,
|
||||
removeItem,
|
||||
abortAll,
|
||||
reset,
|
||||
dispose,
|
||||
upload,
|
||||
getMenu,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue