fix: delete all thread should not include fav #5864
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe Your Changes
This pull request updates the
deleteAllThreads
method in theuseThreads
hook to preserve favorite threads while deleting non-favorite ones. Additionally, it modifies the search index logic to reflect the remaining threads.Changes to thread deletion logic:
web-app/src/hooks/useThreads.ts
: Updated thedeleteAllThreads
method to filter threads into favorite and non-favorite categories, ensuring only non-favorite threads are deleted. Favorite threads are retained and restructured into theremainingThreads
object.Changes to search index:
web-app/src/hooks/useThreads.ts
: Modified thesearchIndex
initialization to use the remaining favorite threads, with a selector function targeting thetitle
property for indexing.Fixes Issues
Self Checklist
Important
deleteAllThreads
inuseThreads.ts
now retains favorite threads and updates the search index accordingly.deleteAllThreads
inuseThreads.ts
now retains favorite threads, deleting only non-favorite ones.searchIndex
to reflect remaining favorite threads using theirtitle
for indexing.This description was created by
for 9a95257. You can customize this summary. It will automatically update as commits are pushed.