{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/comments/48612709","id":48612709,"diff_hunk":"@@ -119,44 +276,85 @@ extension LoginListViewController: KeyboardHelperDelegate {\n     }\n }\n \n-/// Controller that handles interactions with the search widget and updating the data source for searching\n-private class LoginSearchController: NSObject, SearchInputViewDelegate {\n+// MARK: - SearchInputViewDelegate\n+extension LoginListViewController: SearchInputViewDelegate {\n \n-    private let profile: Profile\n+    @objc func searchInputView(searchView: SearchInputView, didChangeTextTo text: String) {\n+        searchLoginsWithText(text)\n+    }\n \n-    private var activeSearchDeferred: Success?\n+    @objc func searchInputViewBeganEditing(searchView: SearchInputView) {\n+        // Trigger a cancel for editing\n+        SELcancel()\n \n-    private unowned let dataSource: LoginCursorDataSource\n+        // Hide the edit button while we're searching\n+        navigationItem.rightBarButtonItem = nil\n+        activeLoginQuery = profile.logins.getAllLogins()\n+            .bindQueue(dispatch_get_main_queue(), f: reloadTableWithResult)\n+    }\n+\n+    @objc func searchInputViewFinishedEditing(searchView: SearchInputView) {\n+        // Show the edit after we're done with the search\n+        navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .Edit, target: self, action: \"SELedit\")\n+        activeLoginQuery = profile.logins.getAllLogins()\n+            .bindQueue(dispatch_get_main_queue(), f: reloadTableWithResult)\n+    }\n+\n+    private func searchLoginsWithText(text: String) -> Success {\n+        activeLoginQuery = profile.logins.searchLoginsWithQuery(text)\n+            .bindQueue(dispatch_get_main_queue(), f: reloadTableWithResult)\n+        return activeLoginQuery!","path":"Client/Frontend/Login Management/LoginListViewController.swift","position":294,"original_position":294,"commit_id":"3fd51e3d658a75200a6a8537b92666ac84724763","original_commit_id":"3fd51e3d658a75200a6a8537b92666ac84724763","user":{"login":"rnewman","id":91722,"avatar_url":"https://avatars.githubusercontent.com/u/91722?v=3","gravatar_id":"","url":"https://api.github.com/users/rnewman","html_url":"https://github.com/rnewman","followers_url":"https://api.github.com/users/rnewman/followers","following_url":"https://api.github.com/users/rnewman/following{/other_user}","gists_url":"https://api.github.com/users/rnewman/gists{/gist_id}","starred_url":"https://api.github.com/users/rnewman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnewman/subscriptions","organizations_url":"https://api.github.com/users/rnewman/orgs","repos_url":"https://api.github.com/users/rnewman/repos","events_url":"https://api.github.com/users/rnewman/events{/privacy}","received_events_url":"https://api.github.com/users/rnewman/received_events","type":"User","site_admin":false},"body":"You can drop this down to one line.","created_at":"2015-12-30T16:11:31Z","updated_at":"2015-12-30T16:11:31Z","html_url":"https://github.com/mozilla/firefox-ios/pull/1384#discussion_r48612709","pull_request_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/1384","_links":{"self":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/comments/48612709"},"html":{"href":"https://github.com/mozilla/firefox-ios/pull/1384#discussion_r48612709"},"pull_request":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/1384"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/1384","id":54505451,"html_url":"https://github.com/mozilla/firefox-ios/pull/1384","diff_url":"https://github.com/mozilla/firefox-ios/pull/1384.diff","patch_url":"https://github.com/mozilla/firefox-ios/pull/1384.patch","issue_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/1384","number":1384,"state":"open","locked":false,"title":"Bug 1226652 - Login List Multiselection and Deletion","user":{"login":"sleroux","id":434322,"avatar_url":"https://avatars.githubusercontent.com/u/434322?v=3","gravatar_id":"","url":"https://api.github.com/users/sleroux","html_url":"https://github.com/sleroux","followers_url":"https://api.github.com/users/sleroux/followers","following_url":"https://api.github.com/users/sleroux/following{/other_user}","gists_url":"https://api.github.com/users/sleroux/gists{/gist_id}","starred_url":"https://api.github.com/users/sleroux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sleroux/subscriptions","organizations_url":"https://api.github.com/users/sleroux/orgs","repos_url":"https://api.github.com/users/sleroux/repos","events_url":"https://api.github.com/users/sleroux/events{/privacy}","received_events_url":"https://api.github.com/users/sleroux/received_events","type":"User","site_admin":false},"body":"* Added multi selection functionality to login list\n* Search view now retains search after navigating to detail view\n* Selected logins from list can be deleted","created_at":"2015-12-23T20:49:03Z","updated_at":"2015-12-30T16:11:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d5076f4255292e1cf9a9bacd53c6730bf9c26c0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/1384/commits","review_comments_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/1384/comments","review_comment_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/1384/comments","statuses_url":"https://api.github.com/repos/mozilla/firefox-ios/statuses/3fd51e3d658a75200a6a8537b92666ac84724763","head":{"label":"mozilla:sleroux/Bug1226652-RemoveLogins","ref":"sleroux/Bug1226652-RemoveLogins","sha":"3fd51e3d658a75200a6a8537b92666ac84724763","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":26133979,"name":"firefox-ios","full_name":"mozilla/firefox-ios","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/firefox-ios","description":"Firefox for iOS","fork":false,"url":"https://api.github.com/repos/mozilla/firefox-ios","forks_url":"https://api.github.com/repos/mozilla/firefox-ios/forks","keys_url":"https://api.github.com/repos/mozilla/firefox-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/firefox-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/firefox-ios/teams","hooks_url":"https://api.github.com/repos/mozilla/firefox-ios/hooks","issue_events_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/firefox-ios/events","assignees_url":"https://api.github.com/repos/mozilla/firefox-ios/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/firefox-ios/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/firefox-ios/tags","blobs_url":"https://api.github.com/repos/mozilla/firefox-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/firefox-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/firefox-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/firefox-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/firefox-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/firefox-ios/languages","stargazers_url":"https://api.github.com/repos/mozilla/firefox-ios/stargazers","contributors_url":"https://api.github.com/repos/mozilla/firefox-ios/contributors","subscribers_url":"https://api.github.com/repos/mozilla/firefox-ios/subscribers","subscription_url":"https://api.github.com/repos/mozilla/firefox-ios/subscription","commits_url":"https://api.github.com/repos/mozilla/firefox-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/firefox-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/firefox-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/firefox-ios/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/firefox-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/firefox-ios/merges","archive_url":"https://api.github.com/repos/mozilla/firefox-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/firefox-ios/downloads","issues_url":"https://api.github.com/repos/mozilla/firefox-ios/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/firefox-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/firefox-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/firefox-ios/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/firefox-ios/releases{/id}","created_at":"2014-11-03T19:07:02Z","updated_at":"2015-12-30T10:00:44Z","pushed_at":"2015-12-30T15:31:04Z","git_url":"git://github.com/mozilla/firefox-ios.git","ssh_url":"git@github.com:mozilla/firefox-ios.git","clone_url":"https://github.com/mozilla/firefox-ios.git","svn_url":"https://github.com/mozilla/firefox-ios","homepage":"","size":114754,"stargazers_count":5125,"watchers_count":5125,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":922,"mirror_url":null,"open_issues_count":90,"forks":922,"open_issues":90,"watchers":5125,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"b98103973b5ccfd9b2008eb29bb04de54f862c73","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":26133979,"name":"firefox-ios","full_name":"mozilla/firefox-ios","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/firefox-ios","description":"Firefox for iOS","fork":false,"url":"https://api.github.com/repos/mozilla/firefox-ios","forks_url":"https://api.github.com/repos/mozilla/firefox-ios/forks","keys_url":"https://api.github.com/repos/mozilla/firefox-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/firefox-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/firefox-ios/teams","hooks_url":"https://api.github.com/repos/mozilla/firefox-ios/hooks","issue_events_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/firefox-ios/events","assignees_url":"https://api.github.com/repos/mozilla/firefox-ios/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/firefox-ios/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/firefox-ios/tags","blobs_url":"https://api.github.com/repos/mozilla/firefox-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/firefox-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/firefox-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/firefox-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/firefox-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/firefox-ios/languages","stargazers_url":"https://api.github.com/repos/mozilla/firefox-ios/stargazers","contributors_url":"https://api.github.com/repos/mozilla/firefox-ios/contributors","subscribers_url":"https://api.github.com/repos/mozilla/firefox-ios/subscribers","subscription_url":"https://api.github.com/repos/mozilla/firefox-ios/subscription","commits_url":"https://api.github.com/repos/mozilla/firefox-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/firefox-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/firefox-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/firefox-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/firefox-ios/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/firefox-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/firefox-ios/merges","archive_url":"https://api.github.com/repos/mozilla/firefox-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/firefox-ios/downloads","issues_url":"https://api.github.com/repos/mozilla/firefox-ios/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/firefox-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/firefox-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/firefox-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/firefox-ios/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/firefox-ios/releases{/id}","created_at":"2014-11-03T19:07:02Z","updated_at":"2015-12-30T10:00:44Z","pushed_at":"2015-12-30T15:31:04Z","git_url":"git://github.com/mozilla/firefox-ios.git","ssh_url":"git@github.com:mozilla/firefox-ios.git","clone_url":"https://github.com/mozilla/firefox-ios.git","svn_url":"https://github.com/mozilla/firefox-ios","homepage":"","size":114754,"stargazers_count":5125,"watchers_count":5125,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":922,"mirror_url":null,"open_issues_count":90,"forks":922,"open_issues":90,"watchers":5125,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/1384"},"html":{"href":"https://github.com/mozilla/firefox-ios/pull/1384"},"issue":{"href":"https://api.github.com/repos/mozilla/firefox-ios/issues/1384"},"comments":{"href":"https://api.github.com/repos/mozilla/firefox-ios/issues/1384/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/1384/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/firefox-ios/pulls/1384/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/firefox-ios/statuses/3fd51e3d658a75200a6a8537b92666ac84724763"}}}}