[PR #1907] [MERGED] PS-592 Name field is not prioritised in search results #1687 #3213

Closed
opened 2025-11-26 23:29:46 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1907
Author: @andrebispo5
Created: 5/12/2022
Status: Merged
Merged: 5/23/2022
Merged by: @andrebispo5

Base: masterHead: bug/search_ordering


📝 Commits (1)

  • dc5f70e PS-592 Mobile - Name field is not prioritised in search results

📊 Changes

1 file changed (+30 additions, -18 deletions)

View changed files

📝 src/Core/Services/SearchService.cs (+30 -18)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

When search for ciphers or sends give priority to matches with the Name property, show them first in the results list.

Code changes

  • SearchService.cs: While running the search methods, created two list, one for matches and another for matches with lower priority. After the search, merged the two lists and retuned the results. This ensures that we only iterate through the list once and give it the order we desire.

Screenshots

image

Before you submit

  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/1907 **Author:** [@andrebispo5](https://github.com/andrebispo5) **Created:** 5/12/2022 **Status:** ✅ Merged **Merged:** 5/23/2022 **Merged by:** [@andrebispo5](https://github.com/andrebispo5) **Base:** `master` ← **Head:** `bug/search_ordering` --- ### 📝 Commits (1) - [`dc5f70e`](https://github.com/bitwarden/android/commit/dc5f70e3630d8c02bea38532b6f805418815a567) PS-592 Mobile - Name field is not prioritised in search results ### 📊 Changes **1 file changed** (+30 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `src/Core/Services/SearchService.cs` (+30 -18) </details> ### 📄 Description ## Type of change - [X] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective When search for ciphers or sends give priority to matches with the `Name` property, show them first in the results list. ## Code changes * **SearchService.cs:** While running the search methods, created two list, one for matches and another for matches with lower priority. After the search, merged the two lists and retuned the results. This ensures that we only iterate through the list once and give it the order we desire. ## Screenshots <img width="396" alt="image" src="https://user-images.githubusercontent.com/4648522/168114020-9c12a554-e1cd-4b40-8240-8380cd0c9a60.png"> ## Before you submit - [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required) - [ ] This change requires a **documentation update** (notify the documentation team) - [ ] This change has particular **deployment requirements** (notify the DevOps team) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:29:46 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#3213