From 27dbbfbe9bb98391b3f74ffd7d22465984df2237 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Tue, 8 Feb 2022 22:19:41 -0600 Subject: Changed variable names --- iosApp/iosApp/Units/UnitsView.swift | 4 ++-- iosApp/iosApp/Units/UnitsViewModel.swift | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/iosApp/iosApp/Units/UnitsView.swift b/iosApp/iosApp/Units/UnitsView.swift index bfd4e06..c0899df 100644 --- a/iosApp/iosApp/Units/UnitsView.swift +++ b/iosApp/iosApp/Units/UnitsView.swift @@ -78,8 +78,8 @@ struct UnitsView: View { print("Dismissed") } content: { DetailsView(isPresented: $unitsViewModel.showDetails, - action: unitsViewModel.showAction, - forId: unitsViewModel.tappedId) + action: unitsViewModel.detailsAction, + forId: unitsViewModel.detailsId) } } diff --git a/iosApp/iosApp/Units/UnitsViewModel.swift b/iosApp/iosApp/Units/UnitsViewModel.swift index f561504..878ccc9 100644 --- a/iosApp/iosApp/Units/UnitsViewModel.swift +++ b/iosApp/iosApp/Units/UnitsViewModel.swift @@ -41,7 +41,8 @@ class UnitsViewModel: ObservableObject { } } - var tappedId: Int32? = nil + var detailsId: Int32? = nil + var detailsAction = DeviceRow.Action.details @Published var searchQuery = "" { didSet { @@ -51,7 +52,6 @@ class UnitsViewModel: ObservableObject { } @Published var isEditing = false @Published var showDetails = false - @Published var showAction = DeviceRow.Action.details @Published var unitsDisplayMode: UnitsDisplayMode = .list @Published var units: [UnitInformation] = [] { didSet { @@ -127,8 +127,8 @@ class UnitsViewModel: ObservableObject { } func show(action: DeviceRow.Action, for unit: UnitInformation) { - showAction = action - tappedId = unit.device.id + detailsAction = action + detailsId = unit.device.id showDetails = true } } -- cgit v1.2.3