Fixed crash on adding audio record

This commit is contained in:
Selim Mustafaev 2025-04-06 17:24:04 +03:00
parent d94ced5c7e
commit 6b003990b8
3 changed files with 15 additions and 10 deletions

View File

@ -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;

View File

@ -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")
}
}
}
}

View File

@ -102,6 +102,7 @@ extension LocationService: LocationServiceProtocol {
}
event.address = try? await getAddressForLocation(latitude: event.latitude, longitude: event.longitude)
event.id = UUID().uuidString
return event
}