[PR #2606] [MERGED] [PM-2901] Synchronize sends on send creation/update/deletion notification #51891

Closed
opened 2026-05-01 15:36:21 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2606
Author: @quexten
Created: 7/9/2023
Status: Merged
Merged: 8/8/2023
Merged by: @aj-rosado

Base: masterHead: feature/sync-on-send-changed


📝 Commits (9)

  • dc6a0bb Add sync on send create/update/delete notification
  • fc79042 Update send notifications to only sync sends
  • 39881d2 Fix incorrect notification type in PushNotificationListenerService
  • 73f3ffc Invert if to improve readability
  • 743bf06 Simplify shouldUpdate logic in SyncUpsertSendAsync
  • ed75aa7 Merge branch 'master' into feature/sync-on-send-changed
  • cd45992 Further simplify SyncService code
  • c5f1df6 Fix if condition in SyncService
  • d151efb Fixed whitespace formatting

📊 Changes

4 files changed (+87 additions, -0 deletions)

View changed files

📝 src/App/Services/PushNotificationListenerService.cs (+18 -0)
📝 src/Core/Abstractions/ISyncService.cs (+2 -0)
📝 src/Core/Models/Response/NotificationResponse.cs (+7 -0)
📝 src/Core/Services/SyncService.cs (+60 -0)

📄 Description

Type of change

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

Objective

Fixes #2571. On desktop/web, sends are synced when the Websocket notification notifying the clients of the creation/update/deletion arrives. On mobile this is not implemented. This PR brings feature parity in that regard by implementing syncing send creation/updates/deletions on arrival of the Firebase notification.

Beware, I was not able to fully test this as the default config builds for the QA push environment.

Code changes

  • PushNotificationListenerService.cs Add code handling the 3 send notification types (creation, update, deletion). The code is pretty much the same as for ciphers.
  • NotificationResponse.cs Add a class to contain send sync notification data
  • ISyncService.cs, SyncService.cs Add code for doing a sync for sends.

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/2606 **Author:** [@quexten](https://github.com/quexten) **Created:** 7/9/2023 **Status:** ✅ Merged **Merged:** 8/8/2023 **Merged by:** [@aj-rosado](https://github.com/aj-rosado) **Base:** `master` ← **Head:** `feature/sync-on-send-changed` --- ### 📝 Commits (9) - [`dc6a0bb`](https://github.com/bitwarden/android/commit/dc6a0bbd33342832a41b88dd7e1c8cb7808dc94a) Add sync on send create/update/delete notification - [`fc79042`](https://github.com/bitwarden/android/commit/fc79042212b689aef8bcfae0dc0f73fe77984b93) Update send notifications to only sync sends - [`39881d2`](https://github.com/bitwarden/android/commit/39881d2c7f753fb648fd7dd84b16649cc729dc13) Fix incorrect notification type in PushNotificationListenerService - [`73f3ffc`](https://github.com/bitwarden/android/commit/73f3ffceb2660170b38b5d3316eac3568a6aa741) Invert if to improve readability - [`743bf06`](https://github.com/bitwarden/android/commit/743bf06b24514459a236efd43fa9e297948ed8f9) Simplify shouldUpdate logic in SyncUpsertSendAsync - [`ed75aa7`](https://github.com/bitwarden/android/commit/ed75aa794224e6f0aa0f44030f796c2d93876f52) Merge branch 'master' into feature/sync-on-send-changed - [`cd45992`](https://github.com/bitwarden/android/commit/cd45992e6bffd37bfb41e34e0b5a51fc48867cdc) Further simplify SyncService code - [`c5f1df6`](https://github.com/bitwarden/android/commit/c5f1df6e4c07d38f812b3643883bb5743bee2b36) Fix if condition in SyncService - [`d151efb`](https://github.com/bitwarden/android/commit/d151efb58fe7fe60d955a6f52df228f71a0115a1) Fixed whitespace formatting ### 📊 Changes **4 files changed** (+87 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Services/PushNotificationListenerService.cs` (+18 -0) 📝 `src/Core/Abstractions/ISyncService.cs` (+2 -0) 📝 `src/Core/Models/Response/NotificationResponse.cs` (+7 -0) 📝 `src/Core/Services/SyncService.cs` (+60 -0) </details> ### 📄 Description ## Type of change - [x] Bug fix - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [x] New feature development - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective Fixes #2571. On desktop/web, sends are synced when the Websocket notification notifying the clients of the creation/update/deletion arrives. On mobile this is not implemented. This PR brings feature parity in that regard by implementing syncing send creation/updates/deletions on arrival of the Firebase notification. Beware, I was not able to fully test this as the default config builds for the QA push environment. ## 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--> * PushNotificationListenerService.cs Add code handling the 3 send notification types (creation, update, deletion). The code is pretty much the same as for ciphers. * NotificationResponse.cs Add a class to contain send sync notification data * ISyncService.cs, SyncService.cs Add code for doing a sync for sends. ## 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 2026-05-01 15:36:21 -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#51891