forked from misskey-dev/misskey
-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
画像アップロード完了前に投稿すると画像が添付されないのは直感的じゃない気がする #135
Labels
packages/frontend
Client side specific issue/PR
Comments
どうやらよいやみで実装されたっぽい |
TmsPostFormではこういう実装にした import { v4 as uuid } from 'uuid';
let fetchingList = $ref<string[]>([]);
const fetchingWrapper = <T>(prom: Promise<T>): Promise<T> => {
const id = uuid();
fetchingList.push(id);
prom.finally(() => {
fetchingList = fetchingList.filter(fid => fid !== id);
});
return prom;
};
const fetching = $computed<boolean>(() => fetchingList.length !== 0); // 画像のアップロード
fetchingWrapper(uploadFile(file));
// ノートの取得
fetchingWrapper(os.api('notes/show', { noteId })); |
ふむ |
で、fetching === trueならcanPostをfalseにすればいい |
rca-fedi@30cfe19 |
キューに追加された状態でクライアントを閉じたら投稿されなくなってしまうのであまりしたくない |
それはそう |
アップロード完了まで投稿できない仕様が無難やな |
投稿されなくなるどころか、失敗したらその内容が消失してしまう |
taiyme
added
packages/frontend
Client side specific issue/PR
and removed
frontend
labels
Nov 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
The text was updated successfully, but these errors were encountered: