Renamed session to sessionInfo

This commit is contained in:
Aleksandrs Proskurins
2022-10-04 15:34:31 +03:00
parent a964707630
commit 1bdd58a7d6
9 changed files with 42 additions and 42 deletions
@@ -38,10 +38,10 @@ enum MockUserSessionDetailsScreenState: MockScreenState, CaseIterable {
/// Generate the view struct for the screen state.
var screenView: ([Any], AnyView) {
let session: UserSessionInfo
let sessionInfo: UserSessionInfo
switch self {
case .allSections:
session = UserSessionInfo(id: "alice",
sessionInfo = UserSessionInfo(id: "alice",
name: "iOS",
deviceType: .mobile,
isVerified: false,
@@ -57,7 +57,7 @@ enum MockUserSessionDetailsScreenState: MockScreenState, CaseIterable {
isActive: true,
isCurrent: true)
case .sessionSectionOnly:
session = UserSessionInfo(id: "3",
sessionInfo = UserSessionInfo(id: "3",
name: "Android",
deviceType: .mobile,
isVerified: false,
@@ -73,12 +73,12 @@ enum MockUserSessionDetailsScreenState: MockScreenState, CaseIterable {
isActive: true,
isCurrent: false)
}
let viewModel = UserSessionDetailsViewModel(session: session)
let viewModel = UserSessionDetailsViewModel(sessionInfo: sessionInfo)
// can simulate service and viewModel actions here if needs be.
return (
[session],
[sessionInfo],
AnyView(UserSessionDetails(viewModel: viewModel.context))
)
}