diff --git a/AutoCat.xcodeproj/project.pbxproj b/AutoCat.xcodeproj/project.pbxproj index 6a14f2b..c67e8b4 100644 --- a/AutoCat.xcodeproj/project.pbxproj +++ b/AutoCat.xcodeproj/project.pbxproj @@ -1823,7 +1823,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 153; + CURRENT_PROJECT_VERSION = 154; DEVELOPMENT_TEAM = 46DTTB8X4S; INFOPLIST_FILE = AutoCat/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = AutoCat; @@ -1850,7 +1850,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 153; + CURRENT_PROJECT_VERSION = 154; DEVELOPMENT_TEAM = 46DTTB8X4S; INFOPLIST_FILE = AutoCat/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = AutoCat; diff --git a/AutoCat/Screens/RecordsScreen/RecordsScreen.swift b/AutoCat/Screens/RecordsScreen/RecordsScreen.swift index d9c032d..479ef25 100644 --- a/AutoCat/Screens/RecordsScreen/RecordsScreen.swift +++ b/AutoCat/Screens/RecordsScreen/RecordsScreen.swift @@ -109,16 +109,20 @@ struct RecordsScreen: View { Label("Show recognized text", systemImage: "textformat") } - Button { - viewModel.showOnMap(record) - } label: { - Label("Show on map", systemImage: "map") + if record.event != nil { + Button { + viewModel.showOnMap(record) + } label: { + Label("Show on map", systemImage: "map") + } } - Button { - viewModel.check(record) - } label: { - Label("Check", systemImage: "eye") + if record.number != nil { + Button { + viewModel.check(record) + } label: { + Label("Check", systemImage: "eye") + } } } } diff --git a/AutoCatCore/Services/LocationService/LocationService.swift b/AutoCatCore/Services/LocationService/LocationService.swift index 3c84113..fdba2c5 100644 --- a/AutoCatCore/Services/LocationService/LocationService.swift +++ b/AutoCatCore/Services/LocationService/LocationService.swift @@ -102,6 +102,7 @@ extension LocationService: LocationServiceProtocol { } event.address = try? await getAddressForLocation(latitude: event.latitude, longitude: event.longitude) + event.id = UUID().uuidString return event }