diff --git a/android/Omnivore/app/build.gradle b/android/Omnivore/app/build.gradle index 20edc8534..f59202c02 100644 --- a/android/Omnivore/app/build.gradle +++ b/android/Omnivore/app/build.gradle @@ -17,8 +17,8 @@ android { applicationId "app.omnivore.omnivore" minSdk 26 targetSdk 33 - versionCode 92 - versionName "0.0.92" + versionCode 93 + versionName "0.0.93" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { diff --git a/apple/OmnivoreKit/Sources/App/AppExtensions/Share/Views/ShareExtensionView.swift b/apple/OmnivoreKit/Sources/App/AppExtensions/Share/Views/ShareExtensionView.swift index 621dd53dc..2004f9600 100644 --- a/apple/OmnivoreKit/Sources/App/AppExtensions/Share/Views/ShareExtensionView.swift +++ b/apple/OmnivoreKit/Sources/App/AppExtensions/Share/Views/ShareExtensionView.swift @@ -188,10 +188,11 @@ public struct ShareExtensionView: View { action: { labelsViewModel.showCreateLabelModal = true }, label: { HStack { + let trimmedLabelName = labelsViewModel.labelSearchFilter.trimmingCharacters(in: .whitespacesAndNewlines) Image(systemName: "tag").foregroundColor(.blue) Text( labelsViewModel.labelSearchFilter.count > 0 ? - "Create: \"\(labelsViewModel.labelSearchFilter)\" label" : + "Create: \"\(trimmedLabelName)\" label" : LocalText.createLabelMessage ).foregroundColor(.blue) .font(Font.system(size: 14)) diff --git a/apple/OmnivoreKit/Sources/App/Views/Labels/ApplyLabelsView.swift b/apple/OmnivoreKit/Sources/App/Views/Labels/ApplyLabelsView.swift index 3dc1f664f..8da9ead0a 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Labels/ApplyLabelsView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Labels/ApplyLabelsView.swift @@ -117,10 +117,11 @@ struct ApplyLabelsView: View { action: { viewModel.showCreateLabelModal = true }, label: { HStack { + let trimmedLabelName = viewModel.labelSearchFilter.trimmingCharacters(in: .whitespacesAndNewlines) Image(systemName: "tag").foregroundColor(.blue) Text( viewModel.labelSearchFilter.count > 0 ? - "Create: \"\(viewModel.labelSearchFilter)\" label" : + "Create: \"\(trimmedLabelName)\" label" : LocalText.createLabelMessage ).foregroundColor(.blue) .font(Font.system(size: 14)) diff --git a/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsView.swift b/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsView.swift index f4a324d74..7473d8b25 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsView.swift @@ -54,10 +54,11 @@ struct LabelsView: View { action: { viewModel.showCreateLabelModal = true }, label: { HStack { + let trimmedLabelName = viewModel.labelSearchFilter.trimmingCharacters(in: .whitespacesAndNewlines) Image(systemName: "tag").foregroundColor(.blue) Text( viewModel.labelSearchFilter.count > 0 ? - "Create: \"\(viewModel.labelSearchFilter)\" label" : + "Create: \"\(trimmedLabelName)\" label" : LocalText.createLabelMessage ).foregroundColor(.blue) .font(Font.system(size: 14)) diff --git a/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsViewModel.swift b/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsViewModel.swift index 3b77aad24..10525fa35 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsViewModel.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsViewModel.swift @@ -84,8 +84,9 @@ import Views func createLabel(dataService: DataService, name: String, color: Color, description: String?) { isLoading = true + let trimmedName = name.trimmingCharacters(in: .whitespacesAndNewlines) guard let labelObjectID = try? dataService.createLabel( - name: name, + name: trimmedName, color: color.hex ?? "", description: description ) else {