Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Feature/map annotations show details #459

Merged
merged 2 commits into from
Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Campus-iOS/MapComponent/View/MapContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ class MapContentCoordinator: NSObject, MKMapViewDelegate {
for i in 0...(control.vm.cafeterias.count - 1) {
if title == control.vm.cafeterias[i].title {
control.vm.selectedAnnotationIndex = i
// Making the selected annotation (i.e. cafeteria) the selected cafeteria -> shows the MealPlanView inside the PanelContentView like tapping on a cafeteria in the PanelContentCafeteriasListView
control.vm.selectedCafeteria = control.vm.cafeterias[i]
control.vm.panelPosition = "pushMid"
}
}
Expand All @@ -211,6 +213,8 @@ class MapContentCoordinator: NSObject, MKMapViewDelegate {
for i in 0...(groups.count - 1) {
if title == groups[i].name {
control.vm.selectedAnnotationIndex = i
// Making the selected annotation (i.e. study group) the selected study group -> shows the StudyRoomGroupView with inside the PanelContentView like tapping on a study group in the PanelContentStudyRoomGroupsListView
control.vm.selectedStudyGroup = groups[i]
control.vm.panelPosition = "pushMid"
}
}
Expand Down
2 changes: 0 additions & 2 deletions Campus-iOS/MapComponent/View/PanelContentListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ struct PanelContentListView: View {
}
case .loading, .na:
ZStack {
Color.white
VStack {
LoadingView(text: "Fetching Canteens", position: .middletop)
Spacer().frame(width: screenWidth, height: screenHeight * (1 - 8.2/10))
Expand Down Expand Up @@ -98,7 +97,6 @@ struct PanelContentListView: View {
}
case .loading, .na:
ZStack {
Color.white
VStack {
LoadingView(text: "Fetching Study Rooms", position: .middletop)
Spacer().frame(width: screenWidth, height: screenHeight * (1 - 8.2/10))
Expand Down