-
-
Notifications
You must be signed in to change notification settings - Fork 828
Add a button to mark all rooms as read #3676
Conversation
Signed-off-by: Aaron Raimist <[email protected]>
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.
otherwise lgtm. Can you include a screenshot of the area this button is in for design review?
Co-Authored-By: Travis Ralston <[email protected]>
MatrixClientPeg.get().getRooms().forEach(function(element) { | ||
MatrixClientPeg.get().sendReadReceipt(function(evs) { | ||
return evs[evs.length - 1] | ||
}(element.getLiveTimeline()._events), {}); |
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.
shouldn't be accessing private variables
https://github.com/matrix-org/matrix-react-sdk/pull/2959/files#diff-beb48c1c7c8677b581a5b4177c817f28R661 shows an alternative
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.
Didn't realize #2959 existed. Let's merge that and you can add another button to there that marks all rooms as read.
_onMarkAllRoomsAsRead = (e) => { | ||
MatrixClientPeg.get().getRooms().forEach(function(element) { | ||
MatrixClientPeg.get().sendReadReceipt(function(evs) { | ||
return evs[evs.length - 1] |
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 linter is annoying sometimes:
return evs[evs.length - 1] | |
return evs[evs.length - 1]; |
Blocking this on design review. |
Helps with element-hq/element-web#850 but it would be nice to add a
Shift + Escape
keyboard shortcut like SlackWorkaround for element-hq/element-web#3060