{"action":"closed","number":3488,"pull_request":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3488","id":55555957,"html_url":"https://github.com/dolphin-emu/dolphin/pull/3488","diff_url":"https://github.com/dolphin-emu/dolphin/pull/3488.diff","patch_url":"https://github.com/dolphin-emu/dolphin/pull/3488.patch","issue_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3488","number":3488,"state":"closed","locked":false,"title":"[Android] Refactor Tv/Main Activities to MVP architecture.","user":{"login":"sigmabeta","id":1912034,"avatar_url":"https://avatars.githubusercontent.com/u/1912034?v=3","gravatar_id":"","url":"https://api.github.com/users/sigmabeta","html_url":"https://github.com/sigmabeta","followers_url":"https://api.github.com/users/sigmabeta/followers","following_url":"https://api.github.com/users/sigmabeta/following{/other_user}","gists_url":"https://api.github.com/users/sigmabeta/gists{/gist_id}","starred_url":"https://api.github.com/users/sigmabeta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sigmabeta/subscriptions","organizations_url":"https://api.github.com/users/sigmabeta/orgs","repos_url":"https://api.github.com/users/sigmabeta/repos","events_url":"https://api.github.com/users/sigmabeta/events{/privacy}","received_events_url":"https://api.github.com/users/sigmabeta/received_events","type":"User","site_admin":false},"body":"MVP is a common architecture for Android apps these days. The rough idea is to strip Activities and Fragments of any control flow logic. That logic instead goes into classes called Presenters, which should ideally be stripped of any classes from the Android framework (the android.* package.) \r\n\r\nAlong with separation-of-concern benefits, this drastically simplifies writing unit tests for the control flow logic (testing methods that call into the Android framework requires a physical device, or an emulator running on a non-headless computer.)\r\n\r\nThis PR gets the two MainActivity variants going in that direction - certainly a lot more to do, but it's a start.\r\n\r\n(One side effect; since TvMainActivity now loads games asynchronously, it should load faster, but the order of the rows displayed on screen is likely to be incorrect. This will be resolved in a later PR.)","created_at":"2016-01-10T02:07:54Z","updated_at":"2016-01-10T16:40:37Z","closed_at":"2016-01-10T16:40:37Z","merged_at":"2016-01-10T16:40:37Z","merge_commit_sha":"0a11801cfa23839dd658c2e9f3f2693031017a03","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3488/commits","review_comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3488/comments","review_comment_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3488/comments","statuses_url":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/a455305c23fba35b8da57515072ab707f777d7ac","head":{"label":"sigmabeta:android-mvp-main-activity","ref":"android-mvp-main-activity","sha":"a455305c23fba35b8da57515072ab707f777d7ac","user":{"login":"sigmabeta","id":1912034,"avatar_url":"https://avatars.githubusercontent.com/u/1912034?v=3","gravatar_id":"","url":"https://api.github.com/users/sigmabeta","html_url":"https://github.com/sigmabeta","followers_url":"https://api.github.com/users/sigmabeta/followers","following_url":"https://api.github.com/users/sigmabeta/following{/other_user}","gists_url":"https://api.github.com/users/sigmabeta/gists{/gist_id}","starred_url":"https://api.github.com/users/sigmabeta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sigmabeta/subscriptions","organizations_url":"https://api.github.com/users/sigmabeta/orgs","repos_url":"https://api.github.com/users/sigmabeta/repos","events_url":"https://api.github.com/users/sigmabeta/events{/privacy}","received_events_url":"https://api.github.com/users/sigmabeta/received_events","type":"User","site_admin":false},"repo":{"id":19030423,"name":"dolphin","full_name":"sigmabeta/dolphin","owner":{"login":"sigmabeta","id":1912034,"avatar_url":"https://avatars.githubusercontent.com/u/1912034?v=3","gravatar_id":"","url":"https://api.github.com/users/sigmabeta","html_url":"https://github.com/sigmabeta","followers_url":"https://api.github.com/users/sigmabeta/followers","following_url":"https://api.github.com/users/sigmabeta/following{/other_user}","gists_url":"https://api.github.com/users/sigmabeta/gists{/gist_id}","starred_url":"https://api.github.com/users/sigmabeta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sigmabeta/subscriptions","organizations_url":"https://api.github.com/users/sigmabeta/orgs","repos_url":"https://api.github.com/users/sigmabeta/repos","events_url":"https://api.github.com/users/sigmabeta/events{/privacy}","received_events_url":"https://api.github.com/users/sigmabeta/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sigmabeta/dolphin","description":"Dolphin is a GameCube/Wii emulator, allowing you to play games for these two platforms on PC, with improvements.","fork":true,"url":"https://api.github.com/repos/sigmabeta/dolphin","forks_url":"https://api.github.com/repos/sigmabeta/dolphin/forks","keys_url":"https://api.github.com/repos/sigmabeta/dolphin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sigmabeta/dolphin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sigmabeta/dolphin/teams","hooks_url":"https://api.github.com/repos/sigmabeta/dolphin/hooks","issue_events_url":"https://api.github.com/repos/sigmabeta/dolphin/issues/events{/number}","events_url":"https://api.github.com/repos/sigmabeta/dolphin/events","assignees_url":"https://api.github.com/repos/sigmabeta/dolphin/assignees{/user}","branches_url":"https://api.github.com/repos/sigmabeta/dolphin/branches{/branch}","tags_url":"https://api.github.com/repos/sigmabeta/dolphin/tags","blobs_url":"https://api.github.com/repos/sigmabeta/dolphin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sigmabeta/dolphin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sigmabeta/dolphin/git/refs{/sha}","trees_url":"https://api.github.com/repos/sigmabeta/dolphin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sigmabeta/dolphin/statuses/{sha}","languages_url":"https://api.github.com/repos/sigmabeta/dolphin/languages","stargazers_url":"https://api.github.com/repos/sigmabeta/dolphin/stargazers","contributors_url":"https://api.github.com/repos/sigmabeta/dolphin/contributors","subscribers_url":"https://api.github.com/repos/sigmabeta/dolphin/subscribers","subscription_url":"https://api.github.com/repos/sigmabeta/dolphin/subscription","commits_url":"https://api.github.com/repos/sigmabeta/dolphin/commits{/sha}","git_commits_url":"https://api.github.com/repos/sigmabeta/dolphin/git/commits{/sha}","comments_url":"https://api.github.com/repos/sigmabeta/dolphin/comments{/number}","issue_comment_url":"https://api.github.com/repos/sigmabeta/dolphin/issues/comments{/number}","contents_url":"https://api.github.com/repos/sigmabeta/dolphin/contents/{+path}","compare_url":"https://api.github.com/repos/sigmabeta/dolphin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sigmabeta/dolphin/merges","archive_url":"https://api.github.com/repos/sigmabeta/dolphin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sigmabeta/dolphin/downloads","issues_url":"https://api.github.com/repos/sigmabeta/dolphin/issues{/number}","pulls_url":"https://api.github.com/repos/sigmabeta/dolphin/pulls{/number}","milestones_url":"https://api.github.com/repos/sigmabeta/dolphin/milestones{/number}","notifications_url":"https://api.github.com/repos/sigmabeta/dolphin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sigmabeta/dolphin/labels{/name}","releases_url":"https://api.github.com/repos/sigmabeta/dolphin/releases{/id}","created_at":"2014-04-22T13:24:30Z","updated_at":"2015-05-11T22:20:35Z","pushed_at":"2016-01-10T15:58:21Z","git_url":"git://github.com/sigmabeta/dolphin.git","ssh_url":"git@github.com:sigmabeta/dolphin.git","clone_url":"https://github.com/sigmabeta/dolphin.git","svn_url":"https://github.com/sigmabeta/dolphin","homepage":null,"size":234406,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"dolphin-emu:master","ref":"master","sha":"20718305dbee0698ba73a9417162b7746be22a50","user":{"login":"dolphin-emu","id":5050316,"avatar_url":"https://avatars.githubusercontent.com/u/5050316?v=3","gravatar_id":"","url":"https://api.github.com/users/dolphin-emu","html_url":"https://github.com/dolphin-emu","followers_url":"https://api.github.com/users/dolphin-emu/followers","following_url":"https://api.github.com/users/dolphin-emu/following{/other_user}","gists_url":"https://api.github.com/users/dolphin-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/dolphin-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolphin-emu/subscriptions","organizations_url":"https://api.github.com/users/dolphin-emu/orgs","repos_url":"https://api.github.com/users/dolphin-emu/repos","events_url":"https://api.github.com/users/dolphin-emu/events{/privacy}","received_events_url":"https://api.github.com/users/dolphin-emu/received_events","type":"Organization","site_admin":false},"repo":{"id":11577304,"name":"dolphin","full_name":"dolphin-emu/dolphin","owner":{"login":"dolphin-emu","id":5050316,"avatar_url":"https://avatars.githubusercontent.com/u/5050316?v=3","gravatar_id":"","url":"https://api.github.com/users/dolphin-emu","html_url":"https://github.com/dolphin-emu","followers_url":"https://api.github.com/users/dolphin-emu/followers","following_url":"https://api.github.com/users/dolphin-emu/following{/other_user}","gists_url":"https://api.github.com/users/dolphin-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/dolphin-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolphin-emu/subscriptions","organizations_url":"https://api.github.com/users/dolphin-emu/orgs","repos_url":"https://api.github.com/users/dolphin-emu/repos","events_url":"https://api.github.com/users/dolphin-emu/events{/privacy}","received_events_url":"https://api.github.com/users/dolphin-emu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dolphin-emu/dolphin","description":"Dolphin is a GameCube / Wii emulator, allowing you to play games for these two platforms on PC with improvements.","fork":false,"url":"https://api.github.com/repos/dolphin-emu/dolphin","forks_url":"https://api.github.com/repos/dolphin-emu/dolphin/forks","keys_url":"https://api.github.com/repos/dolphin-emu/dolphin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dolphin-emu/dolphin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dolphin-emu/dolphin/teams","hooks_url":"https://api.github.com/repos/dolphin-emu/dolphin/hooks","issue_events_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/events{/number}","events_url":"https://api.github.com/repos/dolphin-emu/dolphin/events","assignees_url":"https://api.github.com/repos/dolphin-emu/dolphin/assignees{/user}","branches_url":"https://api.github.com/repos/dolphin-emu/dolphin/branches{/branch}","tags_url":"https://api.github.com/repos/dolphin-emu/dolphin/tags","blobs_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/refs{/sha}","trees_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/{sha}","languages_url":"https://api.github.com/repos/dolphin-emu/dolphin/languages","stargazers_url":"https://api.github.com/repos/dolphin-emu/dolphin/stargazers","contributors_url":"https://api.github.com/repos/dolphin-emu/dolphin/contributors","subscribers_url":"https://api.github.com/repos/dolphin-emu/dolphin/subscribers","subscription_url":"https://api.github.com/repos/dolphin-emu/dolphin/subscription","commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/commits{/sha}","git_commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/commits{/sha}","comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/comments{/number}","issue_comment_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/comments{/number}","contents_url":"https://api.github.com/repos/dolphin-emu/dolphin/contents/{+path}","compare_url":"https://api.github.com/repos/dolphin-emu/dolphin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dolphin-emu/dolphin/merges","archive_url":"https://api.github.com/repos/dolphin-emu/dolphin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dolphin-emu/dolphin/downloads","issues_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues{/number}","pulls_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls{/number}","milestones_url":"https://api.github.com/repos/dolphin-emu/dolphin/milestones{/number}","notifications_url":"https://api.github.com/repos/dolphin-emu/dolphin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dolphin-emu/dolphin/labels{/name}","releases_url":"https://api.github.com/repos/dolphin-emu/dolphin/releases{/id}","created_at":"2013-07-22T09:07:57Z","updated_at":"2016-01-10T16:02:52Z","pushed_at":"2016-01-10T16:40:37Z","git_url":"git://github.com/dolphin-emu/dolphin.git","ssh_url":"git@github.com:dolphin-emu/dolphin.git","clone_url":"https://github.com/dolphin-emu/dolphin.git","svn_url":"https://github.com/dolphin-emu/dolphin","homepage":"https://dolphin-emu.org/","size":251940,"stargazers_count":1935,"watchers_count":1935,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":587,"mirror_url":null,"open_issues_count":77,"forks":587,"open_issues":77,"watchers":1935,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3488"},"html":{"href":"https://github.com/dolphin-emu/dolphin/pull/3488"},"issue":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3488"},"comments":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/issues/3488/comments"},"review_comments":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3488/comments"},"review_comment":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/3488/commits"},"statuses":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/a455305c23fba35b8da57515072ab707f777d7ac"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"Sonicadvance1","id":1018829,"avatar_url":"https://avatars.githubusercontent.com/u/1018829?v=3","gravatar_id":"","url":"https://api.github.com/users/Sonicadvance1","html_url":"https://github.com/Sonicadvance1","followers_url":"https://api.github.com/users/Sonicadvance1/followers","following_url":"https://api.github.com/users/Sonicadvance1/following{/other_user}","gists_url":"https://api.github.com/users/Sonicadvance1/gists{/gist_id}","starred_url":"https://api.github.com/users/Sonicadvance1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sonicadvance1/subscriptions","organizations_url":"https://api.github.com/users/Sonicadvance1/orgs","repos_url":"https://api.github.com/users/Sonicadvance1/repos","events_url":"https://api.github.com/users/Sonicadvance1/events{/privacy}","received_events_url":"https://api.github.com/users/Sonicadvance1/received_events","type":"User","site_admin":false},"comments":0,"review_comments":2,"commits":3,"additions":395,"deletions":263,"changed_files":9}}