[PM-43240] fix: preserve custom authenticator refresh periods when editing - #7370
Open
mvanhorn wants to merge 1 commit into
Open
Conversation
Collaborator
|
Thank you for your contribution! We've added this to our internal tracking system for review. Details on our contribution process can be found here: https://contributing.bitwarden.com/contributing/pull-requests/community-pr-process. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🎟️ Tracking
Change
EditItemData.refreshPeriodto hold integer seconds, and retain the initially loaded period separately in that same Parcelable model so the picker can still offer it after the user temporarily selects a preset. InEditItemViewModel, initialize both values from the entity's actual period, remove thefromSeconds(...) ?: THIRTYconversion, carry integer seconds throughRefreshPeriodOptionClickand its handler, and save the selected value directly toAuthenticatorItemEntity.period. InEditItemScreen, update the callbacks and previews and build the picker from the existing preset seconds plus the original custom period, deduplicated and sorted, using the existingrefresh_period_secondsplural resource for both labels and the selected value.Authenticator 2026.8.0 can scan a working TOTP entry with a 45-second refresh period, but saving an edit to its name or username changes the period to 30 seconds and breaks the generated codes. The September 3 reporter follow-up confirms that the failure occurs after an ordinary metadata edit, making the data-loss behavior concrete despite the feature-oriented issue title. The maintainer initially redirected custom period entry to the feature forum, then reopened the issue for investigation after the bug was clarified. This plan addresses that confirmed defect and displays the imported custom period as a selectable value; a general-purpose manual period editor remains outside this contribution.
Fixes #7347
📔 Objective
Not applicable to this change.
📸 Screenshots
No user-visible surface changes in this PR, so there is nothing to show.