{"action":"created","comment":{"url":"https://api.github.com/repos/kickstarter/android-oss/pulls/comments/122490546","pull_request_review_id":44614425,"id":122490546,"diff_hunk":"@@ -0,0 +1,106 @@\n+package com.kickstarter.ui.activities;\n+\n+import android.content.Intent;\n+import android.os.Bundle;\n+import android.support.annotation.NonNull;\n+import android.support.annotation.Nullable;\n+import android.widget.TextView;\n+\n+import com.kickstarter.R;\n+import com.kickstarter.libs.BaseActivity;\n+import com.kickstarter.libs.KSCurrency;\n+import com.kickstarter.libs.KSString;\n+import com.kickstarter.libs.RefTag;\n+import com.kickstarter.libs.qualifiers.RequiresActivityViewModel;\n+import com.kickstarter.libs.utils.ProjectUtils;\n+import com.kickstarter.models.Project;\n+import com.kickstarter.ui.IntentKey;\n+import com.kickstarter.viewmodels.CreatorDashboardViewModel;\n+\n+import java.math.RoundingMode;\n+\n+import butterknife.Bind;\n+import butterknife.BindString;\n+import butterknife.ButterKnife;\n+import butterknife.OnClick;\n+\n+import static com.kickstarter.libs.rx.transformers.Transformers.observeForUI;\n+\n+@RequiresActivityViewModel(CreatorDashboardViewModel.ViewModel.class)\n+public final class CreatorDashboardActivity extends BaseActivity<CreatorDashboardViewModel.ViewModel> {\n+\n+  protected @Bind(R.id.creator_dashboard_amount_raised) TextView amountRaisedTextView;\n+  protected @Bind(R.id.creator_dashboard_funding_text) TextView fundingTextTextView;\n+  protected @Bind(R.id.creator_dashboard_backer_count) TextView backerCountTextView;\n+  protected @Bind(R.id.creator_dashboard_project_name) TextView projectNameTextView;\n+  protected @Bind(R.id.creator_dashboard_time_remaining) TextView timeRemainingTextView;\n+  protected @Bind(R.id.creator_dashboard_time_remaining_text) TextView timeRemainingTextTextView;\n+  protected @BindString(R.string.discovery_baseball_card_stats_pledged_of_goal) String pledgedOfGoalString;\n+\n+  private KSCurrency ksCurrency;\n+  private KSString ksString;\n+\n+  @Override\n+  protected void onCreate(final @Nullable Bundle savedInstanceState) {\n+    super.onCreate(savedInstanceState);\n+    setContentView(R.layout.creator_dashboard_layout);\n+    ButterKnife.bind(this);\n+\n+    this.ksCurrency = this.environment().ksCurrency();\n+    this.ksString = this.environment().ksString();\n+\n+    viewModel.outputs.latestProject()\n+      .compose(bindToLifecycle())\n+      .compose(observeForUI())\n+      .subscribe(this::setPledgedOfGoalString);\n+\n+    viewModel.outputs.latestProject()\n+      .compose(bindToLifecycle())\n+      .compose(observeForUI())\n+      .subscribe(this::setTimeRemainingTextTextView);\n+\n+    viewModel.outputs.timeRemaining()\n+      .compose(bindToLifecycle())\n+      .compose(observeForUI())\n+      .subscribe(timeRemainingTextView::setText);\n+\n+    viewModel.outputs.projectBackersCountText()\n+      .compose(bindToLifecycle())\n+      .compose(observeForUI())\n+      .subscribe(backerCountTextView::setText);\n+\n+    viewModel.outputs.projectNameTextViewText()\n+      .compose(bindToLifecycle())\n+      .compose(observeForUI())\n+      .subscribe(projectNameTextView::setText);\n+\n+    viewModel.outputs.startProjectActivity()\n+      .compose(bindToLifecycle())\n+      .compose(observeForUI())\n+      .subscribe(projectAndRefTag -> this.startProjectActivity(projectAndRefTag.first, projectAndRefTag.second));\n+  }\n+\n+  @OnClick({ R.id.creator_view_project_button, R.id.creator_dashboard_project_context_view })\n+  protected void viewProjectButtonClicked() {\n+    this.viewModel.inputs.projectViewClicked();\n+  }\n+\n+  private void startProjectActivity(final @NonNull Project project, final @NonNull RefTag refTag) {\n+    final Intent intent = new Intent(this, ProjectActivity.class)\n+      .putExtra(IntentKey.PROJECT, project)\n+      .putExtra(IntentKey.REF_TAG, refTag);\n+    startActivity(intent);\n+  }\n+\n+  private void setPledgedOfGoalString(final @NonNull Project latestProject) {\n+    final String goalString = ksCurrency.format(latestProject.pledged(), latestProject, false, true, RoundingMode.DOWN);\n+    amountRaisedTextView.setText(goalString);\n+\n+    final String goalText = ksString.format(this.pledgedOfGoalString, \"goal\", goalString);\n+    fundingTextTextView.setText(goalText);\n+  }\n+\n+  private void setTimeRemainingTextTextView(final @NonNull Project latestProject) {\n+    timeRemainingTextTextView.setText(ProjectUtils.deadlineCountdownDetail(latestProject, this.getApplicationContext(), ksString));","path":"app/src/main/java/com/kickstarter/ui/activities/CreatorDashboardActivity.java","position":104,"original_position":104,"commit_id":"d5adda053d3699cd2e4372cd1f9b4d38c0c0b8bf","original_commit_id":"d5adda053d3699cd2e4372cd1f9b4d38c0c0b8bf","user":{"login":"luoser","id":4934046,"avatar_url":"https://avatars1.githubusercontent.com/u/4934046?v=3","gravatar_id":"","url":"https://api.github.com/users/luoser","html_url":"https://github.com/luoser","followers_url":"https://api.github.com/users/luoser/followers","following_url":"https://api.github.com/users/luoser/following{/other_user}","gists_url":"https://api.github.com/users/luoser/gists{/gist_id}","starred_url":"https://api.github.com/users/luoser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luoser/subscriptions","organizations_url":"https://api.github.com/users/luoser/orgs","repos_url":"https://api.github.com/users/luoser/repos","events_url":"https://api.github.com/users/luoser/events{/privacy}","received_events_url":"https://api.github.com/users/luoser/received_events","type":"User","site_admin":false},"body":"since `this` is an Activity, which inherently is a `context`, you can replace `this.getApplicationContext()` with just `this`!","created_at":"2017-06-16T17:15:35Z","updated_at":"2017-06-16T17:29:34Z","html_url":"https://github.com/kickstarter/android-oss/pull/115#discussion_r122490546","pull_request_url":"https://api.github.com/repos/kickstarter/android-oss/pulls/115","_links":{"self":{"href":"https://api.github.com/repos/kickstarter/android-oss/pulls/comments/122490546"},"html":{"href":"https://github.com/kickstarter/android-oss/pull/115#discussion_r122490546"},"pull_request":{"href":"https://api.github.com/repos/kickstarter/android-oss/pulls/115"}}},"pull_request":{"url":"https://api.github.com/repos/kickstarter/android-oss/pulls/115","id":125892801,"html_url":"https://github.com/kickstarter/android-oss/pull/115","diff_url":"https://github.com/kickstarter/android-oss/pull/115.diff","patch_url":"https://github.com/kickstarter/android-oss/pull/115.patch","issue_url":"https://api.github.com/repos/kickstarter/android-oss/issues/115","number":115,"state":"open","locked":false,"title":"Creator tools v0","user":{"login":"swoopej","id":1313981,"avatar_url":"https://avatars1.githubusercontent.com/u/1313981?v=3","gravatar_id":"","url":"https://api.github.com/users/swoopej","html_url":"https://github.com/swoopej","followers_url":"https://api.github.com/users/swoopej/followers","following_url":"https://api.github.com/users/swoopej/following{/other_user}","gists_url":"https://api.github.com/users/swoopej/gists{/gist_id}","starred_url":"https://api.github.com/users/swoopej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swoopej/subscriptions","organizations_url":"https://api.github.com/users/swoopej/orgs","repos_url":"https://api.github.com/users/swoopej/repos","events_url":"https://api.github.com/users/swoopej/events{/privacy}","received_events_url":"https://api.github.com/users/swoopej/received_events","type":"User","site_admin":false},"body":"intial screen for a creator view.  right now has very basic data that looks like this:\r\n\r\n<img width=\"420\" alt=\"screen shot 2017-06-15 at 3 17 35 pm\" src=\"https://user-images.githubusercontent.com/1313981/27197846-d4b673de-51dd-11e7-86a0-37b59b883514.png\">\r\n\r\n\r\nthat's all!","created_at":"2017-06-15T19:18:27Z","updated_at":"2017-06-16T17:29:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f42d73def45a0b9a52049414600d7cd0b374e4ae","assignee":null,"assignees":[],"requested_reviewers":[{"login":"christopherwright","id":75171,"avatar_url":"https://avatars0.githubusercontent.com/u/75171?v=3","gravatar_id":"","url":"https://api.github.com/users/christopherwright","html_url":"https://github.com/christopherwright","followers_url":"https://api.github.com/users/christopherwright/followers","following_url":"https://api.github.com/users/christopherwright/following{/other_user}","gists_url":"https://api.github.com/users/christopherwright/gists{/gist_id}","starred_url":"https://api.github.com/users/christopherwright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christopherwright/subscriptions","organizations_url":"https://api.github.com/users/christopherwright/orgs","repos_url":"https://api.github.com/users/christopherwright/repos","events_url":"https://api.github.com/users/christopherwright/events{/privacy}","received_events_url":"https://api.github.com/users/christopherwright/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kickstarter/android-oss/pulls/115/commits","review_comments_url":"https://api.github.com/repos/kickstarter/android-oss/pulls/115/comments","review_comment_url":"https://api.github.com/repos/kickstarter/android-oss/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kickstarter/android-oss/issues/115/comments","statuses_url":"https://api.github.com/repos/kickstarter/android-oss/statuses/d5adda053d3699cd2e4372cd1f9b4d38c0c0b8bf","head":{"label":"kickstarter:creator_tools_v0","ref":"creator_tools_v0","sha":"d5adda053d3699cd2e4372cd1f9b4d38c0c0b8bf","user":{"login":"kickstarter","id":120676,"avatar_url":"https://avatars2.githubusercontent.com/u/120676?v=3","gravatar_id":"","url":"https://api.github.com/users/kickstarter","html_url":"https://github.com/kickstarter","followers_url":"https://api.github.com/users/kickstarter/followers","following_url":"https://api.github.com/users/kickstarter/following{/other_user}","gists_url":"https://api.github.com/users/kickstarter/gists{/gist_id}","starred_url":"https://api.github.com/users/kickstarter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kickstarter/subscriptions","organizations_url":"https://api.github.com/users/kickstarter/orgs","repos_url":"https://api.github.com/users/kickstarter/repos","events_url":"https://api.github.com/users/kickstarter/events{/privacy}","received_events_url":"https://api.github.com/users/kickstarter/received_events","type":"Organization","site_admin":false},"repo":{"id":76278501,"name":"android-oss","full_name":"kickstarter/android-oss","owner":{"login":"kickstarter","id":120676,"avatar_url":"https://avatars2.githubusercontent.com/u/120676?v=3","gravatar_id":"","url":"https://api.github.com/users/kickstarter","html_url":"https://github.com/kickstarter","followers_url":"https://api.github.com/users/kickstarter/followers","following_url":"https://api.github.com/users/kickstarter/following{/other_user}","gists_url":"https://api.github.com/users/kickstarter/gists{/gist_id}","starred_url":"https://api.github.com/users/kickstarter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kickstarter/subscriptions","organizations_url":"https://api.github.com/users/kickstarter/orgs","repos_url":"https://api.github.com/users/kickstarter/repos","events_url":"https://api.github.com/users/kickstarter/events{/privacy}","received_events_url":"https://api.github.com/users/kickstarter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kickstarter/android-oss","description":"Kickstarter for Android. Bring new ideas to life, anywhere.","fork":false,"url":"https://api.github.com/repos/kickstarter/android-oss","forks_url":"https://api.github.com/repos/kickstarter/android-oss/forks","keys_url":"https://api.github.com/repos/kickstarter/android-oss/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kickstarter/android-oss/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kickstarter/android-oss/teams","hooks_url":"https://api.github.com/repos/kickstarter/android-oss/hooks","issue_events_url":"https://api.github.com/repos/kickstarter/android-oss/issues/events{/number}","events_url":"https://api.github.com/repos/kickstarter/android-oss/events","assignees_url":"https://api.github.com/repos/kickstarter/android-oss/assignees{/user}","branches_url":"https://api.github.com/repos/kickstarter/android-oss/branches{/branch}","tags_url":"https://api.github.com/repos/kickstarter/android-oss/tags","blobs_url":"https://api.github.com/repos/kickstarter/android-oss/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kickstarter/android-oss/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kickstarter/android-oss/git/refs{/sha}","trees_url":"https://api.github.com/repos/kickstarter/android-oss/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kickstarter/android-oss/statuses/{sha}","languages_url":"https://api.github.com/repos/kickstarter/android-oss/languages","stargazers_url":"https://api.github.com/repos/kickstarter/android-oss/stargazers","contributors_url":"https://api.github.com/repos/kickstarter/android-oss/contributors","subscribers_url":"https://api.github.com/repos/kickstarter/android-oss/subscribers","subscription_url":"https://api.github.com/repos/kickstarter/android-oss/subscription","commits_url":"https://api.github.com/repos/kickstarter/android-oss/commits{/sha}","git_commits_url":"https://api.github.com/repos/kickstarter/android-oss/git/commits{/sha}","comments_url":"https://api.github.com/repos/kickstarter/android-oss/comments{/number}","issue_comment_url":"https://api.github.com/repos/kickstarter/android-oss/issues/comments{/number}","contents_url":"https://api.github.com/repos/kickstarter/android-oss/contents/{+path}","compare_url":"https://api.github.com/repos/kickstarter/android-oss/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kickstarter/android-oss/merges","archive_url":"https://api.github.com/repos/kickstarter/android-oss/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kickstarter/android-oss/downloads","issues_url":"https://api.github.com/repos/kickstarter/android-oss/issues{/number}","pulls_url":"https://api.github.com/repos/kickstarter/android-oss/pulls{/number}","milestones_url":"https://api.github.com/repos/kickstarter/android-oss/milestones{/number}","notifications_url":"https://api.github.com/repos/kickstarter/android-oss/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kickstarter/android-oss/labels{/name}","releases_url":"https://api.github.com/repos/kickstarter/android-oss/releases{/id}","deployments_url":"https://api.github.com/repos/kickstarter/android-oss/deployments","created_at":"2016-12-12T17:15:41Z","updated_at":"2017-06-16T17:21:56Z","pushed_at":"2017-06-15T19:18:27Z","git_url":"git://github.com/kickstarter/android-oss.git","ssh_url":"git@github.com:kickstarter/android-oss.git","clone_url":"https://github.com/kickstarter/android-oss.git","svn_url":"https://github.com/kickstarter/android-oss","homepage":"https://www.kickstarter.com/mobile","size":16868,"stargazers_count":3814,"watchers_count":3814,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":583,"mirror_url":null,"open_issues_count":18,"forks":583,"open_issues":18,"watchers":3814,"default_branch":"master"}},"base":{"label":"kickstarter:master","ref":"master","sha":"36c4d3c5f9b8d39ff297bd2ce8b0a85d89bce417","user":{"login":"kickstarter","id":120676,"avatar_url":"https://avatars2.githubusercontent.com/u/120676?v=3","gravatar_id":"","url":"https://api.github.com/users/kickstarter","html_url":"https://github.com/kickstarter","followers_url":"https://api.github.com/users/kickstarter/followers","following_url":"https://api.github.com/users/kickstarter/following{/other_user}","gists_url":"https://api.github.com/users/kickstarter/gists{/gist_id}","starred_url":"https://api.github.com/users/kickstarter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kickstarter/subscriptions","organizations_url":"https://api.github.com/users/kickstarter/orgs","repos_url":"https://api.github.com/users/kickstarter/repos","events_url":"https://api.github.com/users/kickstarter/events{/privacy}","received_events_url":"https://api.github.com/users/kickstarter/received_events","type":"Organization","site_admin":false},"repo":{"id":76278501,"name":"android-oss","full_name":"kickstarter/android-oss","owner":{"login":"kickstarter","id":120676,"avatar_url":"https://avatars2.githubusercontent.com/u/120676?v=3","gravatar_id":"","url":"https://api.github.com/users/kickstarter","html_url":"https://github.com/kickstarter","followers_url":"https://api.github.com/users/kickstarter/followers","following_url":"https://api.github.com/users/kickstarter/following{/other_user}","gists_url":"https://api.github.com/users/kickstarter/gists{/gist_id}","starred_url":"https://api.github.com/users/kickstarter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kickstarter/subscriptions","organizations_url":"https://api.github.com/users/kickstarter/orgs","repos_url":"https://api.github.com/users/kickstarter/repos","events_url":"https://api.github.com/users/kickstarter/events{/privacy}","received_events_url":"https://api.github.com/users/kickstarter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kickstarter/android-oss","description":"Kickstarter for Android. Bring new ideas to life, anywhere.","fork":false,"url":"https://api.github.com/repos/kickstarter/android-oss","forks_url":"https://api.github.com/repos/kickstarter/android-oss/forks","keys_url":"https://api.github.com/repos/kickstarter/android-oss/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kickstarter/android-oss/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kickstarter/android-oss/teams","hooks_url":"https://api.github.com/repos/kickstarter/android-oss/hooks","issue_events_url":"https://api.github.com/repos/kickstarter/android-oss/issues/events{/number}","events_url":"https://api.github.com/repos/kickstarter/android-oss/events","assignees_url":"https://api.github.com/repos/kickstarter/android-oss/assignees{/user}","branches_url":"https://api.github.com/repos/kickstarter/android-oss/branches{/branch}","tags_url":"https://api.github.com/repos/kickstarter/android-oss/tags","blobs_url":"https://api.github.com/repos/kickstarter/android-oss/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kickstarter/android-oss/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kickstarter/android-oss/git/refs{/sha}","trees_url":"https://api.github.com/repos/kickstarter/android-oss/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kickstarter/android-oss/statuses/{sha}","languages_url":"https://api.github.com/repos/kickstarter/android-oss/languages","stargazers_url":"https://api.github.com/repos/kickstarter/android-oss/stargazers","contributors_url":"https://api.github.com/repos/kickstarter/android-oss/contributors","subscribers_url":"https://api.github.com/repos/kickstarter/android-oss/subscribers","subscription_url":"https://api.github.com/repos/kickstarter/android-oss/subscription","commits_url":"https://api.github.com/repos/kickstarter/android-oss/commits{/sha}","git_commits_url":"https://api.github.com/repos/kickstarter/android-oss/git/commits{/sha}","comments_url":"https://api.github.com/repos/kickstarter/android-oss/comments{/number}","issue_comment_url":"https://api.github.com/repos/kickstarter/android-oss/issues/comments{/number}","contents_url":"https://api.github.com/repos/kickstarter/android-oss/contents/{+path}","compare_url":"https://api.github.com/repos/kickstarter/android-oss/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kickstarter/android-oss/merges","archive_url":"https://api.github.com/repos/kickstarter/android-oss/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kickstarter/android-oss/downloads","issues_url":"https://api.github.com/repos/kickstarter/android-oss/issues{/number}","pulls_url":"https://api.github.com/repos/kickstarter/android-oss/pulls{/number}","milestones_url":"https://api.github.com/repos/kickstarter/android-oss/milestones{/number}","notifications_url":"https://api.github.com/repos/kickstarter/android-oss/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kickstarter/android-oss/labels{/name}","releases_url":"https://api.github.com/repos/kickstarter/android-oss/releases{/id}","deployments_url":"https://api.github.com/repos/kickstarter/android-oss/deployments","created_at":"2016-12-12T17:15:41Z","updated_at":"2017-06-16T17:21:56Z","pushed_at":"2017-06-15T19:18:27Z","git_url":"git://github.com/kickstarter/android-oss.git","ssh_url":"git@github.com:kickstarter/android-oss.git","clone_url":"https://github.com/kickstarter/android-oss.git","svn_url":"https://github.com/kickstarter/android-oss","homepage":"https://www.kickstarter.com/mobile","size":16868,"stargazers_count":3814,"watchers_count":3814,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":583,"mirror_url":null,"open_issues_count":18,"forks":583,"open_issues":18,"watchers":3814,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kickstarter/android-oss/pulls/115"},"html":{"href":"https://github.com/kickstarter/android-oss/pull/115"},"issue":{"href":"https://api.github.com/repos/kickstarter/android-oss/issues/115"},"comments":{"href":"https://api.github.com/repos/kickstarter/android-oss/issues/115/comments"},"review_comments":{"href":"https://api.github.com/repos/kickstarter/android-oss/pulls/115/comments"},"review_comment":{"href":"https://api.github.com/repos/kickstarter/android-oss/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kickstarter/android-oss/pulls/115/commits"},"statuses":{"href":"https://api.github.com/repos/kickstarter/android-oss/statuses/d5adda053d3699cd2e4372cd1f9b4d38c0c0b8bf"}}}}
{"actor":{"display_login":"luoser"}}