aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--iosApp/iosApp/Units/UnitsView.swift4
-rw-r--r--iosApp/iosApp/Units/UnitsViewModel.swift8
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
}
}