{"action":"created","comment":{"url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/pulls/comments/192202204","pull_request_review_id":124932585,"id":192202204,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjIwMjIwNA==","diff_hunk":"@@ -94,21 +94,14 @@ extension SettingsViewController: UITableViewDelegate {\n     func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {\n         let settingSection = optionList[indexPath.section]\n         let settingNode = settingSection.subnode(row: indexPath.row)\n+        let cell = settingSection.cell(for: indexPath, tableView: tableView, viewController: self)\n \n-        let cell = settingSection.cell(for: indexPath.row, tableView: tableView, viewController: self)\n-        cell.selectionStyle = .none\n-        cell.textLabel?.textColor = .gray\n-\n-        // If a setting node returns nil for a subnode - it's a leaf option and doesn't need a disclosure indicator\n-        if let setting = settingNode, setting.leaf {\n-            cell.accessoryType = .none\n-        } else {\n-            cell.accessoryType = .disclosureIndicator\n-        }\n-\n-        if settingNode?.enabled ?? false {\n-            cell.selectionStyle = .default\n-            cell.textLabel?.textColor = .black\n+        if let setting = settingNode, let settingCell = cell as? UpdatableCell {\n+            settingCell.update(for: setting)","path":"BlockEQ/View Controllers/Settings/SettingsViewController.swift","position":79,"original_position":79,"commit_id":"fa67a9ece7c540fd0c9d2f26c09e024dd976fd2e","original_commit_id":"fa67a9ece7c540fd0c9d2f26c09e024dd976fd2e","user":{"login":"ndizazzo","id":728690,"node_id":"MDQ6VXNlcjcyODY5MA==","avatar_url":"https://avatars3.githubusercontent.com/u/728690?v=4","gravatar_id":"","url":"https://api.github.com/users/ndizazzo","html_url":"https://github.com/ndizazzo","followers_url":"https://api.github.com/users/ndizazzo/followers","following_url":"https://api.github.com/users/ndizazzo/following{/other_user}","gists_url":"https://api.github.com/users/ndizazzo/gists{/gist_id}","starred_url":"https://api.github.com/users/ndizazzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndizazzo/subscriptions","organizations_url":"https://api.github.com/users/ndizazzo/orgs","repos_url":"https://api.github.com/users/ndizazzo/repos","events_url":"https://api.github.com/users/ndizazzo/events{/privacy}","received_events_url":"https://api.github.com/users/ndizazzo/received_events","type":"User","site_admin":false},"body":"@satbam This allows us to subclass `UITableViewCell` and have that subclass conform to `UpdatableCell`, which has a function that can be used to define how to set properties on that cell from within the subclass. \r\n\r\nThis cleans up the usual bloat inside these tableview delegate methods.","created_at":"2018-05-31T18:54:25Z","updated_at":"2018-05-31T18:54:26Z","html_url":"https://github.com/Block-Equity/stellar-ios-wallet/pull/43#discussion_r192202204","pull_request_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/pulls/43","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/pulls/comments/192202204"},"html":{"href":"https://github.com/Block-Equity/stellar-ios-wallet/pull/43#discussion_r192202204"},"pull_request":{"href":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/pulls/43"}}},"pull_request":{"url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/pulls/43","id":191842557,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxODQyNTU3","html_url":"https://github.com/Block-Equity/stellar-ios-wallet/pull/43","diff_url":"https://github.com/Block-Equity/stellar-ios-wallet/pull/43.diff","patch_url":"https://github.com/Block-Equity/stellar-ios-wallet/pull/43.patch","issue_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/issues/43","number":43,"state":"open","locked":false,"title":"[BOUNTY] PIN options in settings screen - part 3/3","user":{"login":"ndizazzo","id":728690,"node_id":"MDQ6VXNlcjcyODY5MA==","avatar_url":"https://avatars3.githubusercontent.com/u/728690?v=4","gravatar_id":"","url":"https://api.github.com/users/ndizazzo","html_url":"https://github.com/ndizazzo","followers_url":"https://api.github.com/users/ndizazzo/followers","following_url":"https://api.github.com/users/ndizazzo/following{/other_user}","gists_url":"https://api.github.com/users/ndizazzo/gists{/gist_id}","starred_url":"https://api.github.com/users/ndizazzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndizazzo/subscriptions","organizations_url":"https://api.github.com/users/ndizazzo/orgs","repos_url":"https://api.github.com/users/ndizazzo/repos","events_url":"https://api.github.com/users/ndizazzo/events{/privacy}","received_events_url":"https://api.github.com/users/ndizazzo/received_events","type":"User","site_admin":false},"body":"## Screenshot\r\n<image src=\"https://media.giphy.com/media/7YBJwV2wc8QAecYyio/giphy.gif\" />\r\n<img width=\"258\" alt=\"screenshot 2018-05-31 14 49 37\" src=\"https://user-images.githubusercontent.com/728690/40801813-deef045c-64e1-11e8-99f7-7ee2d7017a0b.png\">\r\n\r\n## Bounty\r\nPart 3 of #37 \r\n\r\n## What does this change?\r\nThis PR modifies the `SettingNode` and `SettingsViewController` to support a new settings cell type, the `SettingsSwitchCell`.\r\n\r\nIt also refactors some of the cell creation logic in the `SettingsViewController` to provide a protocol that unifies (and allows cell subclasses) to define how they configure themselves.\r\n\r\nFinally, it updates the `SettingsViewControllerDelegate` to support value-passing, and adds a new `PinOptionHelper` class to control when and where a pin is required.","created_at":"2018-05-31T18:51:58Z","updated_at":"2018-05-31T18:54:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c276732cbebfa1d413c8dfbfdcda57f5002b8ea","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/pulls/43/commits","review_comments_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/pulls/43/comments","review_comment_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/issues/43/comments","statuses_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/statuses/fa67a9ece7c540fd0c9d2f26c09e024dd976fd2e","head":{"label":"ndizazzo:bounty/pin-settings","ref":"bounty/pin-settings","sha":"fa67a9ece7c540fd0c9d2f26c09e024dd976fd2e","user":{"login":"ndizazzo","id":728690,"node_id":"MDQ6VXNlcjcyODY5MA==","avatar_url":"https://avatars3.githubusercontent.com/u/728690?v=4","gravatar_id":"","url":"https://api.github.com/users/ndizazzo","html_url":"https://github.com/ndizazzo","followers_url":"https://api.github.com/users/ndizazzo/followers","following_url":"https://api.github.com/users/ndizazzo/following{/other_user}","gists_url":"https://api.github.com/users/ndizazzo/gists{/gist_id}","starred_url":"https://api.github.com/users/ndizazzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndizazzo/subscriptions","organizations_url":"https://api.github.com/users/ndizazzo/orgs","repos_url":"https://api.github.com/users/ndizazzo/repos","events_url":"https://api.github.com/users/ndizazzo/events{/privacy}","received_events_url":"https://api.github.com/users/ndizazzo/received_events","type":"User","site_admin":false},"repo":{"id":131086978,"node_id":"MDEwOlJlcG9zaXRvcnkxMzEwODY5Nzg=","name":"stellar-ios-wallet","full_name":"ndizazzo/stellar-ios-wallet","owner":{"login":"ndizazzo","id":728690,"node_id":"MDQ6VXNlcjcyODY5MA==","avatar_url":"https://avatars3.githubusercontent.com/u/728690?v=4","gravatar_id":"","url":"https://api.github.com/users/ndizazzo","html_url":"https://github.com/ndizazzo","followers_url":"https://api.github.com/users/ndizazzo/followers","following_url":"https://api.github.com/users/ndizazzo/following{/other_user}","gists_url":"https://api.github.com/users/ndizazzo/gists{/gist_id}","starred_url":"https://api.github.com/users/ndizazzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndizazzo/subscriptions","organizations_url":"https://api.github.com/users/ndizazzo/orgs","repos_url":"https://api.github.com/users/ndizazzo/repos","events_url":"https://api.github.com/users/ndizazzo/events{/privacy}","received_events_url":"https://api.github.com/users/ndizazzo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ndizazzo/stellar-ios-wallet","description":"An open source iOS wallet for Stellar.","fork":true,"url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet","forks_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/forks","keys_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/teams","hooks_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/hooks","issue_events_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/issues/events{/number}","events_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/events","assignees_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/assignees{/user}","branches_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/branches{/branch}","tags_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/tags","blobs_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/git/refs{/sha}","trees_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/statuses/{sha}","languages_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/languages","stargazers_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/stargazers","contributors_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/contributors","subscribers_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/subscribers","subscription_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/subscription","commits_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/commits{/sha}","git_commits_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/git/commits{/sha}","comments_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/comments{/number}","issue_comment_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/issues/comments{/number}","contents_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/contents/{+path}","compare_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/merges","archive_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/downloads","issues_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/issues{/number}","pulls_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/pulls{/number}","milestones_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/milestones{/number}","notifications_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/labels{/name}","releases_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/releases{/id}","deployments_url":"https://api.github.com/repos/ndizazzo/stellar-ios-wallet/deployments","created_at":"2018-04-26T02:08:43Z","updated_at":"2018-05-29T20:02:12Z","pushed_at":"2018-05-31T18:47:20Z","git_url":"git://github.com/ndizazzo/stellar-ios-wallet.git","ssh_url":"git@github.com:ndizazzo/stellar-ios-wallet.git","clone_url":"https://github.com/ndizazzo/stellar-ios-wallet.git","svn_url":"https://github.com/ndizazzo/stellar-ios-wallet","homepage":"http://www.blockeq.com","size":755,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Block-Equity:master","ref":"master","sha":"5b9e56699f2cd41507cd50cce0370632f2928292","user":{"login":"Block-Equity","id":36420670,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NDIwNjcw","avatar_url":"https://avatars1.githubusercontent.com/u/36420670?v=4","gravatar_id":"","url":"https://api.github.com/users/Block-Equity","html_url":"https://github.com/Block-Equity","followers_url":"https://api.github.com/users/Block-Equity/followers","following_url":"https://api.github.com/users/Block-Equity/following{/other_user}","gists_url":"https://api.github.com/users/Block-Equity/gists{/gist_id}","starred_url":"https://api.github.com/users/Block-Equity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Block-Equity/subscriptions","organizations_url":"https://api.github.com/users/Block-Equity/orgs","repos_url":"https://api.github.com/users/Block-Equity/repos","events_url":"https://api.github.com/users/Block-Equity/events{/privacy}","received_events_url":"https://api.github.com/users/Block-Equity/received_events","type":"Organization","site_admin":false},"repo":{"id":125148307,"node_id":"MDEwOlJlcG9zaXRvcnkxMjUxNDgzMDc=","name":"stellar-ios-wallet","full_name":"Block-Equity/stellar-ios-wallet","owner":{"login":"Block-Equity","id":36420670,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NDIwNjcw","avatar_url":"https://avatars1.githubusercontent.com/u/36420670?v=4","gravatar_id":"","url":"https://api.github.com/users/Block-Equity","html_url":"https://github.com/Block-Equity","followers_url":"https://api.github.com/users/Block-Equity/followers","following_url":"https://api.github.com/users/Block-Equity/following{/other_user}","gists_url":"https://api.github.com/users/Block-Equity/gists{/gist_id}","starred_url":"https://api.github.com/users/Block-Equity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Block-Equity/subscriptions","organizations_url":"https://api.github.com/users/Block-Equity/orgs","repos_url":"https://api.github.com/users/Block-Equity/repos","events_url":"https://api.github.com/users/Block-Equity/events{/privacy}","received_events_url":"https://api.github.com/users/Block-Equity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Block-Equity/stellar-ios-wallet","description":"An open source iOS wallet for Stellar.","fork":false,"url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet","forks_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/forks","keys_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/teams","hooks_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/hooks","issue_events_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/issues/events{/number}","events_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/events","assignees_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/assignees{/user}","branches_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/branches{/branch}","tags_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/tags","blobs_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/git/refs{/sha}","trees_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/statuses/{sha}","languages_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/languages","stargazers_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/stargazers","contributors_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/contributors","subscribers_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/subscribers","subscription_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/subscription","commits_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/commits{/sha}","git_commits_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/git/commits{/sha}","comments_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/comments{/number}","issue_comment_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/issues/comments{/number}","contents_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/contents/{+path}","compare_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/merges","archive_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/downloads","issues_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/issues{/number}","pulls_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/pulls{/number}","milestones_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/milestones{/number}","notifications_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/labels{/name}","releases_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/releases{/id}","deployments_url":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/deployments","created_at":"2018-03-14T03:13:24Z","updated_at":"2018-05-30T19:47:28Z","pushed_at":"2018-05-31T18:51:59Z","git_url":"git://github.com/Block-Equity/stellar-ios-wallet.git","ssh_url":"git@github.com:Block-Equity/stellar-ios-wallet.git","clone_url":"https://github.com/Block-Equity/stellar-ios-wallet.git","svn_url":"https://github.com/Block-Equity/stellar-ios-wallet","homepage":"http://www.blockeq.com","size":749,"stargazers_count":11,"watchers_count":11,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":1,"open_issues":2,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/pulls/43"},"html":{"href":"https://github.com/Block-Equity/stellar-ios-wallet/pull/43"},"issue":{"href":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/issues/43"},"comments":{"href":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/Block-Equity/stellar-ios-wallet/statuses/fa67a9ece7c540fd0c9d2f26c09e024dd976fd2e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ndizazzo"}}