-
-
Notifications
You must be signed in to change notification settings - Fork 828
Implement push notification toggle in device detail #9308
Conversation
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.
generally this seems fine, though the quality gate wants more tests
function getPusherForDevice(device: DeviceWithVerification): IPusher | null { | ||
return pushers.find(pusher => pusher[PUSHER_DEVICE_ID.name] === device.device_id); | ||
} |
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.
function getPusherForDevice(device: DeviceWithVerification): IPusher | null { | |
return pushers.find(pusher => pusher[PUSHER_DEVICE_ID.name] === device.device_id); | |
} | |
const getPusherForDevice = (device: DeviceWithVerification): IPusher | null => { | |
return pushers.find(pusher => pusher[PUSHER_DEVICE_ID.name] === device.device_id); | |
}; |
I'm paranoid about scope changing randomly on us
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'm not sure I understand the rationale behind this change.
This function, overall declared will be scoped to the function it's declared in. Using const
will scope it to the block it's declared in...
It's the whole concept of closures and sounds more like a stylistic preference
test/components/views/settings/tabs/user/SessionManagerTab-test.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Travis Ralston <travisr@matrix.org>
Co-authored-by: Travis Ralston <travisr@matrix.org>
* Device manager - select all devices ([\#9330](matrix-org/matrix-react-sdk#9330)). Contributed by @kerryarchibald. * New group call experience: Call tiles ([\#9332](matrix-org/matrix-react-sdk#9332)). * Add Shift key to FormatQuote keyboard shortcut ([\#9298](matrix-org/matrix-react-sdk#9298)). Contributed by @owi92. * Device manager - sign out of multiple sessions ([\#9325](matrix-org/matrix-react-sdk#9325)). Contributed by @kerryarchibald. * Display push toggle for web sessions (MSC3890) ([\#9327](matrix-org/matrix-react-sdk#9327)). * Add device notifications enabled switch ([\#9324](matrix-org/matrix-react-sdk#9324)). * Implement push notification toggle in device detail ([\#9308](matrix-org/matrix-react-sdk#9308)). * New group call experience: Starting and ending calls ([\#9318](matrix-org/matrix-react-sdk#9318)). * New group call experience: Room header call buttons ([\#9311](matrix-org/matrix-react-sdk#9311)). * Make device ID copyable in device list ([\#9297](matrix-org/matrix-react-sdk#9297)). Contributed by @duxovni. * Use display name instead of user ID when rendering power events ([\#9295](matrix-org/matrix-react-sdk#9295)). * Read receipts for threads ([\#9239](matrix-org/matrix-react-sdk#9239)). Fixes #23191. * Fix device selection in pre-join screen for Element Call video rooms ([\#9321](matrix-org/matrix-react-sdk#9321)). Fixes #23331. * Don't render a 1px high room topic if the room topic is empty ([\#9317](matrix-org/matrix-react-sdk#9317)). Contributed by @Arnei. * Don't show feedback prompts when that UIFeature is disabled ([\#9305](matrix-org/matrix-react-sdk#9305)). Fixes #23327. * Fix soft crash around unknown room pills ([\#9301](matrix-org/matrix-react-sdk#9301)). Fixes matrix-org/element-web-rageshakes#15465. * Fix spaces feedback prompt wrongly showing when feedback is disabled ([\#9302](matrix-org/matrix-react-sdk#9302)). Fixes #23314. * Fix tile soft crash in ReplyInThreadButton ([\#9300](matrix-org/matrix-react-sdk#9300)). Fixes matrix-org/element-web-rageshakes#15493.
Implements the UI side of matrix-org/matrix-spec-proposals#3881
Fixes https://element-io.atlassian.net/browse/PSG-708
Acceptance criterias:
Checklist
Here's what your changelog entry will look like:
✨ Features