commiting changes to user and such without the breaking changes

This commit is contained in:
talksik
2021-12-13 17:13:18 -08:00
parent 02d12d7b83
commit ef2d859dd2
5 changed files with 61 additions and 16 deletions
@@ -11,9 +11,9 @@ struct ChatsCarouselView: View {
@StateObject var viewModel:ChatsCarouselViewModel = ChatsCarouselViewModel()
// current snapped/selected user
@State var selectedUserId: String = ""
@State var selectedUser: User?
@State var selectedUser: TestUser?
func getSelectedUser(userId: String) -> User {
func getSelectedUser(userId: String) -> TestUser {
return self.viewModel.carouselUsers.filter{user in
return user.id == userId
}[0]
@@ -8,15 +8,15 @@
import Foundation
final class ChatsCarouselViewModel: ObservableObject {
@Published var carouselUsers:[User]
@Published var carouselUsers:[TestUser]
init() {
self.carouselUsers = [
User(_profilePic: "liam", _firstN: "Liam", _lastN: "Digregorio"),
User(_profilePic: "heran", _firstN: "Heran", _lastN: "Patel"),
User(_profilePic: "sarth", _firstN: "Sarth", _lastN: "Shah"),
User(_profilePic: "kevin", _firstN: "Kevin", _lastN: "Le"),
User(_profilePic: "rohan", _firstN: "Rohan", _lastN: "Chadha")
TestUser(_profilePic: "liam", _firstN: "Liam", _lastN: "Digregorio"),
TestUser(_profilePic: "heran", _firstN: "Heran", _lastN: "Patel"),
TestUser(_profilePic: "sarth", _firstN: "Sarth", _lastN: "Shah"),
TestUser(_profilePic: "kevin", _firstN: "Kevin", _lastN: "Le"),
TestUser(_profilePic: "rohan", _firstN: "Rohan", _lastN: "Chadha")
]
}
}