From 653e65f1dda0128531252e8b6e74c7691965a70e Mon Sep 17 00:00:00 2001 From: Sahil Garg Date: Mon, 15 Jun 2026 11:25:12 +0530 Subject: [PATCH 1/3] fix: fixed the post upload redirect on mobile in pictuqe and prevented the double clicking of button on post in mobile. --- .../pictique/client/src/lib/ui/Button/Button.svelte | 1 + .../client/src/routes/(protected)/post/+page.svelte | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/platforms/pictique/client/src/lib/ui/Button/Button.svelte b/platforms/pictique/client/src/lib/ui/Button/Button.svelte index 3c9658aa8..9a674a878 100644 --- a/platforms/pictique/client/src/lib/ui/Button/Button.svelte +++ b/platforms/pictique/client/src/lib/ui/Button/Button.svelte @@ -27,6 +27,7 @@ const handleClick = async () => { if (typeof callback !== 'function') return; + if (disabled) return; if (blockingClick) isSubmitting = true; try { diff --git a/platforms/pictique/client/src/routes/(protected)/post/+page.svelte b/platforms/pictique/client/src/routes/(protected)/post/+page.svelte index 56cf42ec5..ce2b7c831 100644 --- a/platforms/pictique/client/src/routes/(protected)/post/+page.svelte +++ b/platforms/pictique/client/src/routes/(protected)/post/+page.svelte @@ -6,6 +6,7 @@ import { Button, Textarea } from '$lib/ui'; import { revokeImageUrls } from '$lib/utils'; import { formatSize, validateFileSize } from '$lib/utils/fileValidation'; + import { onDestroy } from 'svelte'; const MAX_TOTAL_SIZE = 5 * 1024 * 1024; // 5MB total const MAX_FILE_SIZE = 1 * 1024 * 1024; // 1MB per individual image @@ -57,11 +58,19 @@ input.value = ''; }; + onDestroy(() => { + if (uploadedImages.value) { + revokeImageUrls(uploadedImages.value); + uploadedImages.value = null; + } + }); + const postSubmissionHandler = async () => { if (!uploadedImages.value) return; const images = uploadedImages.value.map((img) => img.url); try { await createPost(caption, images); + goto('/home'); } catch (error) { console.error('Failed to create post:', error); } From 68c305fe705a817fa779ce339ac347aeb5155470 Mon Sep 17 00:00:00 2001 From: Sahil Garg Date: Mon, 15 Jun 2026 13:51:29 +0530 Subject: [PATCH 2/3] fix: onDestroy when switching to /post/audience page for future. --- .../client/src/routes/(protected)/post/+page.svelte | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/platforms/pictique/client/src/routes/(protected)/post/+page.svelte b/platforms/pictique/client/src/routes/(protected)/post/+page.svelte index ce2b7c831..a1c1b6e43 100644 --- a/platforms/pictique/client/src/routes/(protected)/post/+page.svelte +++ b/platforms/pictique/client/src/routes/(protected)/post/+page.svelte @@ -1,12 +1,11 @@