Skip to content
Source
Sign inSign up
pingdotgg/t3code

Load thread snapshots over HTTP before live sync #3719

Mergedjuliusmarmingemerged 6 commits intomain fromrefs/pull/3719/headmerged by juliusmarminge View on GitHub

Showing 31 changed files with 27 additions and 9 deletions (loading 28).

x
0 of 31 viewed, 31 left
6 additions and 1 deletionapps/mobile/src/connection/runtime.tsModified
View file
@@ -1,4 +1,6 @@
import { Connection } from "@t3tools/client-runtime/connection";
+import { shellSnapshotLoaderLayer } from "@t3tools/client-runtime/state/shell";
+import { threadSnapshotLoaderLayer } from "@t3tools/client-runtime/state/threads";
import * as Layer from "effect/Layer";
import { Atom } from "effect/unstable/reactivity";
​
@@ -9,12 +11,15 @@
Layer.provide(runtimeContextLayer),
);
​
+const snapshotLoaderLayer = Layer.merge(threadSnapshotLoaderLayer, shellSnapshotLoaderLayer);
+​
type ConnectionLayerSource =
| typeof Connection.layer
+ | typeof snapshotLoaderLayer
| typeof runtimeContextLayer
| typeof connectionPlatformLayer;
​
-const connectionLayer = Connection.layer.pipe(
+const connectionLayer = Layer.merge(Connection.layer, snapshotLoaderLayer).pipe(
Layer.provideMerge(Layer.mergeAll(runtimeContextLayer, providedConnectionPlatformLayer)),
);
​
11 additions and 8 deletionsapps/mobile/src/connection/storage.tsModified
View file
@@ -16,8 +16,8 @@
} from "@t3tools/client-runtime/connection";