forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ios] Make Password manager load model respect search mode
This patch fixes a crash in PasswordManagerViewController. The loadModel method was inserting items that were removed while the VC was in search mode. In search mode, the VC removes some items and sections, only leaving the password list that gets filtered as the user types in the search bar. If an event occurred triggering a data reload, such as a change in the saved password list, while in search mode, loadModel was re-adding items/sections that are not supposed to be visible in search mode. Then when the search controller was dismissed, a crash was happening while we were adding the items/sections removed when the search started, as we were duplicating sections in the model. This patch adds checks in loadModel to add items/sections depending on the search state of the VC. Now items that are not visible in search mode are not added in loadModel. The patch also removes a redundant flag to determine if the VC is in search mode and adds a unit test to verify the behavior when an a saved password update is received while in search mode. Fixed: 1421230 Change-Id: I386a9a6f0751f7a0ef456feac84dcb4428ad980b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4316822 Commit-Queue: Ernesto Izquierdo Clua <eic@google.com> Reviewed-by: Tommy Martino <tmartino@chromium.org> Cr-Commit-Position: refs/heads/main@{#1114839}
- Loading branch information
Ernesto Izquierdo Clua
authored and
Chromium LUCI CQ
committed
Mar 8, 2023
1 parent
c6bd95f
commit 754dbed
Showing
2 changed files
with
144 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters