{"action":"created","comment":{"url":"https://api.github.com/repos/fossasia/open-event-android/pulls/comments/244679888","pull_request_review_id":188607272,"id":244679888,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NDY3OTg4OA==","diff_hunk":"@@ -88,10 +91,12 @@ class MainActivity : AppCompatActivity() {\n     override fun onBackPressed() {\n         val currentFragment = this.supportFragmentManager.findFragmentById(R.id.frameContainer)\n         val rootFragment = this.supportFragmentManager.findFragmentById(R.id.rootLayout)\n-        if (rootFragment is EventDetailsFragment)\n-            super.onBackPressed()\n-        else\n-            when (currentFragment) {\n+        when (rootFragment) {\n+            is EventDetailsFragment -> super.onBackPressed()\n+            is TicketsFragment -> super.onBackPressed()\n+            is AttendeeFragment -> super.onBackPressed()\n+            is OrderDetailsFragment -> super.onBackPressed()","path":"app/src/main/java/org/fossasia/openevent/general/MainActivity.kt","position":30,"original_position":30,"commit_id":"a7964950ad07fb4812da56b7bb7a816735dfb535","original_commit_id":"a7964950ad07fb4812da56b7bb7a816735dfb535","user":{"login":"liveHarshit","id":27783786,"node_id":"MDQ6VXNlcjI3NzgzNzg2","avatar_url":"https://avatars1.githubusercontent.com/u/27783786?v=4","gravatar_id":"","url":"https://api.github.com/users/liveHarshit","html_url":"https://github.com/liveHarshit","followers_url":"https://api.github.com/users/liveHarshit/followers","following_url":"https://api.github.com/users/liveHarshit/following{/other_user}","gists_url":"https://api.github.com/users/liveHarshit/gists{/gist_id}","starred_url":"https://api.github.com/users/liveHarshit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liveHarshit/subscriptions","organizations_url":"https://api.github.com/users/liveHarshit/orgs","repos_url":"https://api.github.com/users/liveHarshit/repos","events_url":"https://api.github.com/users/liveHarshit/events{/privacy}","received_events_url":"https://api.github.com/users/liveHarshit/received_events","type":"User","site_admin":false},"body":"you can call `super.onBackPressed()` once like - \r\n```java\r\n else -> when (currentFragment) {\r\n                 is SearchFragment,\r\n                 is FavoriteFragment,\r\n                 is OrdersUnderUserFragment,\r\n                 is EventsFragment -> finish()\r\n```","created_at":"2019-01-02T08:33:20Z","updated_at":"2019-01-02T08:33:32Z","html_url":"https://github.com/fossasia/open-event-android/pull/804#discussion_r244679888","pull_request_url":"https://api.github.com/repos/fossasia/open-event-android/pulls/804","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/fossasia/open-event-android/pulls/comments/244679888"},"html":{"href":"https://github.com/fossasia/open-event-android/pull/804#discussion_r244679888"},"pull_request":{"href":"https://api.github.com/repos/fossasia/open-event-android/pulls/804"}}},"pull_request":{"url":"https://api.github.com/repos/fossasia/open-event-android/pulls/804","id":241680764,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxNjgwNzY0","html_url":"https://github.com/fossasia/open-event-android/pull/804","diff_url":"https://github.com/fossasia/open-event-android/pull/804.diff","patch_url":"https://github.com/fossasia/open-event-android/pull/804.patch","issue_url":"https://api.github.com/repos/fossasia/open-event-android/issues/804","number":804,"state":"open","locked":false,"title":"fix: back funtionality of the app","user":{"login":"pranavpandey1998official","id":44601530,"node_id":"MDQ6VXNlcjQ0NjAxNTMw","avatar_url":"https://avatars1.githubusercontent.com/u/44601530?v=4","gravatar_id":"","url":"https://api.github.com/users/pranavpandey1998official","html_url":"https://github.com/pranavpandey1998official","followers_url":"https://api.github.com/users/pranavpandey1998official/followers","following_url":"https://api.github.com/users/pranavpandey1998official/following{/other_user}","gists_url":"https://api.github.com/users/pranavpandey1998official/gists{/gist_id}","starred_url":"https://api.github.com/users/pranavpandey1998official/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranavpandey1998official/subscriptions","organizations_url":"https://api.github.com/users/pranavpandey1998official/orgs","repos_url":"https://api.github.com/users/pranavpandey1998official/repos","events_url":"https://api.github.com/users/pranavpandey1998official/events{/privacy}","received_events_url":"https://api.github.com/users/pranavpandey1998official/received_events","type":"User","site_admin":false},"body":"Fixes #726 \r\n\r\nthe issue was in onBackPresses in main activity if the rootFragment is other than EventFragment it will assume that it is Main page which will be wrong in all other cases like TicketFragment, AttendeeFragment, OrderDetailsFragment, it was calling EventFragment finish method which was closing our app , so add conditions for these Fragments too.\r\n\r\n\r\n","created_at":"2019-01-02T06:45:26Z","updated_at":"2019-01-02T08:33:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"281cf8649804d2321272c00fc18585af780e1df2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fossasia/open-event-android/pulls/804/commits","review_comments_url":"https://api.github.com/repos/fossasia/open-event-android/pulls/804/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/804/comments","statuses_url":"https://api.github.com/repos/fossasia/open-event-android/statuses/a7964950ad07fb4812da56b7bb7a816735dfb535","head":{"label":"pranavpandey1998official:development","ref":"development","sha":"a7964950ad07fb4812da56b7bb7a816735dfb535","user":{"login":"pranavpandey1998official","id":44601530,"node_id":"MDQ6VXNlcjQ0NjAxNTMw","avatar_url":"https://avatars1.githubusercontent.com/u/44601530?v=4","gravatar_id":"","url":"https://api.github.com/users/pranavpandey1998official","html_url":"https://github.com/pranavpandey1998official","followers_url":"https://api.github.com/users/pranavpandey1998official/followers","following_url":"https://api.github.com/users/pranavpandey1998official/following{/other_user}","gists_url":"https://api.github.com/users/pranavpandey1998official/gists{/gist_id}","starred_url":"https://api.github.com/users/pranavpandey1998official/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranavpandey1998official/subscriptions","organizations_url":"https://api.github.com/users/pranavpandey1998official/orgs","repos_url":"https://api.github.com/users/pranavpandey1998official/repos","events_url":"https://api.github.com/users/pranavpandey1998official/events{/privacy}","received_events_url":"https://api.github.com/users/pranavpandey1998official/received_events","type":"User","site_admin":false},"repo":{"id":163800953,"node_id":"MDEwOlJlcG9zaXRvcnkxNjM4MDA5NTM=","name":"open-event-android","full_name":"pranavpandey1998official/open-event-android","private":false,"owner":{"login":"pranavpandey1998official","id":44601530,"node_id":"MDQ6VXNlcjQ0NjAxNTMw","avatar_url":"https://avatars1.githubusercontent.com/u/44601530?v=4","gravatar_id":"","url":"https://api.github.com/users/pranavpandey1998official","html_url":"https://github.com/pranavpandey1998official","followers_url":"https://api.github.com/users/pranavpandey1998official/followers","following_url":"https://api.github.com/users/pranavpandey1998official/following{/other_user}","gists_url":"https://api.github.com/users/pranavpandey1998official/gists{/gist_id}","starred_url":"https://api.github.com/users/pranavpandey1998official/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranavpandey1998official/subscriptions","organizations_url":"https://api.github.com/users/pranavpandey1998official/orgs","repos_url":"https://api.github.com/users/pranavpandey1998official/repos","events_url":"https://api.github.com/users/pranavpandey1998official/events{/privacy}","received_events_url":"https://api.github.com/users/pranavpandey1998official/received_events","type":"User","site_admin":false},"html_url":"https://github.com/pranavpandey1998official/open-event-android","description":"Open Event Android General App https://github.com/fossasia/open-event-android/blob/apk/open-event-dev-app-playStore-debug.apk","fork":true,"url":"https://api.github.com/repos/pranavpandey1998official/open-event-android","forks_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/forks","keys_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/teams","hooks_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/hooks","issue_events_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/issues/events{/number}","events_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/events","assignees_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/assignees{/user}","branches_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/branches{/branch}","tags_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/tags","blobs_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/statuses/{sha}","languages_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/languages","stargazers_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/stargazers","contributors_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/contributors","subscribers_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/subscribers","subscription_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/subscription","commits_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/contents/{+path}","compare_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/merges","archive_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/downloads","issues_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/issues{/number}","pulls_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/pulls{/number}","milestones_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/milestones{/number}","notifications_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/labels{/name}","releases_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/releases{/id}","deployments_url":"https://api.github.com/repos/pranavpandey1998official/open-event-android/deployments","created_at":"2019-01-02T06:06:14Z","updated_at":"2019-01-02T06:43:17Z","pushed_at":"2019-01-02T06:43:16Z","git_url":"git://github.com/pranavpandey1998official/open-event-android.git","ssh_url":"git@github.com:pranavpandey1998official/open-event-android.git","clone_url":"https://github.com/pranavpandey1998official/open-event-android.git","svn_url":"https://github.com/pranavpandey1998official/open-event-android","homepage":"","size":37292,"stargazers_count":0,"watchers_count":0,"language":"Kotlin","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":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"development"}},"base":{"label":"fossasia:development","ref":"development","sha":"71bfafdd2abfe1260485ee0b3602f6a6b552715f","user":{"login":"fossasia","id":6295529,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyOTU1Mjk=","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":34847604,"node_id":"MDEwOlJlcG9zaXRvcnkzNDg0NzYwNA==","name":"open-event-android","full_name":"fossasia/open-event-android","private":false,"owner":{"login":"fossasia","id":6295529,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyOTU1Mjk=","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},"html_url":"https://github.com/fossasia/open-event-android","description":"Open Event Android General App https://github.com/fossasia/open-event-android/blob/apk/open-event-dev-app-playStore-debug.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-04-30T09:59:35Z","updated_at":"2019-01-01T06:34:51Z","pushed_at":"2019-01-02T07:07:18Z","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":"","size":37291,"stargazers_count":880,"watchers_count":880,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":155,"mirror_url":null,"archived":false,"open_issues_count":60,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":155,"open_issues":60,"watchers":880,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/fossasia/open-event-android/pulls/804"},"html":{"href":"https://github.com/fossasia/open-event-android/pull/804"},"issue":{"href":"https://api.github.com/repos/fossasia/open-event-android/issues/804"},"comments":{"href":"https://api.github.com/repos/fossasia/open-event-android/issues/804/comments"},"review_comments":{"href":"https://api.github.com/repos/fossasia/open-event-android/pulls/804/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/804/commits"},"statuses":{"href":"https://api.github.com/repos/fossasia/open-event-android/statuses/a7964950ad07fb4812da56b7bb7a816735dfb535"}},"author_association":"NONE"}}
{"actor":{"display_login":"liveHarshit"}}