Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(notifications_push_repository): Delete push subscription when account is deleted #2667

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

provokateurin
Copy link
Member

Part of #2114

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.91%. Comparing base (586aef2) to head (20c0c0d).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2667      +/-   ##
==========================================
+ Coverage   28.90%   28.91%   +0.01%     
==========================================
  Files         372      372              
  Lines      136624   136644      +20     
==========================================
+ Hits        39492    39512      +20     
  Misses      97132    97132              
Flag Coverage Δ *Carryforward flag
account_repository 98.49% <100.00%> (+0.02%) ⬆️
cookie_store 99.48% <ø> (ø) Carriedforward from 586aef2
dashboard_app 96.05% <ø> (ø)
dynamite 31.05% <ø> (ø) Carriedforward from 586aef2
dynamite_end_to_end_test 61.69% <ø> (ø) Carriedforward from 586aef2
dynamite_runtime 85.40% <ø> (ø) Carriedforward from 586aef2
interceptor_http_client 97.18% <ø> (ø) Carriedforward from 586aef2
neon_dashboard 96.05% <ø> (ø) Carriedforward from 586aef2
neon_framework 61.44% <ø> (ø)
neon_http_client 94.32% <ø> (ø) Carriedforward from 586aef2
neon_notifications 100.00% <ø> (ø) Carriedforward from 586aef2
neon_storage 94.66% <ø> (ø) Carriedforward from 586aef2
neon_talk 99.45% <ø> (ø) Carriedforward from 586aef2
nextcloud 24.33% <ø> (ø) Carriedforward from 586aef2
notifications_app 97.43% <ø> (ø)
notifications_push_repository 98.19% <100.00%> (+0.07%) ⬆️
sort_box 90.90% <ø> (ø) Carriedforward from 586aef2
talk_app 99.01% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...account_repository/lib/src/account_repository.dart 100.00% <100.00%> (ø)
...ository/lib/src/notifications_push_repository.dart 99.03% <100.00%> (+0.14%) ⬆️
---- 🚨 Try these New Features:

Copy link
Member

@Leptopoda Leptopoda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't like interlocking the repositories.
I think that the account_bloc should handle this. Once a LogoutEvent is emitted, the bloc should unregister the notifications and afterward remove the account from the repository.

Comment on lines +318 to +320
for (final callback in _beforeLogOutCallbacks) {
await callback(account!);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that running these callbacks in parallel should be ok.
The account_repo can't guarantee execution order anyway.

Please use a Future.wait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants