-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Enable system-wide object autosubscribe #2612
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2612 +/- ##
==========================================
+ Coverage 33.22% 33.29% +0.07%
==========================================
Files 742 742
Lines 48097 48154 +57
==========================================
+ Hits 15978 16032 +54
- Misses 32119 32122 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
||
@override | ||
Future<NotificationSettings> build() async { | ||
ref.onDispose(() => _poller?.cancel()); |
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 PR revealed a bug in this notifier which lead to it only updating once. The reason was that we need to re-subscribe after each time when we create a new settings object as the old one gets dropped. the new code does that: triggering reset will always subscribe to the new one and add a listener to call reset again.
@@ -388,6 +387,10 @@ impl AttachmentsManager { | |||
self.room.room_id().to_string() | |||
} | |||
|
|||
pub fn object_id_str(&self) -> String { |
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.
the managers for comments and attachments didn't give us a way to subscribe to the parent object, so I added these helpers from the rust side.
@@ -21,11 +19,6 @@ Future<bool> autosubscribe({ | |||
required L10n lang, | |||
SubscriptionSubType? subType, | |||
}) async { |
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.
not a labs anymore
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.
🚀
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.
Get set ready for Acter Buzz!! 🔔
Changes look good to me.
Note:
- Need to resolve few lint errors and unit test before merge.
@@ -21,11 +19,6 @@ Future<bool> autosubscribe({ | |||
required L10n lang, | |||
SubscriptionSubType? subType, | |||
}) async { |
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.
🚀
With the now default-on "autosubscribe" feature, we subscribe the user to all objects they created or interacted with to receive notifications for (unless they "unring" the bell on the object).
This means, that next to the bookmark, all objects now have the 🔔 button indicating whether the user is subscribed to updates from this object and allowing them to toggle that.
Upon creation, edit, comment and attachment, we auto-subscribe the user if they have set the notification setting for that (which is on by default). See it in action:
Autosubscribe upon creation:
object-creation-autosub.mp4
Autosubscribe for pins:
autosub-on-pin.mp4
Autosubscribe for rsvp:
autosubscribe-on-rsvp.mp4
Autosubscribe on edit:
autosubscribe-on-edit.mp4
And for task creation:
subscribes to the task as well as its list:
tasks.mp4
on comments too
autosubscribe-in-comment.mp4