-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat(notifications_push_repository): Init #2482
base: main
Are you sure you want to change the base?
Conversation
Also makes it possible to implement #213 later. |
d3ef216
to
7d16bc0
Compare
Should we land the repository and the migration changes in separate PRs? Both commits are already huge to begin with. |
Hm if we only have 2 PRs I'd say just merge the repository into main and then later the refactor. |
7d16bc0
to
e8880db
Compare
I removed the framework commit and pushed it to a separate branch. Once merged I'll open a new PR for that. |
e8880db
to
fad21d1
Compare
I rebased this, but while testing I found an error with the push subscription registration. |
fad21d1
to
7ec5abb
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2482 +/- ##
==========================================
+ Coverage 28.47% 28.58% +0.10%
==========================================
Files 352 359 +7
Lines 135907 136125 +218
==========================================
+ Hits 38699 38910 +211
- Misses 97208 97215 +7
*This pull request uses carry forward flags. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work.
I'm not a big fan of the code style in the repo.
Many methods in there do not take any parameters and rely on the global state of the repo. I've already outlined most of my concerns, and maybe fixing them is enough.
final Serializers _serializers = (Serializers().toBuilder() | ||
..add(notifications.DecryptedSubject.serializer) | ||
..add(PushNotification.serializer) | ||
..addPlugin(StandardJsonPlugin())) | ||
.build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you use a separate file with a single serializer for every model?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was just copied from the framework. I can change it 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I get what you mean 🤔
...eon_framework/packages/notifications_push_repository/lib/src/notifications_push_storage.dart
Outdated
Show resolved
Hide resolved
..._framework/packages/notifications_push_repository/lib/src/notifications_push_repository.dart
Outdated
Show resolved
Hide resolved
..._framework/packages/notifications_push_repository/lib/src/notifications_push_repository.dart
Outdated
Show resolved
Hide resolved
..._framework/packages/notifications_push_repository/lib/src/notifications_push_repository.dart
Show resolved
Hide resolved
..._framework/packages/notifications_push_repository/lib/src/notifications_push_repository.dart
Outdated
Show resolved
Hide resolved
..._framework/packages/notifications_push_repository/lib/src/notifications_push_repository.dart
Outdated
Show resolved
Hide resolved
..._framework/packages/notifications_push_repository/lib/src/notifications_push_repository.dart
Outdated
Show resolved
Hide resolved
packages/neon_framework/packages/notifications_push_repository/lib/src/utils/encryption.dart
Show resolved
Hide resolved
..._framework/packages/notifications_push_repository/lib/src/notifications_push_repository.dart
Outdated
Show resolved
Hide resolved
…Store Signed-off-by: provokateurin <[email protected]>
Signed-off-by: provokateurin <[email protected]>
Signed-off-by: provokateurin <[email protected]>
7ec5abb
to
4d72c86
Compare
Fixes #577
Depends on #2407 (due to an ugly cyclic dependency)
The framework part can probably be improved, but I just wanted to put out the repository so it can get reviewed.
The repository now handles all possible things that could go wrong and retries registering at UnifiedPush or Nextcloud if necessary. This should make push notifications super reliable and usable.