commiting changes to user and such without the breaking changes
This commit is contained in:
@@ -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")
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user