From 2dc92e26d32dcf5a8f6314beca01632b2f1a896e Mon Sep 17 00:00:00 2001 From: aAbed <39409020+TheAabedKhan@users.noreply.github.com> Date: Sat, 14 Oct 2023 12:43:18 +0000 Subject: [PATCH] fix(patches-selector): ignore punctuation marks when searching for patch (#1377) --- lib/ui/views/patches_selector/patches_selector_viewmodel.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/views/patches_selector/patches_selector_viewmodel.dart b/lib/ui/views/patches_selector/patches_selector_viewmodel.dart index c164e665..bfd64c3d 100644 --- a/lib/ui/views/patches_selector/patches_selector_viewmodel.dart +++ b/lib/ui/views/patches_selector/patches_selector_viewmodel.dart @@ -209,7 +209,7 @@ class PatchesSelectorViewModel extends BaseViewModel { query.isEmpty || query.length < 2 || patch.name.toLowerCase().contains(query.toLowerCase()) || - patch.getSimpleName().toLowerCase().contains(query.toLowerCase()), + patch.name.replaceAll(RegExp(r'[^\w\s]+'), '').toLowerCase().contains(query.toLowerCase()), ) .toList(); if (_managerAPI.areUniversalPatchesEnabled()) {