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

Add option to enable/disable bluetooth collection. #597

Merged
merged 1 commit into from
Sep 13, 2016
Merged

Conversation

f2prateek
Copy link
Contributor

Also disables bluetooth collection by default.

Also disables bluetooth collection by default.
@f2prateek
Copy link
Contributor Author

cc @tonyxiao

@@ -236,7 +238,7 @@ - (NSDictionary *)liveContext
context[@"network"] = ({
NSMutableDictionary *network = [[NSMutableDictionary alloc] init];

if (self.bluetooth.hasKnownState)
if (self.bluetooth && self.bluetooth.hasKnownState)
Copy link
Contributor

Choose a reason for hiding this comment

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

FWIW in Objc if self.bluetooth is nil then self.bluetooth.hasKnownState will evaluate to NO automatically. It's kind of an idiomatic objc thing, but of course both way works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I was considering not adding the self.bluetooth check - I don't have a strong preference either way so I ended up adding it.

@tonyxiao
Copy link
Contributor

lgtm

@f2prateek f2prateek merged commit 58cc1bb into dev Sep 13, 2016
@f2prateek f2prateek deleted the bluetooth branch September 13, 2016 02:24
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.

2 participants