[PR #3456] [MERGED] PM-8534 update the active account after a "soft logout" #30244

Closed
opened 2026-04-18 14:03:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/3456
Author: @dseverns-livefront
Created: 7/12/2024
Status: Merged
Merged: 7/17/2024
Merged by: @dseverns-livefront

Base: mainHead: PM-8534-autoswitch-to-next-account


📝 Commits (9)

  • 0e89ae4 PM-8534 update the active account after a "soft logout" if other accounts are available, also pre-populate user email if they are soft logged out like in the prod app.
  • 0693a51 pr feedback
  • 9a73dbd don't prepopulate with active email if adding new account
  • bcfb788 formatting
  • 822ed8d plz
  • 2ce2aba consistency
  • b562408 PR feedback
  • 908b3c7 detekt fr fr
  • 43cb897 add context to comment

📊 Changes

7 files changed (+279 additions, -43 deletions)

View changed files

📝 app/src/main/java/com/x8bit/bitwarden/data/auth/manager/UserLogoutManagerImpl.kt (+51 -25)
📝 app/src/main/java/com/x8bit/bitwarden/data/autofill/util/CipherViewExtensions.kt (+1 -1)
📝 app/src/main/java/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerImpl.kt (+12 -0)
📝 app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingViewModel.kt (+49 -5)
📝 app/src/test/java/com/x8bit/bitwarden/data/auth/manager/UserLogoutManagerTest.kt (+42 -12)
📝 app/src/test/java/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerTest.kt (+56 -0)
📝 app/src/test/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingViewModelTest.kt (+68 -0)

📄 Description

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-8534

📔 Objective

If more than one accounts are available and one has LOGOUT as the session timeout action, the app should switch to the next active account. Additionally added pre-populating the email input if ending up on the Landing screen when switching to the "soft" logged out account.

📸 Screenshots

https://github.com/user-attachments/assets/d1496bde-244e-4d63-ac49-9541c26d4df1

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

🔄 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/3456 **Author:** [@dseverns-livefront](https://github.com/dseverns-livefront) **Created:** 7/12/2024 **Status:** ✅ Merged **Merged:** 7/17/2024 **Merged by:** [@dseverns-livefront](https://github.com/dseverns-livefront) **Base:** `main` ← **Head:** `PM-8534-autoswitch-to-next-account` --- ### 📝 Commits (9) - [`0e89ae4`](https://github.com/bitwarden/android/commit/0e89ae4b9162c91f7d975cd3e42258645d68cf4a) PM-8534 update the active account after a "soft logout" if other accounts are available, also pre-populate user email if they are soft logged out like in the prod app. - [`0693a51`](https://github.com/bitwarden/android/commit/0693a511a51ad21ab3b39539eca2793b6b6e26c2) pr feedback - [`9a73dbd`](https://github.com/bitwarden/android/commit/9a73dbd91cdd51b306c72026d4bdb46ea4b93b98) don't prepopulate with active email if adding new account - [`bcfb788`](https://github.com/bitwarden/android/commit/bcfb7888721377e4a057076839839e899b582844) formatting - [`822ed8d`](https://github.com/bitwarden/android/commit/822ed8d4471e590a009862e0bd38821f24b0fd3e) plz - [`2ce2aba`](https://github.com/bitwarden/android/commit/2ce2abaac34452cff49a10d979bfeb33b9b7fe02) consistency - [`b562408`](https://github.com/bitwarden/android/commit/b562408895c04db4922de1965cf07744a5afdc59) PR feedback - [`908b3c7`](https://github.com/bitwarden/android/commit/908b3c735862487e4742e0ef8b1c0b186857a792) detekt fr fr - [`43cb897`](https://github.com/bitwarden/android/commit/43cb897d01dc5f09c6bae92d6451a25d751a5880) add context to comment ### 📊 Changes **7 files changed** (+279 additions, -43 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/java/com/x8bit/bitwarden/data/auth/manager/UserLogoutManagerImpl.kt` (+51 -25) 📝 `app/src/main/java/com/x8bit/bitwarden/data/autofill/util/CipherViewExtensions.kt` (+1 -1) 📝 `app/src/main/java/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerImpl.kt` (+12 -0) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingViewModel.kt` (+49 -5) 📝 `app/src/test/java/com/x8bit/bitwarden/data/auth/manager/UserLogoutManagerTest.kt` (+42 -12) 📝 `app/src/test/java/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerTest.kt` (+56 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/auth/feature/landing/LandingViewModelTest.kt` (+68 -0) </details> ### 📄 Description ## 🎟️ Tracking https://bitwarden.atlassian.net/browse/PM-8534 <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> ## 📔 Objective If more than one accounts are available and one has `LOGOUT` as the session timeout action, the app should switch to the next active account. Additionally added pre-populating the email input if ending up on the Landing screen when switching to the "soft" logged out account. <!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. --> ## 📸 Screenshots https://github.com/user-attachments/assets/d1496bde-244e-4d63-ac49-9541c26d4df1 <!-- Required for any UI changes; delete if not applicable. Use fixed width images for better display. --> ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes --- <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 2026-04-18 14:03:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#30244