[PR #2125] [MERGED] [SG-703] Login request is not removed after dismissing push notification #3370

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2125
Author: @andrebispo5
Created: 10/11/2022
Status: Merged
Merged: 10/12/2022
Merged by: @andrebispo5

Base: masterHead: bugfix/SG-703-notification-dismiss


📝 Commits (8)

  • 6f5f4ac [SG-703] Handle iOS dismiss notification action. Added core logic to remove passwordless notification from local storage.
  • 5baaec1 [SG-702] Added broadcast receiver to catch dismiss notfication events on android.
  • a37680f Merge branch 'master' into bugfix/SG-703-notification-dismiss
  • 9bf20f9 [SG-703] PR fixes.
  • fa4bbcb Merge branch 'master' into bugfix/SG-703-notification-dismiss
  • 81f90da [SG-703] Fix constants namespaces. Lazyloading services on broadcast receiver.
  • 3dffbd5 [SG-703] Change services to use lazy loading
  • 30ccb97 [SG-703] Change lazy loading to be parameterless.

📊 Changes

8 files changed (+137 additions, -66 deletions)

View changed files

📝 src/Android/Android.csproj (+1 -0)
src/Android/Receivers/NotificationDismissReceiver.cs (+41 -0)
📝 src/Android/Services/AndroidPushNotificationService.cs (+11 -3)
📝 src/App/Abstractions/IPushNotificationListenerService.cs (+1 -0)
📝 src/App/Services/NoopPushNotificationListenerService.cs (+5 -0)
📝 src/App/Services/PushNotificationListenerService.cs (+57 -54)
📝 src/Core/Constants.cs (+1 -1)
📝 src/iOS/Services/iOSPushNotificationHandler.cs (+20 -8)

📄 Description

Type of change

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

Objective

Fixe bug when the user dismissed the passwordless login notification by swiping, the data related to the login request was not erased.

Code changes

src/App/Services/PushNotificationListenerService.cs: added new method to handle notification dismiss events from platforms. This removes from preferences the data stored for that request.
src/iOS/Services/iOSPushNotificationHandler.cs: code to handle the event of dismissing notification on iOS
src/Android/Receivers/NotificationDismissReceiver.cs: new broadcast receiver to handle the dismiss event on Android.
src/Core/Constants.cs: fixed a bug on android where the constant wasn't matching with the property name.

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/2125 **Author:** [@andrebispo5](https://github.com/andrebispo5) **Created:** 10/11/2022 **Status:** ✅ Merged **Merged:** 10/12/2022 **Merged by:** [@andrebispo5](https://github.com/andrebispo5) **Base:** `master` ← **Head:** `bugfix/SG-703-notification-dismiss` --- ### 📝 Commits (8) - [`6f5f4ac`](https://github.com/bitwarden/android/commit/6f5f4acf4d3a6291988aab46b086b9ad5c20b96a) [SG-703] Handle iOS dismiss notification action. Added core logic to remove passwordless notification from local storage. - [`5baaec1`](https://github.com/bitwarden/android/commit/5baaec1ba808851924c65945b287ddb361f310c0) [SG-702] Added broadcast receiver to catch dismiss notfication events on android. - [`a37680f`](https://github.com/bitwarden/android/commit/a37680f707e3f01274e9f5de20910e4e06318c19) Merge branch 'master' into bugfix/SG-703-notification-dismiss - [`9bf20f9`](https://github.com/bitwarden/android/commit/9bf20f967998577aaead0fee567d837d30d9fcbf) [SG-703] PR fixes. - [`fa4bbcb`](https://github.com/bitwarden/android/commit/fa4bbcb90ec79f474fac1e9901d75a9f678bbabe) Merge branch 'master' into bugfix/SG-703-notification-dismiss - [`81f90da`](https://github.com/bitwarden/android/commit/81f90dac7652262732904af637161216f690ee72) [SG-703] Fix constants namespaces. Lazyloading services on broadcast receiver. - [`3dffbd5`](https://github.com/bitwarden/android/commit/3dffbd5d710c4e111b1ccf65a149e4c6f43a8b3d) [SG-703] Change services to use lazy loading - [`30ccb97`](https://github.com/bitwarden/android/commit/30ccb977e1e55b55cd73a14f7a835c0d29228fa2) [SG-703] Change lazy loading to be parameterless. ### 📊 Changes **8 files changed** (+137 additions, -66 deletions) <details> <summary>View changed files</summary> 📝 `src/Android/Android.csproj` (+1 -0) ➕ `src/Android/Receivers/NotificationDismissReceiver.cs` (+41 -0) 📝 `src/Android/Services/AndroidPushNotificationService.cs` (+11 -3) 📝 `src/App/Abstractions/IPushNotificationListenerService.cs` (+1 -0) 📝 `src/App/Services/NoopPushNotificationListenerService.cs` (+5 -0) 📝 `src/App/Services/PushNotificationListenerService.cs` (+57 -54) 📝 `src/Core/Constants.cs` (+1 -1) 📝 `src/iOS/Services/iOSPushNotificationHandler.cs` (+20 -8) </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--> Fixe bug when the user dismissed the passwordless login notification by swiping, the data related to the login request was not erased. ## 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--> **src/App/Services/PushNotificationListenerService.cs:** added new method to handle notification dismiss events from platforms. This removes from preferences the data stored for that request. **src/iOS/Services/iOSPushNotificationHandler.cs:** code to handle the event of dismissing notification on iOS **src/Android/Receivers/NotificationDismissReceiver.cs:** new broadcast receiver to handle the dismiss event on Android. **src/Core/Constants.cs:** fixed a bug on android where the constant wasn't matching with the property name. ## 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:31:49 -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#3370