Skip to content

Commit 4a5cf42

Browse files
author
Achyut Kumar M
committed
display polyline while answering quest and remove it on dismisal
1 parent 292c0ff commit 4a5cf42

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

GoInfoGame/GoInfoGame/UI/Map/MapView.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,19 @@ struct MapView: View {
147147
shouldShowPolyline = false
148148
}
149149
}
150+
.onChange(of: isPresented) { newValue in
151+
if !newValue {
152+
shouldShowPolyline = false
153+
}
154+
}
150155
.sheet(isPresented: $isPresented, content: {
151156
let selectedQuest = self.viewModel.selectedQuest
152157
CustomSheetView {
153158
selectedQuest?.parent?.form
154159
}
160+
.onAppear {
161+
shouldShowPolyline = true
162+
}
155163
.presentationDetents([.fraction(0.8), .fraction(0.5), .fraction(0.1)], selection: $selectedDetent)
156164
.scrollDisabled(false)
157165
.interactiveDismissDisabled()

0 commit comments

Comments
 (0)