[PR #1679] [MERGED] Fix Clipboard clear after time on iOS #22428

Closed
opened 2026-04-16 22:50:52 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1679
Author: @fedemkr
Created: 12/9/2021
Status: Merged
Merged: 12/10/2021
Merged by: @fedemkr

Base: masterHead: bug/ios-clipboard-clear


📝 Commits (3)

  • 79e3a41 Fixed Clipboard clear after x seconds depending on what the user set. Also refactored a bit to make the Clipboard a custom service to provide a better way to handle this situation #1464
  • 1e564aa Merge branch 'master' into bug/ios-clipboard-clear
  • 7377253 Clear some usings App crushing (#1464)

📊 Changes

17 files changed (+157 additions, -131 deletions)

View changed files

📝 src/Android/Android.csproj (+1 -0)
📝 src/Android/MainActivity.cs (+0 -34)
📝 src/Android/MainApplication.cs (+1 -0)
src/Android/Services/ClipboardService.cs (+57 -0)
📝 src/App/Pages/Generator/GeneratorHistoryPageViewModel.cs (+3 -1)
📝 src/App/Pages/Generator/GeneratorPageViewModel.cs (+4 -1)
📝 src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs (+3 -1)
📝 src/App/Pages/Vault/PasswordHistoryPageViewModel.cs (+3 -1)
📝 src/App/Pages/Vault/ViewPageViewModel.cs (+10 -6)
📝 src/App/Services/MobilePlatformUtilsService.cs (+6 -16)
📝 src/App/Utilities/AppHelpers.cs (+10 -7)
src/Core/Abstractions/IClipboardService.cs (+16 -0)
📝 src/Core/Abstractions/IPlatformUtilsService.cs (+0 -1)
src/iOS.Core/Services/ClipboardService.cs (+40 -0)
📝 src/iOS.Core/Utilities/iOSCoreHelpers.cs (+2 -0)
📝 src/iOS.Core/iOS.Core.csproj (+1 -0)
📝 src/iOS/AppDelegate.cs (+0 -63)

📄 Description

Type of change

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

Objective

This PR fixes the Clipboard clear after time set by the user on Options on iOS

Code changes

  • ClipboardService.cs: Added this service to centralize the clipboard logic
  • MainActivity.cs/AppDelegate.cs: Removed clipboard and messenger related logic and moved it to the service
  • OtherFiles: Changed the old calls to point to the new ClipboardService

Screenshots

Testing requirements

Given that the copy feature has been refactored a bit in order to fix this issue, we should check that values are being copied correctly in the next places of the app (both Android and iOS):

  • Cyphers all values that can be copied (Username, Password, TOTP, Card Number, Security Code, Notes, Send URL)
  • Password generator password
  • Password history password
  • Settings → About

Before you submit

  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • 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/1679 **Author:** [@fedemkr](https://github.com/fedemkr) **Created:** 12/9/2021 **Status:** ✅ Merged **Merged:** 12/10/2021 **Merged by:** [@fedemkr](https://github.com/fedemkr) **Base:** `master` ← **Head:** `bug/ios-clipboard-clear` --- ### 📝 Commits (3) - [`79e3a41`](https://github.com/bitwarden/android/commit/79e3a411d58b1bd4021016bae4959a15940dc024) Fixed Clipboard clear after x seconds depending on what the user set. Also refactored a bit to make the Clipboard a custom service to provide a better way to handle this situation #1464 - [`1e564aa`](https://github.com/bitwarden/android/commit/1e564aa34f7b469f5dc8232a59d66f2808842cbb) Merge branch 'master' into bug/ios-clipboard-clear - [`7377253`](https://github.com/bitwarden/android/commit/7377253d45bf06820028a6b42c6b31c0a455edf7) Clear some usings #1464 ### 📊 Changes **17 files changed** (+157 additions, -131 deletions) <details> <summary>View changed files</summary> 📝 `src/Android/Android.csproj` (+1 -0) 📝 `src/Android/MainActivity.cs` (+0 -34) 📝 `src/Android/MainApplication.cs` (+1 -0) ➕ `src/Android/Services/ClipboardService.cs` (+57 -0) 📝 `src/App/Pages/Generator/GeneratorHistoryPageViewModel.cs` (+3 -1) 📝 `src/App/Pages/Generator/GeneratorPageViewModel.cs` (+4 -1) 📝 `src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs` (+3 -1) 📝 `src/App/Pages/Vault/PasswordHistoryPageViewModel.cs` (+3 -1) 📝 `src/App/Pages/Vault/ViewPageViewModel.cs` (+10 -6) 📝 `src/App/Services/MobilePlatformUtilsService.cs` (+6 -16) 📝 `src/App/Utilities/AppHelpers.cs` (+10 -7) ➕ `src/Core/Abstractions/IClipboardService.cs` (+16 -0) 📝 `src/Core/Abstractions/IPlatformUtilsService.cs` (+0 -1) ➕ `src/iOS.Core/Services/ClipboardService.cs` (+40 -0) 📝 `src/iOS.Core/Utilities/iOSCoreHelpers.cs` (+2 -0) 📝 `src/iOS.Core/iOS.Core.csproj` (+1 -0) 📝 `src/iOS/AppDelegate.cs` (+0 -63) </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 PR fixes the Clipboard clear after time set by the user on Options on iOS ## 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--> * **ClipboardService.cs:** Added this service to centralize the clipboard logic * **MainActivity.cs/AppDelegate.cs:** Removed clipboard and messenger related logic and moved it to the service * **OtherFiles:** Changed the old calls to point to the new `ClipboardService` ## Screenshots <!--Required for any UI changes. Delete if not applicable--> ## Testing requirements <!--What functionality requires testing by QA? This includes testing new behavior and regression testing--> Given that the copy feature has been refactored a bit in order to fix this issue, we should check that values are being copied correctly in the next places of the app (both Android and iOS): - Cyphers all values that can be copied (Username, Password, TOTP, Card Number, Security Code, Notes, Send URL) - Password generator password - Password history password - Settings → About ## Before you submit - [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required) - [ ] This change requires a **documentation update** (notify the documentation team) - [ ] 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 2026-04-16 22:50:52 -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#22428