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)
Mon, Dec 23, 4:00 PM
Unknown Object (File)
Mon, Dec 23, 4:00 PM
Unknown Object (File)
Mon, Dec 23, 4:00 PM
Unknown Object (File)
Mon, Dec 23, 4:00 PM
Unknown Object (File)
Sun, Dec 1, 10:52 AM
Unknown Object (File)
Fri, Nov 29, 5:01 AM
Unknown Object (File)
Nov 18 2024, 6:33 AM
Unknown Object (File)
Nov 12 2024, 2:04 AM
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.Jun 3 2024, 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.