{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-mobile/focus-ios/pulls/comments/223121999","pull_request_review_id":162181278,"id":223121999,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzEyMTk5OQ==","diff_hunk":"@@ -280,13 +276,15 @@ class SettingsViewController: UIViewController, UITableViewDataSource, UITableVi\n         tableView.allowsSelection = true\n         tableView.estimatedRowHeight = 44\n \n-        toggles = initialToggles\n-        for (i, blockerToggle) in toggles {\n-            let toggle = blockerToggle.toggle\n-            toggle.onTintColor = UIConstants.colors.toggleOn\n-            toggle.addTarget(self, action: #selector(toggleSwitched(_:)), for: .valueChanged)\n-            toggle.isOn = Settings.getToggle(blockerToggle.setting)\n-            toggles[i] = blockerToggle\n+        initializeToggles()\n+        for (i,toggleArray) in toggles{\n+            for (j, blockerToggle) in toggleArray{","path":"Blockzilla/SettingsViewController.swift","position":78,"original_position":78,"commit_id":"6319cb19e3ad39e1541af886325f2b61549c7586","original_commit_id":"6319cb19e3ad39e1541af886325f2b61549c7586","user":{"login":"reidgust","id":7297223,"node_id":"MDQ6VXNlcjcyOTcyMjM=","avatar_url":"https://avatars1.githubusercontent.com/u/7297223?v=4","gravatar_id":"","url":"https://api.github.com/users/reidgust","html_url":"https://github.com/reidgust","followers_url":"https://api.github.com/users/reidgust/followers","following_url":"https://api.github.com/users/reidgust/following{/other_user}","gists_url":"https://api.github.com/users/reidgust/gists{/gist_id}","starred_url":"https://api.github.com/users/reidgust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reidgust/subscriptions","organizations_url":"https://api.github.com/users/reidgust/orgs","repos_url":"https://api.github.com/users/reidgust/repos","events_url":"https://api.github.com/users/reidgust/events{/privacy}","received_events_url":"https://api.github.com/users/reidgust/received_events","type":"User","site_admin":false},"body":"It's not n^2 because the n toggles are spread amongst the i sections, each with a variable j number of blockerToggles. I got rid of nils, so every blockerToggle will be an actual blockerToggle. This is O(n).","created_at":"2018-10-05T19:51:08Z","updated_at":"2018-10-05T19:51:08Z","html_url":"https://github.com/mozilla-mobile/focus-ios/pull/1407#discussion_r223121999","pull_request_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/pulls/1407","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/mozilla-mobile/focus-ios/pulls/comments/223121999"},"html":{"href":"https://github.com/mozilla-mobile/focus-ios/pull/1407#discussion_r223121999"},"pull_request":{"href":"https://api.github.com/repos/mozilla-mobile/focus-ios/pulls/1407"}},"in_reply_to_id":223106951},"pull_request":{"url":"https://api.github.com/repos/mozilla-mobile/focus-ios/pulls/1407","id":219170223,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5MTcwMjIz","html_url":"https://github.com/mozilla-mobile/focus-ios/pull/1407","diff_url":"https://github.com/mozilla-mobile/focus-ios/pull/1407.diff","patch_url":"https://github.com/mozilla-mobile/focus-ios/pull/1407.patch","issue_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/issues/1407","number":1407,"state":"open","locked":false,"title":"Toggle for Search Suggestions in Settings","user":{"login":"reidgust","id":7297223,"node_id":"MDQ6VXNlcjcyOTcyMjM=","avatar_url":"https://avatars1.githubusercontent.com/u/7297223?v=4","gravatar_id":"","url":"https://api.github.com/users/reidgust","html_url":"https://github.com/reidgust","followers_url":"https://api.github.com/users/reidgust/followers","following_url":"https://api.github.com/users/reidgust/following{/other_user}","gists_url":"https://api.github.com/users/reidgust/gists{/gist_id}","starred_url":"https://api.github.com/users/reidgust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reidgust/subscriptions","organizations_url":"https://api.github.com/users/reidgust/orgs","repos_url":"https://api.github.com/users/reidgust/repos","events_url":"https://api.github.com/users/reidgust/events{/privacy}","received_events_url":"https://api.github.com/users/reidgust/received_events","type":"User","site_admin":false},"body":"I think this also addresses issues #1380  and #1389 \r\n1) Did a little refactoring of the settingsViewController to make it easier to add more options in the future or rearrange options.\r\n2) Assumed the creation of url \"what's-new-focus-ios-8\" to go in line with \"what's-new-focus-ios-7\" https://github.com/mozilla-mobile/focus-ios/issues/1406 \r\n3) Assumed the creation of url \"search-suggestions\" for the learn more tag as in \"usage-data\" #1406\r\n4) Wasn't entirely sure about what distinguished between cases in the below function and am not sure if my change was appropriate. It seems to look good but also still looked good if I blocked out all the code and always did return UITableView.automaticDimension. \r\n`func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath)`","created_at":"2018-09-29T21:19:46Z","updated_at":"2018-10-05T19:51:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b87fbae5ca770a8d10bec879fdcdb9e1786b259","assignee":null,"assignees":[],"requested_reviewers":[{"login":"cmorierroy","id":16982565,"node_id":"MDQ6VXNlcjE2OTgyNTY1","avatar_url":"https://avatars1.githubusercontent.com/u/16982565?v=4","gravatar_id":"","url":"https://api.github.com/users/cmorierroy","html_url":"https://github.com/cmorierroy","followers_url":"https://api.github.com/users/cmorierroy/followers","following_url":"https://api.github.com/users/cmorierroy/following{/other_user}","gists_url":"https://api.github.com/users/cmorierroy/gists{/gist_id}","starred_url":"https://api.github.com/users/cmorierroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmorierroy/subscriptions","organizations_url":"https://api.github.com/users/cmorierroy/orgs","repos_url":"https://api.github.com/users/cmorierroy/repos","events_url":"https://api.github.com/users/cmorierroy/events{/privacy}","received_events_url":"https://api.github.com/users/cmorierroy/received_events","type":"User","site_admin":false},{"login":"Meng-Wei","id":25020683,"node_id":"MDQ6VXNlcjI1MDIwNjgz","avatar_url":"https://avatars0.githubusercontent.com/u/25020683?v=4","gravatar_id":"","url":"https://api.github.com/users/Meng-Wei","html_url":"https://github.com/Meng-Wei","followers_url":"https://api.github.com/users/Meng-Wei/followers","following_url":"https://api.github.com/users/Meng-Wei/following{/other_user}","gists_url":"https://api.github.com/users/Meng-Wei/gists{/gist_id}","starred_url":"https://api.github.com/users/Meng-Wei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Meng-Wei/subscriptions","organizations_url":"https://api.github.com/users/Meng-Wei/orgs","repos_url":"https://api.github.com/users/Meng-Wei/repos","events_url":"https://api.github.com/users/Meng-Wei/events{/privacy}","received_events_url":"https://api.github.com/users/Meng-Wei/received_events","type":"User","site_admin":false},{"login":"janicelee","id":25831712,"node_id":"MDQ6VXNlcjI1ODMxNzEy","avatar_url":"https://avatars1.githubusercontent.com/u/25831712?v=4","gravatar_id":"","url":"https://api.github.com/users/janicelee","html_url":"https://github.com/janicelee","followers_url":"https://api.github.com/users/janicelee/followers","following_url":"https://api.github.com/users/janicelee/following{/other_user}","gists_url":"https://api.github.com/users/janicelee/gists{/gist_id}","starred_url":"https://api.github.com/users/janicelee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janicelee/subscriptions","organizations_url":"https://api.github.com/users/janicelee/orgs","repos_url":"https://api.github.com/users/janicelee/repos","events_url":"https://api.github.com/users/janicelee/events{/privacy}","received_events_url":"https://api.github.com/users/janicelee/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/pulls/1407/commits","review_comments_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/pulls/1407/comments","review_comment_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/issues/1407/comments","statuses_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/statuses/6319cb19e3ad39e1541af886325f2b61549c7586","head":{"label":"mozilla-mobile:reid/searchSuggestionToggle","ref":"reid/searchSuggestionToggle","sha":"6319cb19e3ad39e1541af886325f2b61549c7586","user":{"login":"mozilla-mobile","id":22351667,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMzUxNjY3","avatar_url":"https://avatars3.githubusercontent.com/u/22351667?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla-mobile","html_url":"https://github.com/mozilla-mobile","followers_url":"https://api.github.com/users/mozilla-mobile/followers","following_url":"https://api.github.com/users/mozilla-mobile/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-mobile/subscriptions","organizations_url":"https://api.github.com/users/mozilla-mobile/orgs","repos_url":"https://api.github.com/users/mozilla-mobile/repos","events_url":"https://api.github.com/users/mozilla-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":45850581,"node_id":"MDEwOlJlcG9zaXRvcnk0NTg1MDU4MQ==","name":"focus-ios","full_name":"mozilla-mobile/focus-ios","private":false,"owner":{"login":"mozilla-mobile","id":22351667,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMzUxNjY3","avatar_url":"https://avatars3.githubusercontent.com/u/22351667?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla-mobile","html_url":"https://github.com/mozilla-mobile","followers_url":"https://api.github.com/users/mozilla-mobile/followers","following_url":"https://api.github.com/users/mozilla-mobile/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-mobile/subscriptions","organizations_url":"https://api.github.com/users/mozilla-mobile/orgs","repos_url":"https://api.github.com/users/mozilla-mobile/repos","events_url":"https://api.github.com/users/mozilla-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-mobile/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mozilla-mobile/focus-ios","description":"Firefox Focus for iOS","fork":false,"url":"https://api.github.com/repos/mozilla-mobile/focus-ios","forks_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/forks","keys_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/teams","hooks_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/hooks","issue_events_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/events","assignees_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/tags","blobs_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/languages","stargazers_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/stargazers","contributors_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/contributors","subscribers_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/subscribers","subscription_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/subscription","commits_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/merges","archive_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/downloads","issues_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/deployments","created_at":"2015-11-09T16:24:13Z","updated_at":"2018-10-04T23:42:30Z","pushed_at":"2018-10-05T18:00:20Z","git_url":"git://github.com/mozilla-mobile/focus-ios.git","ssh_url":"git@github.com:mozilla-mobile/focus-ios.git","clone_url":"https://github.com/mozilla-mobile/focus-ios.git","svn_url":"https://github.com/mozilla-mobile/focus-ios","homepage":"","size":54713,"stargazers_count":816,"watchers_count":816,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":132,"mirror_url":null,"archived":false,"open_issues_count":122,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":132,"open_issues":122,"watchers":816,"default_branch":"master"}},"base":{"label":"mozilla-mobile:v8.0-dev","ref":"v8.0-dev","sha":"4015688d90ee5b5cd0b9e107d91a9fe3a337c69b","user":{"login":"mozilla-mobile","id":22351667,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMzUxNjY3","avatar_url":"https://avatars3.githubusercontent.com/u/22351667?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla-mobile","html_url":"https://github.com/mozilla-mobile","followers_url":"https://api.github.com/users/mozilla-mobile/followers","following_url":"https://api.github.com/users/mozilla-mobile/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-mobile/subscriptions","organizations_url":"https://api.github.com/users/mozilla-mobile/orgs","repos_url":"https://api.github.com/users/mozilla-mobile/repos","events_url":"https://api.github.com/users/mozilla-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-mobile/received_events","type":"Organization","site_admin":false},"repo":{"id":45850581,"node_id":"MDEwOlJlcG9zaXRvcnk0NTg1MDU4MQ==","name":"focus-ios","full_name":"mozilla-mobile/focus-ios","private":false,"owner":{"login":"mozilla-mobile","id":22351667,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMzUxNjY3","avatar_url":"https://avatars3.githubusercontent.com/u/22351667?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla-mobile","html_url":"https://github.com/mozilla-mobile","followers_url":"https://api.github.com/users/mozilla-mobile/followers","following_url":"https://api.github.com/users/mozilla-mobile/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-mobile/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-mobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-mobile/subscriptions","organizations_url":"https://api.github.com/users/mozilla-mobile/orgs","repos_url":"https://api.github.com/users/mozilla-mobile/repos","events_url":"https://api.github.com/users/mozilla-mobile/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-mobile/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mozilla-mobile/focus-ios","description":"Firefox Focus for iOS","fork":false,"url":"https://api.github.com/repos/mozilla-mobile/focus-ios","forks_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/forks","keys_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/teams","hooks_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/hooks","issue_events_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/events","assignees_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/tags","blobs_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/languages","stargazers_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/stargazers","contributors_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/contributors","subscribers_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/subscribers","subscription_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/subscription","commits_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/merges","archive_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/downloads","issues_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla-mobile/focus-ios/deployments","created_at":"2015-11-09T16:24:13Z","updated_at":"2018-10-04T23:42:30Z","pushed_at":"2018-10-05T18:00:20Z","git_url":"git://github.com/mozilla-mobile/focus-ios.git","ssh_url":"git@github.com:mozilla-mobile/focus-ios.git","clone_url":"https://github.com/mozilla-mobile/focus-ios.git","svn_url":"https://github.com/mozilla-mobile/focus-ios","homepage":"","size":54713,"stargazers_count":816,"watchers_count":816,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":132,"mirror_url":null,"archived":false,"open_issues_count":122,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":132,"open_issues":122,"watchers":816,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-mobile/focus-ios/pulls/1407"},"html":{"href":"https://github.com/mozilla-mobile/focus-ios/pull/1407"},"issue":{"href":"https://api.github.com/repos/mozilla-mobile/focus-ios/issues/1407"},"comments":{"href":"https://api.github.com/repos/mozilla-mobile/focus-ios/issues/1407/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-mobile/focus-ios/pulls/1407/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-mobile/focus-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-mobile/focus-ios/pulls/1407/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-mobile/focus-ios/statuses/6319cb19e3ad39e1541af886325f2b61549c7586"}},"author_association":"NONE"}}
{"actor":{"display_login":"reidgust"}}