Page MenuHomePhabricator

[lib] Add function to remove device from device list
ClosedPublic

Authored by bartek on May 29 2024, 9:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 19, 12:16 PM
Unknown Object (File)
Sun, Jun 16, 9:08 AM
Unknown Object (File)
Sat, Jun 15, 4:06 PM
Unknown Object (File)
Tue, Jun 11, 4:15 PM
Unknown Object (File)
Mon, Jun 10, 8:38 PM
Unknown Object (File)
Mon, Jun 10, 5:41 PM
Unknown Object (File)
Mon, Jun 10, 12:20 AM
Unknown Object (File)
Sun, Jun 9, 5:43 PM
Subscribers

Details

Summary

Analogical to addDeviceToDeviceList(), added a function that removes a device.

Depends on D12238

Test Plan

Unit tests added in the next diff

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.May 29 2024, 10:12 AM
kamil added inline comments.
lib/shared/device-list-utils.js
211 ↗(On Diff #40752)

Just wondering, shouldn't we throw here? Is there any use-case where we might know that we're attempting to remove a non-existing device?

This revision is now accepted and ready to land.Mon, Jun 3, 4:40 AM
lib/shared/device-list-utils.js
211 ↗(On Diff #40752)

In theory we could throw, but I wanted to keep parity with adding device to list which is idempotent if device already exist.