{"action":"created","comment":{"url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/pulls/comments/214903732","pull_request_review_id":152052657,"id":214903732,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDkwMzczMg==","diff_hunk":"@@ -0,0 +1,139 @@\n+//\n+//  SearchViewController.swift\n+//  MovieDB_IOS\n+//\n+//  Created by Loc Le on 8/25/18.\n+//  Copyright © 2018 ThinhLe. All rights reserved.\n+//\n+\n+import UIKit\n+import DropDown\n+\n+class SearchViewController: UIViewController, SearchView, MovieCollectionViewCellDelegate {\n+\n+    @IBOutlet weak var collectionView: UICollectionView!\n+    @IBOutlet weak var noResultLabel: UILabel!\n+    @IBOutlet weak var searchBar: UISearchBar!\n+    @IBOutlet weak var searchOptionView: UIView!\n+    @IBOutlet weak var categoryButton: UIButton!\n+    @IBOutlet weak var genreButton: UIButton!\n+\n+    private var moviesFound = [Movie]()\n+    private var genresOption = [String]()\n+    private var categoryOption = [String]()\n+    private var genresDropDown = DropDown()\n+    private var categoryDropDown =  DropDown()\n+    private var presenter: SearchViewPresenter!\n+\n+    @IBAction func genresButtonTapped(_ sender: Any) {\n+        genresDropDown.show()\n+    }\n+\n+    @IBAction func categoryButtonTapped(_ sender: Any) {\n+        categoryDropDown.show()\n+    }\n+\n+    // MARK: LIFE CYCLE\n+\n+    override var preferredStatusBarStyle: UIStatusBarStyle {\n+        return UIStatusBarStyle.lightContent\n+    }\n+\n+    override func viewDidLoad() {\n+        addOptions()\n+        addDropDown(dropdown: genresDropDown, to: genreButton, dataSource: genresOption)\n+        addDropDown(dropdown: categoryDropDown, to: categoryButton, dataSource: categoryOption)\n+        presenter = SearchViewPresenter(view: self, repository: RemoteRepository.shared)\n+        collectionView.register(UINib(nibName: \"MovieCollectionViewCell\", bundle: nil),\n+                                forCellWithReuseIdentifier: \"MovieCollectionViewCell\")\n+    }\n+\n+    // MARK: function\n+    func searchSuccess(movies: [Movie]) {\n+        moviesFound = movies\n+        if movies.isEmpty {\n+            noResultLabel.isHidden = false","path":"MovieDB_IOS/MovieDB_IOS/Scenes/SearchViewController/SearchViewController.swift","position":55,"original_position":55,"commit_id":"bf05de4a04e2ccf0b59208748bea2a93e6c63d82","original_commit_id":"bf05de4a04e2ccf0b59208748bea2a93e6c63d82","user":{"login":"LeThinh2511","id":31402343,"node_id":"MDQ6VXNlcjMxNDAyMzQz","avatar_url":"https://avatars0.githubusercontent.com/u/31402343?v=4","gravatar_id":"","url":"https://api.github.com/users/LeThinh2511","html_url":"https://github.com/LeThinh2511","followers_url":"https://api.github.com/users/LeThinh2511/followers","following_url":"https://api.github.com/users/LeThinh2511/following{/other_user}","gists_url":"https://api.github.com/users/LeThinh2511/gists{/gist_id}","starred_url":"https://api.github.com/users/LeThinh2511/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeThinh2511/subscriptions","organizations_url":"https://api.github.com/users/LeThinh2511/orgs","repos_url":"https://api.github.com/users/LeThinh2511/repos","events_url":"https://api.github.com/users/LeThinh2511/events{/privacy}","received_events_url":"https://api.github.com/users/LeThinh2511/received_events","type":"User","site_admin":false},"body":"ok","created_at":"2018-09-04T13:00:55Z","updated_at":"2018-09-04T13:00:55Z","html_url":"https://github.com/LobeSoftware/MovieDB_IOS/pull/8#discussion_r214903732","pull_request_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/pulls/8","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/pulls/comments/214903732"},"html":{"href":"https://github.com/LobeSoftware/MovieDB_IOS/pull/8#discussion_r214903732"},"pull_request":{"href":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/pulls/8"}},"in_reply_to_id":214864584},"pull_request":{"url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/pulls/8","id":212850743,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyODUwNzQz","html_url":"https://github.com/LobeSoftware/MovieDB_IOS/pull/8","diff_url":"https://github.com/LobeSoftware/MovieDB_IOS/pull/8.diff","patch_url":"https://github.com/LobeSoftware/MovieDB_IOS/pull/8.patch","issue_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/issues/8","number":8,"state":"open","locked":false,"title":"Design search screen and favorite screen","user":{"login":"LeThinh2511","id":31402343,"node_id":"MDQ6VXNlcjMxNDAyMzQz","avatar_url":"https://avatars0.githubusercontent.com/u/31402343?v=4","gravatar_id":"","url":"https://api.github.com/users/LeThinh2511","html_url":"https://github.com/LeThinh2511","followers_url":"https://api.github.com/users/LeThinh2511/followers","following_url":"https://api.github.com/users/LeThinh2511/following{/other_user}","gists_url":"https://api.github.com/users/LeThinh2511/gists{/gist_id}","starred_url":"https://api.github.com/users/LeThinh2511/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeThinh2511/subscriptions","organizations_url":"https://api.github.com/users/LeThinh2511/orgs","repos_url":"https://api.github.com/users/LeThinh2511/repos","events_url":"https://api.github.com/users/LeThinh2511/events{/privacy}","received_events_url":"https://api.github.com/users/LeThinh2511/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-04T04:06:02Z","updated_at":"2018-09-04T13:00:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f6ef70a266de11b6570d999e0344f9bfaf8c53b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/pulls/8/commits","review_comments_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/pulls/8/comments","review_comment_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/issues/8/comments","statuses_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/statuses/bf05de4a04e2ccf0b59208748bea2a93e6c63d82","head":{"label":"LeThinh2511:designSearchScreenAndFavoriteScreen","ref":"designSearchScreenAndFavoriteScreen","sha":"bf05de4a04e2ccf0b59208748bea2a93e6c63d82","user":{"login":"LeThinh2511","id":31402343,"node_id":"MDQ6VXNlcjMxNDAyMzQz","avatar_url":"https://avatars0.githubusercontent.com/u/31402343?v=4","gravatar_id":"","url":"https://api.github.com/users/LeThinh2511","html_url":"https://github.com/LeThinh2511","followers_url":"https://api.github.com/users/LeThinh2511/followers","following_url":"https://api.github.com/users/LeThinh2511/following{/other_user}","gists_url":"https://api.github.com/users/LeThinh2511/gists{/gist_id}","starred_url":"https://api.github.com/users/LeThinh2511/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeThinh2511/subscriptions","organizations_url":"https://api.github.com/users/LeThinh2511/orgs","repos_url":"https://api.github.com/users/LeThinh2511/repos","events_url":"https://api.github.com/users/LeThinh2511/events{/privacy}","received_events_url":"https://api.github.com/users/LeThinh2511/received_events","type":"User","site_admin":false},"repo":{"id":144350181,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQzNTAxODE=","name":"MovieDB_IOS","full_name":"LeThinh2511/MovieDB_IOS","owner":{"login":"LeThinh2511","id":31402343,"node_id":"MDQ6VXNlcjMxNDAyMzQz","avatar_url":"https://avatars0.githubusercontent.com/u/31402343?v=4","gravatar_id":"","url":"https://api.github.com/users/LeThinh2511","html_url":"https://github.com/LeThinh2511","followers_url":"https://api.github.com/users/LeThinh2511/followers","following_url":"https://api.github.com/users/LeThinh2511/following{/other_user}","gists_url":"https://api.github.com/users/LeThinh2511/gists{/gist_id}","starred_url":"https://api.github.com/users/LeThinh2511/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeThinh2511/subscriptions","organizations_url":"https://api.github.com/users/LeThinh2511/orgs","repos_url":"https://api.github.com/users/LeThinh2511/repos","events_url":"https://api.github.com/users/LeThinh2511/events{/privacy}","received_events_url":"https://api.github.com/users/LeThinh2511/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LeThinh2511/MovieDB_IOS","description":null,"fork":true,"url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS","forks_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/forks","keys_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/teams","hooks_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/hooks","issue_events_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/issues/events{/number}","events_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/events","assignees_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/assignees{/user}","branches_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/branches{/branch}","tags_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/tags","blobs_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/statuses/{sha}","languages_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/languages","stargazers_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/stargazers","contributors_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/contributors","subscribers_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/subscribers","subscription_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/subscription","commits_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/contents/{+path}","compare_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/merges","archive_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/downloads","issues_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/issues{/number}","pulls_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/pulls{/number}","milestones_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/milestones{/number}","notifications_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/labels{/name}","releases_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/releases{/id}","deployments_url":"https://api.github.com/repos/LeThinh2511/MovieDB_IOS/deployments","created_at":"2018-08-11T02:48:34Z","updated_at":"2018-08-14T12:13:43Z","pushed_at":"2018-09-04T09:58:51Z","git_url":"git://github.com/LeThinh2511/MovieDB_IOS.git","ssh_url":"git@github.com:LeThinh2511/MovieDB_IOS.git","clone_url":"https://github.com/LeThinh2511/MovieDB_IOS.git","svn_url":"https://github.com/LeThinh2511/MovieDB_IOS","homepage":null,"size":264,"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":"LobeSoftware:master","ref":"master","sha":"25c0e7f4f7f8b9dd53e4b855c81f0b465f092147","user":{"login":"LobeSoftware","id":33149403,"node_id":"MDQ6VXNlcjMzMTQ5NDAz","avatar_url":"https://avatars3.githubusercontent.com/u/33149403?v=4","gravatar_id":"","url":"https://api.github.com/users/LobeSoftware","html_url":"https://github.com/LobeSoftware","followers_url":"https://api.github.com/users/LobeSoftware/followers","following_url":"https://api.github.com/users/LobeSoftware/following{/other_user}","gists_url":"https://api.github.com/users/LobeSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/LobeSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LobeSoftware/subscriptions","organizations_url":"https://api.github.com/users/LobeSoftware/orgs","repos_url":"https://api.github.com/users/LobeSoftware/repos","events_url":"https://api.github.com/users/LobeSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/LobeSoftware/received_events","type":"User","site_admin":false},"repo":{"id":144219289,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQyMTkyODk=","name":"MovieDB_IOS","full_name":"LobeSoftware/MovieDB_IOS","owner":{"login":"LobeSoftware","id":33149403,"node_id":"MDQ6VXNlcjMzMTQ5NDAz","avatar_url":"https://avatars3.githubusercontent.com/u/33149403?v=4","gravatar_id":"","url":"https://api.github.com/users/LobeSoftware","html_url":"https://github.com/LobeSoftware","followers_url":"https://api.github.com/users/LobeSoftware/followers","following_url":"https://api.github.com/users/LobeSoftware/following{/other_user}","gists_url":"https://api.github.com/users/LobeSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/LobeSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LobeSoftware/subscriptions","organizations_url":"https://api.github.com/users/LobeSoftware/orgs","repos_url":"https://api.github.com/users/LobeSoftware/repos","events_url":"https://api.github.com/users/LobeSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/LobeSoftware/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LobeSoftware/MovieDB_IOS","description":null,"fork":false,"url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS","forks_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/forks","keys_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/teams","hooks_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/hooks","issue_events_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/issues/events{/number}","events_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/events","assignees_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/assignees{/user}","branches_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/branches{/branch}","tags_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/tags","blobs_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/statuses/{sha}","languages_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/languages","stargazers_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/stargazers","contributors_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/contributors","subscribers_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/subscribers","subscription_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/subscription","commits_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/contents/{+path}","compare_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/merges","archive_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/downloads","issues_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/issues{/number}","pulls_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/pulls{/number}","milestones_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/milestones{/number}","notifications_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/labels{/name}","releases_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/releases{/id}","deployments_url":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/deployments","created_at":"2018-08-10T01:03:46Z","updated_at":"2018-09-04T02:07:50Z","pushed_at":"2018-09-04T04:06:03Z","git_url":"git://github.com/LobeSoftware/MovieDB_IOS.git","ssh_url":"git@github.com:LobeSoftware/MovieDB_IOS.git","clone_url":"https://github.com/LobeSoftware/MovieDB_IOS.git","svn_url":"https://github.com/LobeSoftware/MovieDB_IOS","homepage":null,"size":166,"stargazers_count":0,"watchers_count":0,"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":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/pulls/8"},"html":{"href":"https://github.com/LobeSoftware/MovieDB_IOS/pull/8"},"issue":{"href":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/issues/8"},"comments":{"href":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/LobeSoftware/MovieDB_IOS/statuses/bf05de4a04e2ccf0b59208748bea2a93e6c63d82"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"LeThinh2511"}}