Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factor out device list management #346

Merged
merged 2 commits into from
Feb 2, 2017
Merged

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Feb 2, 2017

crypto/index.js was getting huge, so move the device list update management out
to a separate file.

This shouldn't have any effect on functionality.

crypto/index.js was getting huge, so move the device list update management out
to a separate file.

This shouldn't have any effect on functionality.
@@ -0,0 +1,446 @@
/*
Copyright 2017 OpenMarket Ltd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VCL

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we were OpenMarket when I wrote it ;). Will fix.

}
const res = [];
for (const deviceId in devs) {
if (devs.hasOwnProperty(deviceId)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bit of a shame that we're doing a weird hybrid of const and then horrid hasOwnProperty crap. but this can be fixed up in a later hygiene pass.....

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this was deliberately an airlift of the code to another file with absolutely minimal changes.

@ara4n
Copy link
Member

ara4n commented Feb 2, 2017

this LGTM - massive improvement, if only for gathering that stuff into one place rather than dotting it around in crypto/index.js

@ara4n ara4n assigned richvdh and unassigned dbkr Feb 2, 2017
@richvdh richvdh merged commit 6690f59 into develop Feb 2, 2017
@richvdh richvdh deleted the rav/factor_out_devicelist branch February 2, 2017 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants