[PR #2440] [MERGED] [PM-1567] Fix for vault timeout 'never' not persisting #3568

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2440
Author: @mpbw2
Created: 3/24/2023
Status: Merged
Merged: 3/24/2023
Merged by: @mpbw2

Base: masterHead: bugfix/vault-timeout-never


📝 Commits (1)

  • 0df1640 [PM-1567] Fix for vault timeout 'never' not persisting

📊 Changes

1 file changed (+10 additions, -3 deletions)

View changed files

📝 src/Core/Services/StateService.cs (+10 -3)

📄 Description

Type of change

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

Objective

This fixes the issue where the vault timeout option Never would not persist. Originally null represented this option but a recent change returned defaults in the StateService getters, breaking the null handling. This restores the null support in the getters, and sets the defaults on first login in ScaffoldNewAccountAsync to restore this functionality without breaking the recent change to retain settings on logout.

Code changes

  • StateService.cs: Remove null fallback values from GetVaultTimeoutAsync and GetVaultTimeoutActionAsync, and set initial defaults in ScaffoldNewAccountAsync

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If 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/2440 **Author:** [@mpbw2](https://github.com/mpbw2) **Created:** 3/24/2023 **Status:** ✅ Merged **Merged:** 3/24/2023 **Merged by:** [@mpbw2](https://github.com/mpbw2) **Base:** `master` ← **Head:** `bugfix/vault-timeout-never` --- ### 📝 Commits (1) - [`0df1640`](https://github.com/bitwarden/android/commit/0df1640e3bfb1a186d12e6df068193378e1253fb) [PM-1567] Fix for vault timeout 'never' not persisting ### 📊 Changes **1 file changed** (+10 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/Core/Services/StateService.cs` (+10 -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--> This fixes the issue where the vault timeout option `Never` would not persist. Originally `null` represented this option but a [recent change](https://github.com/bitwarden/mobile/pull/2366) returned defaults in the `StateService` getters, breaking the null handling. This restores the null support in the getters, and sets the defaults on first login in `ScaffoldNewAccountAsync` to restore this functionality without breaking the recent change to retain settings on logout. ## 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--> * **StateService.cs:** Remove null fallback values from `GetVaultTimeoutAsync` and `GetVaultTimeoutActionAsync`, and set initial defaults in `ScaffoldNewAccountAsync` ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If 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:34:31 -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#3568