{"action":"created","comment":{"url":"https://api.github.com/repos/ps2/rileylink_ios/pulls/comments/71385665","id":71385665,"diff_hunk":"@@ -44,16 +55,25 @@ public class RileyLinkDeviceTableViewController: UITableViewController, TextFiel\n \n     private func observe() {\n         let center = NSNotificationCenter.defaultCenter()\n-\n-        deviceObserver = center.addObserverForName(RileyLinkDeviceManager.NameDidChangeNotification, object: nil, queue: nil) { [weak self = self] (note) -> Void in\n-\n+        \n+        notificationObservers = [\n+            center.addObserverForName(RileyLinkDeviceManager.NameDidChangeNotification, object: nil, queue: nil) { [weak self = self] (note) -> Void in\n+                \n                 let indexPath = NSIndexPath(forRow: DeviceRow.CustomName.rawValue, inSection: Section.Device.rawValue)\n                 self?.tableView.reloadRowsAtIndexPaths([indexPath], withRowAnimation: .None)\n                 self?.title = self?.device.name\n-        }\n+            },\n+            center.addObserverForName(RileyLinkDeviceManager.ConnectionStateDidChangeNotification, object: nil, queue: nil) { [weak self = self] (note) -> Void in\n+                let indexPath = NSIndexPath(forRow: DeviceRow.Connection.rawValue, inSection: Section.Device.rawValue)","path":"RileyLinkKit/UI/RileyLinkDeviceTableViewController.swift","position":41,"original_position":41,"commit_id":"59473820f7e1d8b7a819c12adeb9ad1a5d924559","original_commit_id":"59473820f7e1d8b7a819c12adeb9ad1a5d924559","user":{"login":"loudnate","id":212876,"avatar_url":"https://avatars.githubusercontent.com/u/212876?v=3","gravatar_id":"","url":"https://api.github.com/users/loudnate","html_url":"https://github.com/loudnate","followers_url":"https://api.github.com/users/loudnate/followers","following_url":"https://api.github.com/users/loudnate/following{/other_user}","gists_url":"https://api.github.com/users/loudnate/gists{/gist_id}","starred_url":"https://api.github.com/users/loudnate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loudnate/subscriptions","organizations_url":"https://api.github.com/users/loudnate/orgs","repos_url":"https://api.github.com/users/loudnate/repos","events_url":"https://api.github.com/users/loudnate/events{/privacy}","received_events_url":"https://api.github.com/users/loudnate/received_events","type":"User","site_admin":false},"body":"I wouldn't assume this block is called on the main queue,","created_at":"2016-07-19T17:35:57Z","updated_at":"2016-07-19T17:35:57Z","html_url":"https://github.com/ps2/rileylink_ios/pull/162#discussion_r71385665","pull_request_url":"https://api.github.com/repos/ps2/rileylink_ios/pulls/162","_links":{"self":{"href":"https://api.github.com/repos/ps2/rileylink_ios/pulls/comments/71385665"},"html":{"href":"https://github.com/ps2/rileylink_ios/pull/162#discussion_r71385665"},"pull_request":{"href":"https://api.github.com/repos/ps2/rileylink_ios/pulls/162"}}},"pull_request":{"url":"https://api.github.com/repos/ps2/rileylink_ios/pulls/162","id":78008476,"html_url":"https://github.com/ps2/rileylink_ios/pull/162","diff_url":"https://github.com/ps2/rileylink_ios/pull/162.diff","patch_url":"https://github.com/ps2/rileylink_ios/pull/162.patch","issue_url":"https://api.github.com/repos/ps2/rileylink_ios/issues/162","number":162,"state":"open","locked":false,"title":"Update connection state and RSSI in device view","user":{"login":"ps2","id":14649,"avatar_url":"https://avatars.githubusercontent.com/u/14649?v=3","gravatar_id":"","url":"https://api.github.com/users/ps2","html_url":"https://github.com/ps2","followers_url":"https://api.github.com/users/ps2/followers","following_url":"https://api.github.com/users/ps2/following{/other_user}","gists_url":"https://api.github.com/users/ps2/gists{/gist_id}","starred_url":"https://api.github.com/users/ps2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ps2/subscriptions","organizations_url":"https://api.github.com/users/ps2/orgs","repos_url":"https://api.github.com/users/ps2/repos","events_url":"https://api.github.com/users/ps2/events{/privacy}","received_events_url":"https://api.github.com/users/ps2/received_events","type":"User","site_admin":false},"body":"Show connection updates in device view, and update RSSI every 5 seconds.","created_at":"2016-07-19T16:32:18Z","updated_at":"2016-07-19T17:35:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"01a2965b6d5f5fdbda0811d678daf3aea7bd2ff9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ps2/rileylink_ios/pulls/162/commits","review_comments_url":"https://api.github.com/repos/ps2/rileylink_ios/pulls/162/comments","review_comment_url":"https://api.github.com/repos/ps2/rileylink_ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ps2/rileylink_ios/issues/162/comments","statuses_url":"https://api.github.com/repos/ps2/rileylink_ios/statuses/59473820f7e1d8b7a819c12adeb9ad1a5d924559","head":{"label":"ps2:connection-state-update","ref":"connection-state-update","sha":"59473820f7e1d8b7a819c12adeb9ad1a5d924559","user":{"login":"ps2","id":14649,"avatar_url":"https://avatars.githubusercontent.com/u/14649?v=3","gravatar_id":"","url":"https://api.github.com/users/ps2","html_url":"https://github.com/ps2","followers_url":"https://api.github.com/users/ps2/followers","following_url":"https://api.github.com/users/ps2/following{/other_user}","gists_url":"https://api.github.com/users/ps2/gists{/gist_id}","starred_url":"https://api.github.com/users/ps2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ps2/subscriptions","organizations_url":"https://api.github.com/users/ps2/orgs","repos_url":"https://api.github.com/users/ps2/repos","events_url":"https://api.github.com/users/ps2/events{/privacy}","received_events_url":"https://api.github.com/users/ps2/received_events","type":"User","site_admin":false},"repo":{"id":40976096,"name":"rileylink_ios","full_name":"ps2/rileylink_ios","owner":{"login":"ps2","id":14649,"avatar_url":"https://avatars.githubusercontent.com/u/14649?v=3","gravatar_id":"","url":"https://api.github.com/users/ps2","html_url":"https://github.com/ps2","followers_url":"https://api.github.com/users/ps2/followers","following_url":"https://api.github.com/users/ps2/following{/other_user}","gists_url":"https://api.github.com/users/ps2/gists{/gist_id}","starred_url":"https://api.github.com/users/ps2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ps2/subscriptions","organizations_url":"https://api.github.com/users/ps2/orgs","repos_url":"https://api.github.com/users/ps2/repos","events_url":"https://api.github.com/users/ps2/events{/privacy}","received_events_url":"https://api.github.com/users/ps2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ps2/rileylink_ios","description":"RileyLink iOS app","fork":false,"url":"https://api.github.com/repos/ps2/rileylink_ios","forks_url":"https://api.github.com/repos/ps2/rileylink_ios/forks","keys_url":"https://api.github.com/repos/ps2/rileylink_ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ps2/rileylink_ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ps2/rileylink_ios/teams","hooks_url":"https://api.github.com/repos/ps2/rileylink_ios/hooks","issue_events_url":"https://api.github.com/repos/ps2/rileylink_ios/issues/events{/number}","events_url":"https://api.github.com/repos/ps2/rileylink_ios/events","assignees_url":"https://api.github.com/repos/ps2/rileylink_ios/assignees{/user}","branches_url":"https://api.github.com/repos/ps2/rileylink_ios/branches{/branch}","tags_url":"https://api.github.com/repos/ps2/rileylink_ios/tags","blobs_url":"https://api.github.com/repos/ps2/rileylink_ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ps2/rileylink_ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ps2/rileylink_ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/ps2/rileylink_ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ps2/rileylink_ios/statuses/{sha}","languages_url":"https://api.github.com/repos/ps2/rileylink_ios/languages","stargazers_url":"https://api.github.com/repos/ps2/rileylink_ios/stargazers","contributors_url":"https://api.github.com/repos/ps2/rileylink_ios/contributors","subscribers_url":"https://api.github.com/repos/ps2/rileylink_ios/subscribers","subscription_url":"https://api.github.com/repos/ps2/rileylink_ios/subscription","commits_url":"https://api.github.com/repos/ps2/rileylink_ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/ps2/rileylink_ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/ps2/rileylink_ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/ps2/rileylink_ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/ps2/rileylink_ios/contents/{+path}","compare_url":"https://api.github.com/repos/ps2/rileylink_ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ps2/rileylink_ios/merges","archive_url":"https://api.github.com/repos/ps2/rileylink_ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ps2/rileylink_ios/downloads","issues_url":"https://api.github.com/repos/ps2/rileylink_ios/issues{/number}","pulls_url":"https://api.github.com/repos/ps2/rileylink_ios/pulls{/number}","milestones_url":"https://api.github.com/repos/ps2/rileylink_ios/milestones{/number}","notifications_url":"https://api.github.com/repos/ps2/rileylink_ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ps2/rileylink_ios/labels{/name}","releases_url":"https://api.github.com/repos/ps2/rileylink_ios/releases{/id}","deployments_url":"https://api.github.com/repos/ps2/rileylink_ios/deployments","created_at":"2015-08-18T14:15:57Z","updated_at":"2016-07-14T23:35:38Z","pushed_at":"2016-07-19T16:32:18Z","git_url":"git://github.com/ps2/rileylink_ios.git","ssh_url":"git@github.com:ps2/rileylink_ios.git","clone_url":"https://github.com/ps2/rileylink_ios.git","svn_url":"https://github.com/ps2/rileylink_ios","homepage":null,"size":2301,"stargazers_count":8,"watchers_count":8,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":10,"forks":12,"open_issues":10,"watchers":8,"default_branch":"master"}},"base":{"label":"ps2:dev","ref":"dev","sha":"36d4ceab80d8ecdef2b3897e588f0d8e58a95100","user":{"login":"ps2","id":14649,"avatar_url":"https://avatars.githubusercontent.com/u/14649?v=3","gravatar_id":"","url":"https://api.github.com/users/ps2","html_url":"https://github.com/ps2","followers_url":"https://api.github.com/users/ps2/followers","following_url":"https://api.github.com/users/ps2/following{/other_user}","gists_url":"https://api.github.com/users/ps2/gists{/gist_id}","starred_url":"https://api.github.com/users/ps2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ps2/subscriptions","organizations_url":"https://api.github.com/users/ps2/orgs","repos_url":"https://api.github.com/users/ps2/repos","events_url":"https://api.github.com/users/ps2/events{/privacy}","received_events_url":"https://api.github.com/users/ps2/received_events","type":"User","site_admin":false},"repo":{"id":40976096,"name":"rileylink_ios","full_name":"ps2/rileylink_ios","owner":{"login":"ps2","id":14649,"avatar_url":"https://avatars.githubusercontent.com/u/14649?v=3","gravatar_id":"","url":"https://api.github.com/users/ps2","html_url":"https://github.com/ps2","followers_url":"https://api.github.com/users/ps2/followers","following_url":"https://api.github.com/users/ps2/following{/other_user}","gists_url":"https://api.github.com/users/ps2/gists{/gist_id}","starred_url":"https://api.github.com/users/ps2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ps2/subscriptions","organizations_url":"https://api.github.com/users/ps2/orgs","repos_url":"https://api.github.com/users/ps2/repos","events_url":"https://api.github.com/users/ps2/events{/privacy}","received_events_url":"https://api.github.com/users/ps2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ps2/rileylink_ios","description":"RileyLink iOS app","fork":false,"url":"https://api.github.com/repos/ps2/rileylink_ios","forks_url":"https://api.github.com/repos/ps2/rileylink_ios/forks","keys_url":"https://api.github.com/repos/ps2/rileylink_ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ps2/rileylink_ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ps2/rileylink_ios/teams","hooks_url":"https://api.github.com/repos/ps2/rileylink_ios/hooks","issue_events_url":"https://api.github.com/repos/ps2/rileylink_ios/issues/events{/number}","events_url":"https://api.github.com/repos/ps2/rileylink_ios/events","assignees_url":"https://api.github.com/repos/ps2/rileylink_ios/assignees{/user}","branches_url":"https://api.github.com/repos/ps2/rileylink_ios/branches{/branch}","tags_url":"https://api.github.com/repos/ps2/rileylink_ios/tags","blobs_url":"https://api.github.com/repos/ps2/rileylink_ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ps2/rileylink_ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ps2/rileylink_ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/ps2/rileylink_ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ps2/rileylink_ios/statuses/{sha}","languages_url":"https://api.github.com/repos/ps2/rileylink_ios/languages","stargazers_url":"https://api.github.com/repos/ps2/rileylink_ios/stargazers","contributors_url":"https://api.github.com/repos/ps2/rileylink_ios/contributors","subscribers_url":"https://api.github.com/repos/ps2/rileylink_ios/subscribers","subscription_url":"https://api.github.com/repos/ps2/rileylink_ios/subscription","commits_url":"https://api.github.com/repos/ps2/rileylink_ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/ps2/rileylink_ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/ps2/rileylink_ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/ps2/rileylink_ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/ps2/rileylink_ios/contents/{+path}","compare_url":"https://api.github.com/repos/ps2/rileylink_ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ps2/rileylink_ios/merges","archive_url":"https://api.github.com/repos/ps2/rileylink_ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ps2/rileylink_ios/downloads","issues_url":"https://api.github.com/repos/ps2/rileylink_ios/issues{/number}","pulls_url":"https://api.github.com/repos/ps2/rileylink_ios/pulls{/number}","milestones_url":"https://api.github.com/repos/ps2/rileylink_ios/milestones{/number}","notifications_url":"https://api.github.com/repos/ps2/rileylink_ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ps2/rileylink_ios/labels{/name}","releases_url":"https://api.github.com/repos/ps2/rileylink_ios/releases{/id}","deployments_url":"https://api.github.com/repos/ps2/rileylink_ios/deployments","created_at":"2015-08-18T14:15:57Z","updated_at":"2016-07-14T23:35:38Z","pushed_at":"2016-07-19T16:32:18Z","git_url":"git://github.com/ps2/rileylink_ios.git","ssh_url":"git@github.com:ps2/rileylink_ios.git","clone_url":"https://github.com/ps2/rileylink_ios.git","svn_url":"https://github.com/ps2/rileylink_ios","homepage":null,"size":2301,"stargazers_count":8,"watchers_count":8,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":10,"forks":12,"open_issues":10,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ps2/rileylink_ios/pulls/162"},"html":{"href":"https://github.com/ps2/rileylink_ios/pull/162"},"issue":{"href":"https://api.github.com/repos/ps2/rileylink_ios/issues/162"},"comments":{"href":"https://api.github.com/repos/ps2/rileylink_ios/issues/162/comments"},"review_comments":{"href":"https://api.github.com/repos/ps2/rileylink_ios/pulls/162/comments"},"review_comment":{"href":"https://api.github.com/repos/ps2/rileylink_ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ps2/rileylink_ios/pulls/162/commits"},"statuses":{"href":"https://api.github.com/repos/ps2/rileylink_ios/statuses/59473820f7e1d8b7a819c12adeb9ad1a5d924559"}}}}
{"actor":{"display_login":"loudnate"}}