mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-03-27 20:01:19 +01:00
A few more run time fixes
This commit is contained in:
@@ -20,7 +20,8 @@ struct LandmarkList: View {
|
||||
ForEach(userData.landmarks) { landmark in
|
||||
if !self.userData.showFavoritesOnly || landmark.isFavorite {
|
||||
NavigationLink(
|
||||
destination: LandmarkDetail(landmark: landmark)) {
|
||||
destination: LandmarkDetail(landmark: landmark)
|
||||
.environmentObject(self.userData)) {
|
||||
LandmarkRow(landmark: landmark)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,8 @@ struct LandmarkList: View {
|
||||
ForEach(userData.landmarks) { landmark in
|
||||
if !self.userData.showFavoritesOnly || landmark.isFavorite {
|
||||
NavigationLink(
|
||||
destination: LandmarkDetail(landmark: landmark)) {
|
||||
destination: LandmarkDetail(landmark: landmark)
|
||||
.environmentObject(self.userData)) {
|
||||
LandmarkRow(landmark: landmark)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,8 @@ struct LandmarkList: View {
|
||||
ForEach(userData.landmarks) { landmark in
|
||||
if !self.userData.showFavoritesOnly || landmark.isFavorite {
|
||||
NavigationLink(
|
||||
destination: LandmarkDetail(landmark: landmark)) {
|
||||
destination: LandmarkDetail(landmark: landmark)
|
||||
.environmentObject(self.userData)) {
|
||||
LandmarkRow(landmark: landmark)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,8 @@ struct UsersListView : View {
|
||||
}
|
||||
Section {
|
||||
ForEach(state.usersState.users) {user in
|
||||
NavigationLink(destination: UserDetailView(userId: user.id)) {
|
||||
NavigationLink(destination: UserDetailView(userId: user.id)
|
||||
.environmentObject(self.state)) {
|
||||
UserRow(user: user)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,8 @@ struct NoteList : View {
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
List(userData.notes) { note in
|
||||
NavigationLink(destination: NoteDetail(note: note)) {
|
||||
NavigationLink(destination: NoteDetail(note: note)
|
||||
.environmentObject(self.userData)) {
|
||||
NoteRow(note: note)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user