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