diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-02-08 22:19:41 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-02-08 22:19:41 -0600 |
commit | 27dbbfbe9bb98391b3f74ffd7d22465984df2237 (patch) | |
tree | 12d0590f29bbeacf87b6cd5829863bf4289fc770 | |
parent | 58a310156bd09ac536f65aa12122ea1f045c0116 (diff) | |
download | etbsa-trackermap-mobile-27dbbfbe9bb98391b3f74ffd7d22465984df2237.tar.gz etbsa-trackermap-mobile-27dbbfbe9bb98391b3f74ffd7d22465984df2237.tar.bz2 etbsa-trackermap-mobile-27dbbfbe9bb98391b3f74ffd7d22465984df2237.zip |
Changed variable names
-rw-r--r-- | iosApp/iosApp/Units/UnitsView.swift | 4 | ||||
-rw-r--r-- | 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 } } |