{"action":"created","comment":{"url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/pulls/comments/82045664","pull_request_review_id":2980553,"id":82045664,"diff_hunk":"@@ -0,0 +1,57 @@\n+package com.spartahack.spartahack17.Presenter;\n+\n+import android.util.Log;\n+\n+import com.spartahack.spartahack17.Adapters.PrizeAdapter;\n+import com.spartahack.spartahack17.Model.Prize;\n+import com.spartahack.spartahack17.Retrofit.GSONMock;\n+import com.spartahack.spartahack17.Retrofit.ParseAPIService;\n+import com.spartahack.spartahack17.View.PrizeView;\n+\n+import java.util.ArrayList;\n+import java.util.Collections;\n+\n+import rx.Observable;\n+import rx.android.schedulers.AndroidSchedulers;\n+import rx.schedulers.Schedulers;\n+\n+/**\n+ * Created by memuyskens on 10/5/16.\n+ * SpartaHack-Android\n+ */\n+\n+public class PrizePresenter extends RxPresenter<PrizeView, GSONMock.Prizes> {\n+\n+    private static final String TAG = \"PrizePresenter\";\n+\n+    public void updatePrizes() {\n+        if (isViewAttached()) {\n+            getView().showLoading();\n+        }\n+\n+        Observable observable = ParseAPIService.INSTANCE.getRestAdapter().getPrizes()\n+                .observeOn(AndroidSchedulers.mainThread())\n+                .subscribeOn(Schedulers.io());\n+\n+        subscribe(observable);\n+    }\n+\n+    @Override void onError(Throwable e) {\n+        Log.e(TAG, e.toString());\n+        if (isViewAttached()) {\n+            getView().onError(e.toString());\n+        }\n+    }\n+\n+    @Override void onNext(GSONMock.Prizes data) {\n+        ArrayList<Prize> prizes = data.prizes;\n+        Collections.sort(prizes, (lhs, rhs) -> {","path":"app/src/main/java/com/spartahack/spartahack17/Presenter/PrizePresenter.java","position":48,"original_position":48,"commit_id":"712f049b0bd54ba4a8367b5fa32926cf1f51c221","original_commit_id":"712f049b0bd54ba4a8367b5fa32926cf1f51c221","user":{"login":"ryanrampage1","id":7875323,"avatar_url":"https://avatars.githubusercontent.com/u/7875323?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanrampage1","html_url":"https://github.com/ryanrampage1","followers_url":"https://api.github.com/users/ryanrampage1/followers","following_url":"https://api.github.com/users/ryanrampage1/following{/other_user}","gists_url":"https://api.github.com/users/ryanrampage1/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanrampage1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanrampage1/subscriptions","organizations_url":"https://api.github.com/users/ryanrampage1/orgs","repos_url":"https://api.github.com/users/ryanrampage1/repos","events_url":"https://api.github.com/users/ryanrampage1/events{/privacy}","received_events_url":"https://api.github.com/users/ryanrampage1/received_events","type":"User","site_admin":false},"body":"i would break out the comparator the way that i did so we can test the sorting funciton","created_at":"2016-10-05T18:59:12Z","updated_at":"2016-10-05T18:59:12Z","html_url":"https://github.com/SpartaHack/SpartaHack-Android/pull/79#discussion_r82045664","pull_request_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/pulls/79","_links":{"self":{"href":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/pulls/comments/82045664"},"html":{"href":"https://github.com/SpartaHack/SpartaHack-Android/pull/79#discussion_r82045664"},"pull_request":{"href":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/pulls/79"}}},"pull_request":{"url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/pulls/79","id":88118558,"html_url":"https://github.com/SpartaHack/SpartaHack-Android/pull/79","diff_url":"https://github.com/SpartaHack/SpartaHack-Android/pull/79.diff","patch_url":"https://github.com/SpartaHack/SpartaHack-Android/pull/79.patch","issue_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/issues/79","number":79,"state":"open","locked":false,"title":"Converted PrizeFragment to MVP and added tests.","user":{"login":"memuyskens","id":11319843,"avatar_url":"https://avatars.githubusercontent.com/u/11319843?v=3","gravatar_id":"","url":"https://api.github.com/users/memuyskens","html_url":"https://github.com/memuyskens","followers_url":"https://api.github.com/users/memuyskens/followers","following_url":"https://api.github.com/users/memuyskens/following{/other_user}","gists_url":"https://api.github.com/users/memuyskens/gists{/gist_id}","starred_url":"https://api.github.com/users/memuyskens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/memuyskens/subscriptions","organizations_url":"https://api.github.com/users/memuyskens/orgs","repos_url":"https://api.github.com/users/memuyskens/repos","events_url":"https://api.github.com/users/memuyskens/events{/privacy}","received_events_url":"https://api.github.com/users/memuyskens/received_events","type":"User","site_admin":false},"body":"This is my first attempt at following the MVP pattern based off of Ryan's announcement fragment work. Let me know what you think.","created_at":"2016-10-05T17:08:42Z","updated_at":"2016-10-05T18:59:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1759e2eb23b2fec5b671fe0a0c44845c5fecf828","assignee":{"login":"ryanrampage1","id":7875323,"avatar_url":"https://avatars.githubusercontent.com/u/7875323?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanrampage1","html_url":"https://github.com/ryanrampage1","followers_url":"https://api.github.com/users/ryanrampage1/followers","following_url":"https://api.github.com/users/ryanrampage1/following{/other_user}","gists_url":"https://api.github.com/users/ryanrampage1/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanrampage1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanrampage1/subscriptions","organizations_url":"https://api.github.com/users/ryanrampage1/orgs","repos_url":"https://api.github.com/users/ryanrampage1/repos","events_url":"https://api.github.com/users/ryanrampage1/events{/privacy}","received_events_url":"https://api.github.com/users/ryanrampage1/received_events","type":"User","site_admin":false},"assignees":[{"login":"ryanrampage1","id":7875323,"avatar_url":"https://avatars.githubusercontent.com/u/7875323?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanrampage1","html_url":"https://github.com/ryanrampage1","followers_url":"https://api.github.com/users/ryanrampage1/followers","following_url":"https://api.github.com/users/ryanrampage1/following{/other_user}","gists_url":"https://api.github.com/users/ryanrampage1/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanrampage1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanrampage1/subscriptions","organizations_url":"https://api.github.com/users/ryanrampage1/orgs","repos_url":"https://api.github.com/users/ryanrampage1/repos","events_url":"https://api.github.com/users/ryanrampage1/events{/privacy}","received_events_url":"https://api.github.com/users/ryanrampage1/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/pulls/79/commits","review_comments_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/pulls/79/comments","review_comment_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/issues/79/comments","statuses_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/statuses/712f049b0bd54ba4a8367b5fa32926cf1f51c221","head":{"label":"SpartaHack:prizeMVP","ref":"prizeMVP","sha":"712f049b0bd54ba4a8367b5fa32926cf1f51c221","user":{"login":"SpartaHack","id":9873497,"avatar_url":"https://avatars.githubusercontent.com/u/9873497?v=3","gravatar_id":"","url":"https://api.github.com/users/SpartaHack","html_url":"https://github.com/SpartaHack","followers_url":"https://api.github.com/users/SpartaHack/followers","following_url":"https://api.github.com/users/SpartaHack/following{/other_user}","gists_url":"https://api.github.com/users/SpartaHack/gists{/gist_id}","starred_url":"https://api.github.com/users/SpartaHack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpartaHack/subscriptions","organizations_url":"https://api.github.com/users/SpartaHack/orgs","repos_url":"https://api.github.com/users/SpartaHack/repos","events_url":"https://api.github.com/users/SpartaHack/events{/privacy}","received_events_url":"https://api.github.com/users/SpartaHack/received_events","type":"Organization","site_admin":false},"repo":{"id":40737618,"name":"SpartaHack-Android","full_name":"SpartaHack/SpartaHack-Android","owner":{"login":"SpartaHack","id":9873497,"avatar_url":"https://avatars.githubusercontent.com/u/9873497?v=3","gravatar_id":"","url":"https://api.github.com/users/SpartaHack","html_url":"https://github.com/SpartaHack","followers_url":"https://api.github.com/users/SpartaHack/followers","following_url":"https://api.github.com/users/SpartaHack/following{/other_user}","gists_url":"https://api.github.com/users/SpartaHack/gists{/gist_id}","starred_url":"https://api.github.com/users/SpartaHack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpartaHack/subscriptions","organizations_url":"https://api.github.com/users/SpartaHack/orgs","repos_url":"https://api.github.com/users/SpartaHack/repos","events_url":"https://api.github.com/users/SpartaHack/events{/privacy}","received_events_url":"https://api.github.com/users/SpartaHack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SpartaHack/SpartaHack-Android","description":null,"fork":false,"url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android","forks_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/forks","keys_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/teams","hooks_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/hooks","issue_events_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/issues/events{/number}","events_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/events","assignees_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/assignees{/user}","branches_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/branches{/branch}","tags_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/tags","blobs_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/statuses/{sha}","languages_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/languages","stargazers_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/stargazers","contributors_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/contributors","subscribers_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/subscribers","subscription_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/subscription","commits_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/issues/comments{/number}","contents_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/contents/{+path}","compare_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/merges","archive_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/downloads","issues_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/issues{/number}","pulls_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/pulls{/number}","milestones_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/milestones{/number}","notifications_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/labels{/name}","releases_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/releases{/id}","deployments_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/deployments","created_at":"2015-08-14T21:55:41Z","updated_at":"2016-08-16T02:39:17Z","pushed_at":"2016-10-05T17:08:42Z","git_url":"git://github.com/SpartaHack/SpartaHack-Android.git","ssh_url":"git@github.com:SpartaHack/SpartaHack-Android.git","clone_url":"https://github.com/SpartaHack/SpartaHack-Android.git","svn_url":"https://github.com/SpartaHack/SpartaHack-Android","homepage":"","size":2633,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":10,"forks":0,"open_issues":10,"watchers":2,"default_branch":"master"}},"base":{"label":"SpartaHack:develop","ref":"develop","sha":"3ec4e0784270b40c273a3f98816248bab589dfeb","user":{"login":"SpartaHack","id":9873497,"avatar_url":"https://avatars.githubusercontent.com/u/9873497?v=3","gravatar_id":"","url":"https://api.github.com/users/SpartaHack","html_url":"https://github.com/SpartaHack","followers_url":"https://api.github.com/users/SpartaHack/followers","following_url":"https://api.github.com/users/SpartaHack/following{/other_user}","gists_url":"https://api.github.com/users/SpartaHack/gists{/gist_id}","starred_url":"https://api.github.com/users/SpartaHack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpartaHack/subscriptions","organizations_url":"https://api.github.com/users/SpartaHack/orgs","repos_url":"https://api.github.com/users/SpartaHack/repos","events_url":"https://api.github.com/users/SpartaHack/events{/privacy}","received_events_url":"https://api.github.com/users/SpartaHack/received_events","type":"Organization","site_admin":false},"repo":{"id":40737618,"name":"SpartaHack-Android","full_name":"SpartaHack/SpartaHack-Android","owner":{"login":"SpartaHack","id":9873497,"avatar_url":"https://avatars.githubusercontent.com/u/9873497?v=3","gravatar_id":"","url":"https://api.github.com/users/SpartaHack","html_url":"https://github.com/SpartaHack","followers_url":"https://api.github.com/users/SpartaHack/followers","following_url":"https://api.github.com/users/SpartaHack/following{/other_user}","gists_url":"https://api.github.com/users/SpartaHack/gists{/gist_id}","starred_url":"https://api.github.com/users/SpartaHack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpartaHack/subscriptions","organizations_url":"https://api.github.com/users/SpartaHack/orgs","repos_url":"https://api.github.com/users/SpartaHack/repos","events_url":"https://api.github.com/users/SpartaHack/events{/privacy}","received_events_url":"https://api.github.com/users/SpartaHack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SpartaHack/SpartaHack-Android","description":null,"fork":false,"url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android","forks_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/forks","keys_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/teams","hooks_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/hooks","issue_events_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/issues/events{/number}","events_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/events","assignees_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/assignees{/user}","branches_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/branches{/branch}","tags_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/tags","blobs_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/statuses/{sha}","languages_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/languages","stargazers_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/stargazers","contributors_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/contributors","subscribers_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/subscribers","subscription_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/subscription","commits_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/issues/comments{/number}","contents_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/contents/{+path}","compare_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/merges","archive_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/downloads","issues_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/issues{/number}","pulls_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/pulls{/number}","milestones_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/milestones{/number}","notifications_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/labels{/name}","releases_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/releases{/id}","deployments_url":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/deployments","created_at":"2015-08-14T21:55:41Z","updated_at":"2016-08-16T02:39:17Z","pushed_at":"2016-10-05T17:08:42Z","git_url":"git://github.com/SpartaHack/SpartaHack-Android.git","ssh_url":"git@github.com:SpartaHack/SpartaHack-Android.git","clone_url":"https://github.com/SpartaHack/SpartaHack-Android.git","svn_url":"https://github.com/SpartaHack/SpartaHack-Android","homepage":"","size":2633,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":10,"forks":0,"open_issues":10,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/pulls/79"},"html":{"href":"https://github.com/SpartaHack/SpartaHack-Android/pull/79"},"issue":{"href":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/issues/79"},"comments":{"href":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/issues/79/comments"},"review_comments":{"href":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/pulls/79/comments"},"review_comment":{"href":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/pulls/79/commits"},"statuses":{"href":"https://api.github.com/repos/SpartaHack/SpartaHack-Android/statuses/712f049b0bd54ba4a8367b5fa32926cf1f51c221"}}}}
{"actor":{"display_login":"ryanrampage1"}}