-
Notifications
You must be signed in to change notification settings - Fork 252
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
ffi: expose the notification settings #2223
Conversation
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #2223 +/- ##
=======================================
Coverage 76.82% 76.82%
=======================================
Files 167 167
Lines 17748 17748
=======================================
Hits 13635 13635
Misses 4113 4113 ☔ View full report in Codecov by Sentry. |
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.
Looks good, the ULD needs a newline at the end and I believe that we can even skip modifying the UDL completely.
bindings/matrix-sdk-ffi/src/api.udl
Outdated
|
||
callback interface NotificationSettingsDelegate { | ||
void settings_did_change(); | ||
}; |
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.
Missing newline at the end. @jplatte am I imagining things or can we now define callback interfaces via proc macros?
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.
We can :)
#[uniffi::export(callback_interface)]
trait NotificationSettingsDelegate { /* ... */ }
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.
Right, let's do that then. Thanks.
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.
Oh nice. Ok, I've updated the branch.
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.
Looks good. If CI passes we can merge.
This PR is the last step of the #1959 implementation.
It exposes the
notification_settings
crate to update notification settings for a room, and to define whether certain predefined push rules are enabled.A
NotificationSettingsDelegate
can be defined to notify the client application each time push rules are updated.