From 1b8bb0c1fd180463ba1262ab71977e074fd13feb Mon Sep 17 00:00:00 2001 From: "SPRINX0\\prochazka" Date: Thu, 22 May 2025 13:20:39 +0200 Subject: [PATCH] fixes --- .../src/appobj/CloudContentAppObject.svelte | 6 ++++- .../web/src/widgets/PrivateCloudWidget.svelte | 24 ++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/packages/web/src/appobj/CloudContentAppObject.svelte b/packages/web/src/appobj/CloudContentAppObject.svelte index d83e26ea5..7c811be1f 100644 --- a/packages/web/src/appobj/CloudContentAppObject.svelte +++ b/packages/web/src/appobj/CloudContentAppObject.svelte @@ -25,7 +25,10 @@ switch (data.type) { case 'connection': const conn = await apiCall('connections/get', { conid: data.conid }); - $cloudConnectionsStore[data.conid] = conn; + $cloudConnectionsStore = { + ...$cloudConnectionsStore, + [data.conid]: conn, + }; openConnection(conn); break; } @@ -34,6 +37,7 @@ {#if data.conid && $cloudConnectionsStore[data.conid]} { + const currentConid = $currentDatabase?.connection?._id; + if (currentConid?.startsWith('cloud://') && !$cloudConnectionsStore[currentConid]) { + loadCloudConnection(currentConid); + } + });