We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am getting this warning when I run my app and go to the view that is using the WaterfallGrid.
I think it's causing what than displays to disappear when I scroll up on the page. I'm not sure.
`///: FAVORITE ITEMS GRID WaterfallGrid(favoriteItems.favorites, id: \.self) { item in ZStack(alignment: .topTrailing) { FavoriteItemView(favoriteItem: item) } ///: ZSTACK } //: WATERFALL .gridStyle( columnsInPortrait: 2, columnsInLandscape: 3, spacing: 10, animation: .easeInOut(duration: 0.5) ) .padding(EdgeInsets(top: 0, leading: 8, bottom: 15, trailing: 8)) .scrollOptions(direction: .vertical) .onAppear(perform: loadFavorites)`
I am pulling the items that display from Cloud Firestore.
`func loadFavorites() { db.collection("favorites").getDocuments() { (querySnapshot, err) in if let err = err { print("Error getting documents: \(err)") } else { for document in querySnapshot!.documents { let docId = document.documentID let itemInfo = document.data() let itemType = itemInfo["itemType"] as? String ?? "shareable" let itemTitle = itemInfo["itemTitle"] as? String ?? "DaySpring" let itemImage = itemInfo["itemImage"] as? String ?? "No Photo" let itemAuthor = itemInfo["itemAuthor"] as? String ?? "DaySpring" db.collection("users").document(userId!).addSnapshotListener { documentSnapshot, error in guard let userFavs = documentSnapshot else { print("Error fetching document: \(error!)") return } guard let data = userFavs.data() else { print("Document data was empty.") return } if let favorites = data["favorites"] as? [String: Any] { if let favItem = favorites[docId] as? [String: Any] { if let fav = favItem["itemActive"] as? Bool { if fav { if let itemDate = favItem["itemAdded"] as? Timestamp { let thisDate = itemDate.dateValue() self.favorites.append(FavoriteItem(id: docId, itemType: itemType, itemImage: itemImage, itemTitle: itemTitle, itemAuthor: itemAuthor, itemDate: thisDate)) DispatchQueue.main.async { self.favorites.sort(by: { $0.itemDate > $1.itemDate }) } } } } } } } } } } }`
The text was updated successfully, but these errors were encountered:
Same problem for me, the first time the datas are fetched are shown, then appears a space :|
Sorry, something went wrong.
This should now be fixed with version 1.0.1 Thanks.
1.0.1
Successfully merging a pull request may close this issue.
I am getting this warning when I run my app and go to the view that is using the WaterfallGrid.
I think it's causing what than displays to disappear when I scroll up on the page. I'm not sure.
I am pulling the items that display from Cloud Firestore.
The text was updated successfully, but these errors were encountered: