Skip to content

Commit

Permalink
.onAppear -> .task
Browse files Browse the repository at this point in the history
  • Loading branch information
peng-u-0807 committed Aug 13, 2024
1 parent 4cd34ce commit 6ceb7f2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions SNUTT-2022/SNUTT/Views/Scenes/LectureDetailScene.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,10 @@ struct LectureDetailScene: View {
.onAppear {
isMapViewExpanded = viewModel.shouldOpenLectureMapView()
}
.onAppear {
Task {
if let evLecture = await viewModel.getEvLectureInfo(of: lecture) {
lecture.updateEvLecture(to: evLecture)
viewModel.reloadDetailWebView(detailId: evLecture.evLectureId)
}
.task {
if let evLecture = await viewModel.getEvLectureInfo(of: lecture) {
lecture.updateEvLecture(to: evLecture)
viewModel.reloadDetailWebView(detailId: evLecture.evLectureId)
}
}
.onChange(of: isMapViewExpanded) {
Expand Down

0 comments on commit 6ceb7f2

Please sign in to comment.