This commit is contained in:
Arjun Patel
2026-06-01 17:08:25 -07:00
parent 78456a4b1d
commit d9c2a1ed1b
8 changed files with 22 additions and 21 deletions
@@ -136,7 +136,6 @@ export function ComposeOverlay({
const cancel = useCallback(() => {
setStepSync('idle');
setError(null);
setTextContent('');
setMediaStream(null);
setReviewBlob(null);
setReviewDurationMs(0);
@@ -150,8 +149,7 @@ export function ComposeOverlay({
const addAttachments = useCallback(
async (files: File[]) => {
const currentCount = attachments.length;
const available = MAX_ATTACHMENTS - currentCount;
const available = MAX_ATTACHMENTS - attachments.length;
if (available <= 0) {
toast.error(`Maximum ${MAX_ATTACHMENTS} attachments`);
return;
@@ -404,6 +402,7 @@ export function ComposeOverlay({
try {
await createChildParticle(targetPath);
cancel();
setTextContent('');
} catch (err) {
if (!handleQuotaError(err)) throw err;
}
@@ -413,7 +412,7 @@ export function ComposeOverlay({
setStepSync,
createChildParticle,
cancel,
handleQuotaError,
handleQuotaError
]);
// New stream mode: create stream + first child
@@ -434,8 +433,8 @@ export function ComposeOverlay({
const streamChildrenPath = particlePath(networkId, [streamId]);
await createChildParticle(streamChildrenPath);
cancel();
setTextContent('');
} catch (err) {
if (!handleQuotaError(err)) throw err;
}