{"action":"created","comment":{"url":"https://api.github.com/repos/fossasia/open-event-android/pulls/comments/168928621","pull_request_review_id":97381004,"id":168928621,"diff_hunk":"@@ -0,0 +1,152 @@\n+package org.fossasia.openevent.core.discount;\n+\n+import android.arch.lifecycle.ViewModelProviders;\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.support.design.widget.Snackbar;\n+import android.support.v4.widget.SwipeRefreshLayout;\n+import android.support.v7.widget.DefaultItemAnimator;\n+import android.support.v7.widget.LinearLayoutManager;\n+import android.support.v7.widget.RecyclerView;\n+import android.view.LayoutInflater;\n+import android.view.View;\n+import android.view.ViewGroup;\n+import android.widget.TextView;\n+import android.widget.Toast;\n+\n+import org.fossasia.openevent.R;\n+import org.fossasia.openevent.common.network.NetworkUtils;\n+import org.fossasia.openevent.common.ui.base.BaseFragment;\n+import org.fossasia.openevent.common.utils.Utils;\n+import org.fossasia.openevent.core.auth.AuthUtil;\n+import org.fossasia.openevent.core.auth.LoginActivity;\n+import org.fossasia.openevent.data.DiscountCode;\n+\n+import java.lang.ref.WeakReference;\n+import java.util.ArrayList;\n+import java.util.List;\n+\n+import butterknife.BindView;\n+import timber.log.Timber;\n+\n+public class DiscountCodeFragment extends BaseFragment {\n+\n+    @BindView(R.id.discount_refresh_layout)\n+    protected SwipeRefreshLayout swipeRefreshLayout;\n+    @BindView(R.id.txt_no_discount_codes)\n+    protected TextView noDiscountCodeView;\n+    @BindView(R.id.discount_code_header)\n+    protected TextView discountCodeHeader;\n+    @BindView(R.id.list_discount_codes)\n+    protected RecyclerView discountCodesRecyclerView;\n+\n+    private List<DiscountCode> discountCodes = new ArrayList<>();\n+    private DiscountCodesListAdapter discountCodesListAdapter;\n+    private DiscountFragmentViewModel discountFragmentViewModel;\n+\n+    @Nullable\n+    @Override\n+    public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n+        setHasOptionsMenu(true);\n+        final View view = super.onCreateView(inflater, container, savedInstanceState);\n+        setUpRecyclerView();\n+        Utils.registerIfUrlValid(swipeRefreshLayout, this, this::refresh);\n+        discountFragmentViewModel = ViewModelProviders.of(this).get(DiscountFragmentViewModel.class);\n+        if(AuthUtil.isUserLoggedIn()) {\n+            if(NetworkUtils.haveNetworkConnection(getContext())) {","path":"android/app/src/main/java/org/fossasia/openevent/core/discount/DiscountCodeFragment.java","position":58,"original_position":58,"commit_id":"9d793d7d1f67c12fcd5b89963893702ad2da78dc","original_commit_id":"9d793d7d1f67c12fcd5b89963893702ad2da78dc","user":{"login":"iamareebjamal","id":3874064,"avatar_url":"https://avatars0.githubusercontent.com/u/3874064?v=4","gravatar_id":"","url":"https://api.github.com/users/iamareebjamal","html_url":"https://github.com/iamareebjamal","followers_url":"https://api.github.com/users/iamareebjamal/followers","following_url":"https://api.github.com/users/iamareebjamal/following{/other_user}","gists_url":"https://api.github.com/users/iamareebjamal/gists{/gist_id}","starred_url":"https://api.github.com/users/iamareebjamal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamareebjamal/subscriptions","organizations_url":"https://api.github.com/users/iamareebjamal/orgs","repos_url":"https://api.github.com/users/iamareebjamal/repos","events_url":"https://api.github.com/users/iamareebjamal/events{/privacy}","received_events_url":"https://api.github.com/users/iamareebjamal/received_events","type":"User","site_admin":false},"body":"here","created_at":"2018-02-17T18:09:02Z","updated_at":"2018-02-17T18:09:38Z","html_url":"https://github.com/fossasia/open-event-android/pull/2313#discussion_r168928621","pull_request_url":"https://api.github.com/repos/fossasia/open-event-android/pulls/2313","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/fossasia/open-event-android/pulls/comments/168928621"},"html":{"href":"https://github.com/fossasia/open-event-android/pull/2313#discussion_r168928621"},"pull_request":{"href":"https://api.github.com/repos/fossasia/open-event-android/pulls/2313"}}},"pull_request":{"url":"https://api.github.com/repos/fossasia/open-event-android/pulls/2313","id":166982050,"html_url":"https://github.com/fossasia/open-event-android/pull/2313","diff_url":"https://github.com/fossasia/open-event-android/pull/2313.diff","patch_url":"https://github.com/fossasia/open-event-android/pull/2313.patch","issue_url":"https://api.github.com/repos/fossasia/open-event-android/issues/2313","number":2313,"state":"open","locked":false,"title":"added feature \"discount-codes\"","user":{"login":"simarsingh24","id":16715499,"avatar_url":"https://avatars0.githubusercontent.com/u/16715499?v=4","gravatar_id":"","url":"https://api.github.com/users/simarsingh24","html_url":"https://github.com/simarsingh24","followers_url":"https://api.github.com/users/simarsingh24/followers","following_url":"https://api.github.com/users/simarsingh24/following{/other_user}","gists_url":"https://api.github.com/users/simarsingh24/gists{/gist_id}","starred_url":"https://api.github.com/users/simarsingh24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simarsingh24/subscriptions","organizations_url":"https://api.github.com/users/simarsingh24/orgs","repos_url":"https://api.github.com/users/simarsingh24/repos","events_url":"https://api.github.com/users/simarsingh24/events{/privacy}","received_events_url":"https://api.github.com/users/simarsingh24/received_events","type":"User","site_admin":false},"body":"Mentions #2296 \r\nScreenshots for the change: \r\n![screenshot_20180204-030739](https://user-images.githubusercontent.com/16715499/35771842-1b8cfcf0-0959-11e8-8237-fecfc23c1058.png)\r\n\r\n","created_at":"2018-02-03T21:41:52Z","updated_at":"2018-02-17T18:09:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3196eed17a3674374c129ed6a71cc78cec07dfe0","assignee":{"login":"simarsingh24","id":16715499,"avatar_url":"https://avatars0.githubusercontent.com/u/16715499?v=4","gravatar_id":"","url":"https://api.github.com/users/simarsingh24","html_url":"https://github.com/simarsingh24","followers_url":"https://api.github.com/users/simarsingh24/followers","following_url":"https://api.github.com/users/simarsingh24/following{/other_user}","gists_url":"https://api.github.com/users/simarsingh24/gists{/gist_id}","starred_url":"https://api.github.com/users/simarsingh24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simarsingh24/subscriptions","organizations_url":"https://api.github.com/users/simarsingh24/orgs","repos_url":"https://api.github.com/users/simarsingh24/repos","events_url":"https://api.github.com/users/simarsingh24/events{/privacy}","received_events_url":"https://api.github.com/users/simarsingh24/received_events","type":"User","site_admin":false},"assignees":[{"login":"simarsingh24","id":16715499,"avatar_url":"https://avatars0.githubusercontent.com/u/16715499?v=4","gravatar_id":"","url":"https://api.github.com/users/simarsingh24","html_url":"https://github.com/simarsingh24","followers_url":"https://api.github.com/users/simarsingh24/followers","following_url":"https://api.github.com/users/simarsingh24/following{/other_user}","gists_url":"https://api.github.com/users/simarsingh24/gists{/gist_id}","starred_url":"https://api.github.com/users/simarsingh24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simarsingh24/subscriptions","organizations_url":"https://api.github.com/users/simarsingh24/orgs","repos_url":"https://api.github.com/users/simarsingh24/repos","events_url":"https://api.github.com/users/simarsingh24/events{/privacy}","received_events_url":"https://api.github.com/users/simarsingh24/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":634390731,"url":"https://api.github.com/repos/fossasia/open-event-android/labels/needs-review","name":"needs-review","color":"fef2c0","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/fossasia/open-event-android/pulls/2313/commits","review_comments_url":"https://api.github.com/repos/fossasia/open-event-android/pulls/2313/comments","review_comment_url":"https://api.github.com/repos/fossasia/open-event-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fossasia/open-event-android/issues/2313/comments","statuses_url":"https://api.github.com/repos/fossasia/open-event-android/statuses/9d793d7d1f67c12fcd5b89963893702ad2da78dc","head":{"label":"simarsingh24:discount","ref":"discount","sha":"9d793d7d1f67c12fcd5b89963893702ad2da78dc","user":{"login":"simarsingh24","id":16715499,"avatar_url":"https://avatars0.githubusercontent.com/u/16715499?v=4","gravatar_id":"","url":"https://api.github.com/users/simarsingh24","html_url":"https://github.com/simarsingh24","followers_url":"https://api.github.com/users/simarsingh24/followers","following_url":"https://api.github.com/users/simarsingh24/following{/other_user}","gists_url":"https://api.github.com/users/simarsingh24/gists{/gist_id}","starred_url":"https://api.github.com/users/simarsingh24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simarsingh24/subscriptions","organizations_url":"https://api.github.com/users/simarsingh24/orgs","repos_url":"https://api.github.com/users/simarsingh24/repos","events_url":"https://api.github.com/users/simarsingh24/events{/privacy}","received_events_url":"https://api.github.com/users/simarsingh24/received_events","type":"User","site_admin":false},"repo":{"id":115927445,"name":"open-event-android","full_name":"simarsingh24/open-event-android","owner":{"login":"simarsingh24","id":16715499,"avatar_url":"https://avatars0.githubusercontent.com/u/16715499?v=4","gravatar_id":"","url":"https://api.github.com/users/simarsingh24","html_url":"https://github.com/simarsingh24","followers_url":"https://api.github.com/users/simarsingh24/followers","following_url":"https://api.github.com/users/simarsingh24/following{/other_user}","gists_url":"https://api.github.com/users/simarsingh24/gists{/gist_id}","starred_url":"https://api.github.com/users/simarsingh24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simarsingh24/subscriptions","organizations_url":"https://api.github.com/users/simarsingh24/orgs","repos_url":"https://api.github.com/users/simarsingh24/repos","events_url":"https://api.github.com/users/simarsingh24/events{/privacy}","received_events_url":"https://api.github.com/users/simarsingh24/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/simarsingh24/open-event-android","description":"Open Event Android App Generator https://github.com/fossasia/open-event-android/raw/apk/sample-apk-fossasia17-development.apk","fork":true,"url":"https://api.github.com/repos/simarsingh24/open-event-android","forks_url":"https://api.github.com/repos/simarsingh24/open-event-android/forks","keys_url":"https://api.github.com/repos/simarsingh24/open-event-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simarsingh24/open-event-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simarsingh24/open-event-android/teams","hooks_url":"https://api.github.com/repos/simarsingh24/open-event-android/hooks","issue_events_url":"https://api.github.com/repos/simarsingh24/open-event-android/issues/events{/number}","events_url":"https://api.github.com/repos/simarsingh24/open-event-android/events","assignees_url":"https://api.github.com/repos/simarsingh24/open-event-android/assignees{/user}","branches_url":"https://api.github.com/repos/simarsingh24/open-event-android/branches{/branch}","tags_url":"https://api.github.com/repos/simarsingh24/open-event-android/tags","blobs_url":"https://api.github.com/repos/simarsingh24/open-event-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simarsingh24/open-event-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simarsingh24/open-event-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/simarsingh24/open-event-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simarsingh24/open-event-android/statuses/{sha}","languages_url":"https://api.github.com/repos/simarsingh24/open-event-android/languages","stargazers_url":"https://api.github.com/repos/simarsingh24/open-event-android/stargazers","contributors_url":"https://api.github.com/repos/simarsingh24/open-event-android/contributors","subscribers_url":"https://api.github.com/repos/simarsingh24/open-event-android/subscribers","subscription_url":"https://api.github.com/repos/simarsingh24/open-event-android/subscription","commits_url":"https://api.github.com/repos/simarsingh24/open-event-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/simarsingh24/open-event-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/simarsingh24/open-event-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/simarsingh24/open-event-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/simarsingh24/open-event-android/contents/{+path}","compare_url":"https://api.github.com/repos/simarsingh24/open-event-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simarsingh24/open-event-android/merges","archive_url":"https://api.github.com/repos/simarsingh24/open-event-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simarsingh24/open-event-android/downloads","issues_url":"https://api.github.com/repos/simarsingh24/open-event-android/issues{/number}","pulls_url":"https://api.github.com/repos/simarsingh24/open-event-android/pulls{/number}","milestones_url":"https://api.github.com/repos/simarsingh24/open-event-android/milestones{/number}","notifications_url":"https://api.github.com/repos/simarsingh24/open-event-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simarsingh24/open-event-android/labels{/name}","releases_url":"https://api.github.com/repos/simarsingh24/open-event-android/releases{/id}","deployments_url":"https://api.github.com/repos/simarsingh24/open-event-android/deployments","created_at":"2018-01-01T15:22:22Z","updated_at":"2018-01-11T17:05:53Z","pushed_at":"2018-02-17T10:11:55Z","git_url":"git://github.com/simarsingh24/open-event-android.git","ssh_url":"git@github.com:simarsingh24/open-event-android.git","clone_url":"https://github.com/simarsingh24/open-event-android.git","svn_url":"https://github.com/simarsingh24/open-event-android","homepage":"http://droidgen.eventyay.com","size":72267,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":2,"default_branch":"development"}},"base":{"label":"fossasia:development","ref":"development","sha":"4c5db53a8d0f340e79ae47fd2a6de3e05e45485d","user":{"login":"fossasia","id":6295529,"avatar_url":"https://avatars3.githubusercontent.com/u/6295529?v=4","gravatar_id":"","url":"https://api.github.com/users/fossasia","html_url":"https://github.com/fossasia","followers_url":"https://api.github.com/users/fossasia/followers","following_url":"https://api.github.com/users/fossasia/following{/other_user}","gists_url":"https://api.github.com/users/fossasia/gists{/gist_id}","starred_url":"https://api.github.com/users/fossasia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fossasia/subscriptions","organizations_url":"https://api.github.com/users/fossasia/orgs","repos_url":"https://api.github.com/users/fossasia/repos","events_url":"https://api.github.com/users/fossasia/events{/privacy}","received_events_url":"https://api.github.com/users/fossasia/received_events","type":"Organization","site_admin":false},"repo":{"id":35269607,"name":"open-event-android","full_name":"fossasia/open-event-android","owner":{"login":"fossasia","id":6295529,"avatar_url":"https://avatars3.githubusercontent.com/u/6295529?v=4","gravatar_id":"","url":"https://api.github.com/users/fossasia","html_url":"https://github.com/fossasia","followers_url":"https://api.github.com/users/fossasia/followers","following_url":"https://api.github.com/users/fossasia/following{/other_user}","gists_url":"https://api.github.com/users/fossasia/gists{/gist_id}","starred_url":"https://api.github.com/users/fossasia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fossasia/subscriptions","organizations_url":"https://api.github.com/users/fossasia/orgs","repos_url":"https://api.github.com/users/fossasia/repos","events_url":"https://api.github.com/users/fossasia/events{/privacy}","received_events_url":"https://api.github.com/users/fossasia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fossasia/open-event-android","description":"Open Event Android App Generator https://github.com/fossasia/open-event-android/raw/apk/sample-apk-fossasia17-development.apk","fork":false,"url":"https://api.github.com/repos/fossasia/open-event-android","forks_url":"https://api.github.com/repos/fossasia/open-event-android/forks","keys_url":"https://api.github.com/repos/fossasia/open-event-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fossasia/open-event-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fossasia/open-event-android/teams","hooks_url":"https://api.github.com/repos/fossasia/open-event-android/hooks","issue_events_url":"https://api.github.com/repos/fossasia/open-event-android/issues/events{/number}","events_url":"https://api.github.com/repos/fossasia/open-event-android/events","assignees_url":"https://api.github.com/repos/fossasia/open-event-android/assignees{/user}","branches_url":"https://api.github.com/repos/fossasia/open-event-android/branches{/branch}","tags_url":"https://api.github.com/repos/fossasia/open-event-android/tags","blobs_url":"https://api.github.com/repos/fossasia/open-event-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fossasia/open-event-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fossasia/open-event-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/fossasia/open-event-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fossasia/open-event-android/statuses/{sha}","languages_url":"https://api.github.com/repos/fossasia/open-event-android/languages","stargazers_url":"https://api.github.com/repos/fossasia/open-event-android/stargazers","contributors_url":"https://api.github.com/repos/fossasia/open-event-android/contributors","subscribers_url":"https://api.github.com/repos/fossasia/open-event-android/subscribers","subscription_url":"https://api.github.com/repos/fossasia/open-event-android/subscription","commits_url":"https://api.github.com/repos/fossasia/open-event-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/fossasia/open-event-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/fossasia/open-event-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/fossasia/open-event-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/fossasia/open-event-android/contents/{+path}","compare_url":"https://api.github.com/repos/fossasia/open-event-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fossasia/open-event-android/merges","archive_url":"https://api.github.com/repos/fossasia/open-event-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fossasia/open-event-android/downloads","issues_url":"https://api.github.com/repos/fossasia/open-event-android/issues{/number}","pulls_url":"https://api.github.com/repos/fossasia/open-event-android/pulls{/number}","milestones_url":"https://api.github.com/repos/fossasia/open-event-android/milestones{/number}","notifications_url":"https://api.github.com/repos/fossasia/open-event-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fossasia/open-event-android/labels{/name}","releases_url":"https://api.github.com/repos/fossasia/open-event-android/releases{/id}","deployments_url":"https://api.github.com/repos/fossasia/open-event-android/deployments","created_at":"2015-05-08T09:04:11Z","updated_at":"2018-02-17T14:27:09Z","pushed_at":"2018-02-17T17:06:34Z","git_url":"git://github.com/fossasia/open-event-android.git","ssh_url":"git@github.com:fossasia/open-event-android.git","clone_url":"https://github.com/fossasia/open-event-android.git","svn_url":"https://github.com/fossasia/open-event-android","homepage":"http://droidgen.eventyay.com","size":81241,"stargazers_count":770,"watchers_count":770,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":789,"mirror_url":null,"archived":false,"open_issues_count":83,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":789,"open_issues":83,"watchers":770,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/fossasia/open-event-android/pulls/2313"},"html":{"href":"https://github.com/fossasia/open-event-android/pull/2313"},"issue":{"href":"https://api.github.com/repos/fossasia/open-event-android/issues/2313"},"comments":{"href":"https://api.github.com/repos/fossasia/open-event-android/issues/2313/comments"},"review_comments":{"href":"https://api.github.com/repos/fossasia/open-event-android/pulls/2313/comments"},"review_comment":{"href":"https://api.github.com/repos/fossasia/open-event-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fossasia/open-event-android/pulls/2313/commits"},"statuses":{"href":"https://api.github.com/repos/fossasia/open-event-android/statuses/9d793d7d1f67c12fcd5b89963893702ad2da78dc"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"iamareebjamal"}}