[PR #1954] [MERGED] [SG-392] Fix for vault filter selection carryover to secondary page #3250

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1954
Author: @mpbw2
Created: 6/15/2022
Status: Merged
Merged: 6/15/2022
Merged by: @mpbw2

Base: masterHead: bugfix-vaultfilter


📝 Commits (2)

  • 880f4f3 separate init and showVaultFilter property set
  • 0ebadf8 make betterer

📊 Changes

3 files changed (+8 additions, -5 deletions)

View changed files

📝 src/App/Pages/Vault/CiphersPageViewModel.cs (+1 -1)
📝 src/App/Pages/Vault/GroupingsPage/GroupingsPageViewModel.cs (+1 -1)
📝 src/App/Pages/VaultFilterViewModel.cs (+6 -3)

📄 Description

Type of change

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

Objective

InitVaultFilterAsync wasn't being called on the secondary view page, resulting in missing data. In order to do that from GroupingsPage the logic for setting the ShowVaultFilter property was broken out into its own method, and only called from the MainPage. Both methods are called back to back on CiphersPage to maintain previous behavior.

Code changes

  • GroupingsPageViewModel.cs: Call InitVaultFilterAsync regardless of page, and ShowVaultFilterIfNeededAsync on MainPage only
  • CiphersPageViewModel.cs: Call InitVaultFilterAsync and ShowVaultFilterIfNeededAsync back to back to maintain previous behavior
  • VaultFilterViewModel.cs: Separate setting of ShowVaultFilter property to its own method ShowVaultFilterIfNeededAsync

Before you submit

  • I have checked for formatting errors (dotnet tool run dotnet-format --check) (required)
  • 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/1954 **Author:** [@mpbw2](https://github.com/mpbw2) **Created:** 6/15/2022 **Status:** ✅ Merged **Merged:** 6/15/2022 **Merged by:** [@mpbw2](https://github.com/mpbw2) **Base:** `master` ← **Head:** `bugfix-vaultfilter` --- ### 📝 Commits (2) - [`880f4f3`](https://github.com/bitwarden/android/commit/880f4f3597856b1c2ca82360006bdd8aab96ae74) separate init and showVaultFilter property set - [`0ebadf8`](https://github.com/bitwarden/android/commit/0ebadf8f37183c4d8decf596cff564dbbaf15812) make betterer ### 📊 Changes **3 files changed** (+8 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Pages/Vault/CiphersPageViewModel.cs` (+1 -1) 📝 `src/App/Pages/Vault/GroupingsPage/GroupingsPageViewModel.cs` (+1 -1) 📝 `src/App/Pages/VaultFilterViewModel.cs` (+6 -3) </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 <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> `InitVaultFilterAsync` wasn't being called on the secondary view page, resulting in missing data. In order to do that from `GroupingsPage` the logic for setting the `ShowVaultFilter` property was broken out into its own method, and only called from the MainPage. Both methods are called back to back on `CiphersPage` to maintain previous behavior. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **GroupingsPageViewModel.cs:** Call `InitVaultFilterAsync` regardless of page, and `ShowVaultFilterIfNeededAsync` on MainPage only * **CiphersPageViewModel.cs:** Call `InitVaultFilterAsync` and `ShowVaultFilterIfNeededAsync` back to back to maintain previous behavior * **VaultFilterViewModel.cs:** Separate setting of `ShowVaultFilter` property to its own method `ShowVaultFilterIfNeededAsync` ## Before you submit - [X] I have checked for formatting errors (`dotnet tool run dotnet-format --check`) (required) - [ ] 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:30:17 -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#3250