Fixed long history rendering
This commit is contained in:
parent
c4e28a0656
commit
b7439b144a
@ -1661,7 +1661,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements;
|
CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 167;
|
CURRENT_PROJECT_VERSION = 168;
|
||||||
DEVELOPMENT_TEAM = 46DTTB8X4S;
|
DEVELOPMENT_TEAM = 46DTTB8X4S;
|
||||||
INFOPLIST_FILE = AutoCat/Info.plist;
|
INFOPLIST_FILE = AutoCat/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = AutoCat;
|
INFOPLIST_KEY_CFBundleDisplayName = AutoCat;
|
||||||
@ -1690,7 +1690,7 @@
|
|||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements;
|
CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 167;
|
CURRENT_PROJECT_VERSION = 168;
|
||||||
DEVELOPMENT_TEAM = 46DTTB8X4S;
|
DEVELOPMENT_TEAM = 46DTTB8X4S;
|
||||||
INFOPLIST_FILE = AutoCat/Info.plist;
|
INFOPLIST_FILE = AutoCat/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = AutoCat;
|
INFOPLIST_KEY_CFBundleDisplayName = AutoCat;
|
||||||
|
|||||||
@ -26,12 +26,9 @@ struct HistoryScreen: View {
|
|||||||
ForEach(viewModel.vehicleSections) { section in
|
ForEach(viewModel.vehicleSections) { section in
|
||||||
Section(header: Text(section.header)) {
|
Section(header: Text(section.header)) {
|
||||||
ForEach(section.elements) { vehicle in
|
ForEach(section.elements) { vehicle in
|
||||||
if Device.isIPhone {
|
|
||||||
NavigationLink(value: HistoryRoute.localReport(vehicle)) {
|
|
||||||
vehicleCell(vehicle)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
vehicleCell(vehicle)
|
vehicleCell(vehicle)
|
||||||
|
.onTapGesture {
|
||||||
|
viewModel.openVehicleDetail(vehicle)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -145,11 +145,7 @@ final class HistoryViewModel: ACHudContainer {
|
|||||||
if errors.isEmpty {
|
if errors.isEmpty {
|
||||||
hud = nil
|
hud = nil
|
||||||
if !vehicle.unrecognized {
|
if !vehicle.unrecognized {
|
||||||
if Device.isIPhone {
|
openVehicleDetail(vehicle)
|
||||||
Router.shared.openLocalReport(vehicle: vehicle)
|
|
||||||
} else {
|
|
||||||
selectedVehicleId = vehicle.id
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
showErrors(errors)
|
showErrors(errors)
|
||||||
@ -159,6 +155,14 @@ final class HistoryViewModel: ACHudContainer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func openVehicleDetail(_ vehicle: VehicleDto) {
|
||||||
|
if Device.isIPhone {
|
||||||
|
Router.shared.openLocalReport(vehicle: vehicle)
|
||||||
|
} else {
|
||||||
|
selectedVehicleId = vehicle.id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func checkNewNumber(_ number: String) async {
|
func checkNewNumber(_ number: String) async {
|
||||||
await checkVehicle(number: number, type: .normal)
|
await checkVehicle(number: number, type: .normal)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user