Skip to content

Commit 6ceb7f2

Browse files
committed
.onAppear -> .task
1 parent 4cd34ce commit 6ceb7f2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

SNUTT-2022/SNUTT/Views/Scenes/LectureDetailScene.swift

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,10 @@ struct LectureDetailScene: View {
9191
.onAppear {
9292
isMapViewExpanded = viewModel.shouldOpenLectureMapView()
9393
}
94-
.onAppear {
95-
Task {
96-
if let evLecture = await viewModel.getEvLectureInfo(of: lecture) {
97-
lecture.updateEvLecture(to: evLecture)
98-
viewModel.reloadDetailWebView(detailId: evLecture.evLectureId)
99-
}
94+
.task {
95+
if let evLecture = await viewModel.getEvLectureInfo(of: lecture) {
96+
lecture.updateEvLecture(to: evLecture)
97+
viewModel.reloadDetailWebView(detailId: evLecture.evLectureId)
10098
}
10199
}
102100
.onChange(of: isMapViewExpanded) {

0 commit comments

Comments
 (0)