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
F3386494: D12239.id40752.diff
Fri, Nov 29, 5:01 AM
Unknown Object (File)
Mon, Nov 18, 6:33 AM
Unknown Object (File)
Tue, Nov 12, 2:04 AM
Unknown Object (File)
Tue, Nov 12, 12:42 AM
Unknown Object (File)
Mon, Nov 11, 10:14 PM
Unknown Object (File)
Mon, Nov 11, 5:40 PM
Unknown Object (File)
Sat, Nov 2, 12:46 AM
Unknown Object (File)
Sat, Nov 2, 12:45 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.