@yogiswara/honcho-editor-ui 1.4.21 → 1.4.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -239,6 +239,8 @@ export function useGallerySwipe(firebaseUid, initImageId, controller) {
|
|
|
239
239
|
setCurrentImageId(nextImage.id);
|
|
240
240
|
// Immediately update the ref to prevent stale closure issues
|
|
241
241
|
currentImageIdRef.current = nextImage.id;
|
|
242
|
+
// Add a small delay to ensure state is fully updated
|
|
243
|
+
await new Promise(resolve => setTimeout(resolve, 100));
|
|
242
244
|
// Fetch complete data for the next image
|
|
243
245
|
const nextImageData = await controller.onGetImage(firebaseUid, nextImage.id);
|
|
244
246
|
if (nextImageData) {
|