Skip to content

Commit 3433de1

Browse files
Merge branch 'main' into client_refactor_0.4.1-rc-3
Signed-off-by: mobile-bungalow <[email protected]>
2 parents e458ace + 521afe2 commit 3433de1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/LiveViewNative/Coordinators/LiveSessionCoordinator.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,14 +288,13 @@ public class LiveSessionCoordinator<R: RootRegistry>: ObservableObject {
288288
}
289289

290290
self.navigationPath.last!.coordinator.join(self.liveviewClient!, self.liveviewClient!.status(), self.patchHandler)
291-
291+
292292
} catch {
293293
self.rootLayout = nil
294294
self.stylesheet = nil
295295
self.state = .connectionFailed(error)
296296
}
297297
}
298-
299298

300299
private func disconnect(preserveNavigationPath: Bool = false) async {
301300
do {

Sources/LiveViewNative/Coordinators/LiveViewCoordinator.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,12 @@ public class LiveViewCoordinator<R: RootRegistry>: ObservableObject {
242242
eventSubject.send((name, event[1]))
243243
}
244244
}
245-
246245

247246
func bindDocumentListener(_ handler: SimplePatchHandler) {
248247
patchHandlerCancellable = handler.patchEventSubject
249248
.receive(on: DispatchQueue.main)
250249
.sink { [weak self] patch in
250+
251251
switch patch.data {
252252
case .root:
253253
// when the root changes, update the `NavStackEntry` itself.
@@ -287,6 +287,7 @@ public class LiveViewCoordinator<R: RootRegistry>: ObservableObject {
287287
self.liveviewClient = client
288288
handleViewReloadStatus(initial_status)
289289
self.bindDocumentListener(docHandler)
290+
290291
}
291292

292293

0 commit comments

Comments
 (0)