* Remove redundant calls to setHasOptionsMenu(false)
Fix memory leaks for credit card and login fragments
* Fixes:
Add link to issue tracker
Use activity?.invalidateOptionsMenu() instead of setHasOptionsMenu(false)
Move it inside of 'if' statement to avoid unintended issues when called improperly
Revert changes to AddLoginFragment.kt
* Fix call invocation to redirectToReAuth() from AddLoginFragment.kt
Fix 'when' statement in redirectToReAuth() to use AddLoginFragment
Co-authored-by: Vitaly V. Pinchuk <vetal.978@gmail.com>
Fetching a set of logins from the store is quite expensive. This commit
avoids doing that while navigating back and forth between the list and
detail views:
- retain processes logins state when navigating into detail view
- use the `get` storage api to obtain specific login, instead of
`list().filter {...}`
- avoid re-sorting retained logins when navigating back into the list
view
Switched to always using `Login` instead of the `SavedPassword` alias.
Made `MasterPasswordTipProvider.saveLogins()` call
`importLoginsAsync()`. This is needed because it's the only method that
inputs a `Login` rather than a `LoginEntry`.
Moved the `SavedLoginsStorageController.kt.syncAndUpdateList` call
to inside `add()` and `update()`. This simplifies the error handling a
bit.
Refactored dupe-checking code to use findLoginToUpdate()
Refactored `AddLoginFragment` / `EditLoginFragment` to put the username
error handling code all in 1 method. I think it's easier to follow the
logic of showing/hiding the error labels when it's all in one place.
This fixes issues #24103 and #24104. I would love to address #24102,
but I'm not sure what the correct behavior is there so I just kept that
the same.
At this moment, we have two extension methods that have duplicate
functionality to construct search term groupings. One on `List<Tab>` and
one on `List<TabSessionState>`. The former is used for everything
related to tabs piped through the `TabsFeature` and the latter is for
consumers of `BrowserState` directly.
The bug occurs because our implementation of search groupings was
updated only on the former extension, but the `HeaderBinding`, that
observes the BrowserState and updates the title visibility, was using
the latter.
Ideally, we remove this duplication when we no longer have separate data
classes for consumers of `TabsFeature`, but this intermediary fix should
suffice.