-
-
Notifications
You must be signed in to change notification settings - Fork 585
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
Conversation
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.
src/crypto/DeviceList.js
Outdated
@@ -0,0 +1,446 @@ | |||
/* | |||
Copyright 2017 OpenMarket Ltd |
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.
VCL
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.
we were OpenMarket when I wrote it ;). Will fix.
} | ||
const res = []; | ||
for (const deviceId in devs) { | ||
if (devs.hasOwnProperty(deviceId)) { |
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.
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.....
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.
yeah, this was deliberately an airlift of the code to another file with absolutely minimal changes.
this LGTM - massive improvement, if only for gathering that stuff into one place rather than dotting it around in crypto/index.js |
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.