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; 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 = 153; CURRENT_PROJECT_VERSION = 154;
DEVELOPMENT_TEAM = 46DTTB8X4S; DEVELOPMENT_TEAM = 46DTTB8X4S;
INFOPLIST_FILE = AutoCat/Info.plist; INFOPLIST_FILE = AutoCat/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = AutoCat; INFOPLIST_KEY_CFBundleDisplayName = AutoCat;
@ -1850,7 +1850,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 = 153; CURRENT_PROJECT_VERSION = 154;
DEVELOPMENT_TEAM = 46DTTB8X4S; DEVELOPMENT_TEAM = 46DTTB8X4S;
INFOPLIST_FILE = AutoCat/Info.plist; INFOPLIST_FILE = AutoCat/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = AutoCat; INFOPLIST_KEY_CFBundleDisplayName = AutoCat;

View File

@ -109,16 +109,20 @@ struct RecordsScreen: View {
Label("Show recognized text", systemImage: "textformat") Label("Show recognized text", systemImage: "textformat")
} }
if record.event != nil {
Button { Button {
viewModel.showOnMap(record) viewModel.showOnMap(record)
} label: { } label: {
Label("Show on map", systemImage: "map") Label("Show on map", systemImage: "map")
} }
}
if record.number != nil {
Button { Button {
viewModel.check(record) viewModel.check(record)
} label: { } label: {
Label("Check", systemImage: "eye") 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.address = try? await getAddressForLocation(latitude: event.latitude, longitude: event.longitude)
event.id = UUID().uuidString
return event return event
} }