Skip to content

Commit

Permalink
Fixes an issue where incorrect item is deleted if the list is filtered
Browse files Browse the repository at this point in the history
  • Loading branch information
afterxleep committed Jul 13, 2024
1 parent ebfcc32 commit 746f1c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Bouncer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = SMSFilter/SMSFilter.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1031;
CURRENT_PROJECT_VERSION = 1034;
DEVELOPMENT_TEAM = JM9222EF99;
INFOPLIST_FILE = SMSFilter/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -714,7 +714,7 @@
CODE_SIGN_ENTITLEMENTS = SMSFilter/SMSFilter.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1031;
CURRENT_PROJECT_VERSION = 1034;
DEVELOPMENT_TEAM = JM9222EF99;
INFOPLIST_FILE = SMSFilter/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -860,7 +860,7 @@
CODE_SIGN_ENTITLEMENTS = Bouncer/Bouncer.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1031;
CURRENT_PROJECT_VERSION = 1034;
DEVELOPMENT_ASSET_PATHS = "\"Bouncer/Preview Content\"";
DEVELOPMENT_TEAM = JM9222EF99;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -891,7 +891,7 @@
CODE_SIGN_ENTITLEMENTS = Bouncer/Bouncer.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1031;
CURRENT_PROJECT_VERSION = 1034;
DEVELOPMENT_ASSET_PATHS = "\"Bouncer/Preview Content\"";
DEVELOPMENT_TEAM = JM9222EF99;
ENABLE_PREVIEWS = YES;
Expand Down
4 changes: 3 additions & 1 deletion Bouncer/Views/FilterList/FilterListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ extension FilterListView {
}
}.onDelete { indices in
for index in indices {
let deletedItem = filteredFilters[index]
let deletedItem = filteredFilters.filter {
searchText.isEmpty ||
$0.phrase.localizedCaseInsensitiveContains(searchText) }[index]
onDelete(deletedItem.id)
}
}
Expand Down

0 comments on commit 746f1c4

Please sign in to comment.