From 739124dc0fa55d77ed562acd827ba995b94fad55 Mon Sep 17 00:00:00 2001 From: Davide Baldo Date: Wed, 8 Nov 2023 08:29:30 +0100 Subject: [PATCH] fix: wrong window being shown when an invitations gets accepted --- .../swift/ockam/ockam_app/Ockam/OckamApp.swift | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/implementations/swift/ockam/ockam_app/Ockam/OckamApp.swift b/implementations/swift/ockam/ockam_app/Ockam/OckamApp.swift index 1650c3bfd18..eeb4c8b367c 100644 --- a/implementations/swift/ockam/ockam_app/Ockam/OckamApp.swift +++ b/implementations/swift/ockam/ockam_app/Ockam/OckamApp.swift @@ -80,17 +80,19 @@ struct OckamApp: App { .menuBarExtraStyle(.window) .commandsRemoved() - Window("Could not load local state", id: "broken-state") { - BrokenStateView() - } - .windowResizability(.contentSize) - // Declare a window with an empty view to handle the ockam:// url // A hack to overcome the fact that `onOpenURL` only works on `Windows` Window("Accepting invitation", id: "accepting-invitation") { OpenUrlView(enrolled: $state.enrolled) } .windowResizability(.contentSize) + + // Declare a window being shown when the ockam state cannot be loadeds + Window("Could not load local state", id: "broken-state") { + BrokenStateView() + } + .windowResizability(.contentSize) + // Declare a state-independent window, not open by default Window("Create an outlet to a tcp service", id: "create-service") { CreateServiceView()