File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
GoInfoGame/GoInfoGame/UI/InitialView Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ struct WorkspacesListView: View {
7373
7474 @Binding var isLoading : Bool
7575
76+ @State private var showAlert = false
77+
7678 var body : some View {
7779
7880 if viewModel. workspaces. count == 1 {
@@ -91,6 +93,11 @@ struct WorkspacesListView: View {
9193 DispatchQueue . main. async {
9294 self . shouldNavigateToMapView = true
9395 }
96+ } else {
97+ DispatchQueue . main. async {
98+ showAlert = true
99+ self . shouldNavigateToMapView = false
100+ }
94101 }
95102 }
96103 }
@@ -131,6 +138,11 @@ struct WorkspacesListView: View {
131138
132139 let workspaceId = " \( workspace. id) "
133140 _ = KeychainManager . save ( key: " workspaceID " , data: workspaceId)
141+ } else {
142+ DispatchQueue . main. async {
143+ showAlert = true
144+ self . shouldNavigateToMapView = false
145+ }
134146 }
135147 } )
136148 } label: {
@@ -151,6 +163,9 @@ struct WorkspacesListView: View {
151163 }
152164 . padding ( )
153165 }
166+ . alert ( " Workspace or quest not configured " , isPresented: $showAlert) {
167+ Button ( " OK " , role: . cancel) { }
168+ }
154169 }
155170
156171 if shouldNavigateToMapView, let selectedWorkspace = selectedWorkspace {
You can’t perform that action at this time.
0 commit comments