{"action":"created","comment":{"url":"https://api.github.com/repos/TCA-Team/TumCampusApp/pulls/comments/221454847","pull_request_review_id":160109962,"id":221454847,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTQ1NDg0Nw==","diff_hunk":"@@ -94,6 +103,41 @@ abstract class ProgressActivity(\n         }\n     }\n \n+    protected fun showErrorSnackbar(t: Throwable) {\n+        val messageResId = when (t) {\n+            is UnknownHostException -> R.string.no_internet_connection\n+            is InactiveTokenException -> R.string.error_access_token_inactive\n+            is InvalidTokenException -> R.string.error_invalid_access_token\n+            is MissingPermissionException -> R.string.error_no_rights_to_access_function\n+            is TokenLimitReachedException -> R.string.error_access_token_limit_reached\n+            is RequestLimitReachedException -> R.string.error_request_limit_reached\n+            else -> R.string.error_unknown\n+        }\n+\n+        showErrorSnackbar(messageResId)\n+    }\n+\n+    protected fun showErrorSnackbar(messageResId: Int) {\n+        runOnUiThread {\n+            Snackbar.make(contentView, messageResId, Snackbar.LENGTH_LONG)\n+                    .setAction(R.string.retry) { retryRequest() }\n+                    .setActionTextColor(Color.WHITE)\n+                    .show()\n+        }\n+    }\n+\n+    protected fun showErrorLayout(throwable: Throwable) {","path":"app/src/main/java/de/tum/in/tumcampusapp/component/other/generic/activity/ProgressActivity.kt","position":64,"original_position":64,"commit_id":"6535f587b0fbdc47bcf8c4eb4d1de4e45230d0b3","original_commit_id":"6535f587b0fbdc47bcf8c4eb4d1de4e45230d0b3","user":{"login":"pfent","id":5686284,"node_id":"MDQ6VXNlcjU2ODYyODQ=","avatar_url":"https://avatars1.githubusercontent.com/u/5686284?v=4","gravatar_id":"","url":"https://api.github.com/users/pfent","html_url":"https://github.com/pfent","followers_url":"https://api.github.com/users/pfent/followers","following_url":"https://api.github.com/users/pfent/following{/other_user}","gists_url":"https://api.github.com/users/pfent/gists{/gist_id}","starred_url":"https://api.github.com/users/pfent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfent/subscriptions","organizations_url":"https://api.github.com/users/pfent/orgs","repos_url":"https://api.github.com/users/pfent/repos","events_url":"https://api.github.com/users/pfent/events{/privacy}","received_events_url":"https://api.github.com/users/pfent/received_events","type":"User","site_admin":false},"body":"Nevermind, just read your last commit message :tada: ","created_at":"2018-09-30T10:25:20Z","updated_at":"2018-09-30T10:27:16Z","html_url":"https://github.com/TCA-Team/TumCampusApp/pull/1104#discussion_r221454847","pull_request_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/pulls/1104","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/TCA-Team/TumCampusApp/pulls/comments/221454847"},"html":{"href":"https://github.com/TCA-Team/TumCampusApp/pull/1104#discussion_r221454847"},"pull_request":{"href":"https://api.github.com/repos/TCA-Team/TumCampusApp/pulls/1104"}},"in_reply_to_id":221454808},"pull_request":{"url":"https://api.github.com/repos/TCA-Team/TumCampusApp/pulls/1104","id":219135473,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5MTM1NDcz","html_url":"https://github.com/TCA-Team/TumCampusApp/pull/1104","diff_url":"https://github.com/TCA-Team/TumCampusApp/pull/1104.diff","patch_url":"https://github.com/TCA-Team/TumCampusApp/pull/1104.patch","issue_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/issues/1104","number":1104,"state":"open","locked":false,"title":"Improve offline experience","user":{"login":"thellmund","id":11819826,"node_id":"MDQ6VXNlcjExODE5ODI2","avatar_url":"https://avatars3.githubusercontent.com/u/11819826?v=4","gravatar_id":"","url":"https://api.github.com/users/thellmund","html_url":"https://github.com/thellmund","followers_url":"https://api.github.com/users/thellmund/followers","following_url":"https://api.github.com/users/thellmund/following{/other_user}","gists_url":"https://api.github.com/users/thellmund/gists{/gist_id}","starred_url":"https://api.github.com/users/thellmund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thellmund/subscriptions","organizations_url":"https://api.github.com/users/thellmund/orgs","repos_url":"https://api.github.com/users/thellmund/repos","events_url":"https://api.github.com/users/thellmund/events{/privacy}","received_events_url":"https://api.github.com/users/thellmund/received_events","type":"User","site_admin":false},"body":"This pull request improves the offline experience of the app. \r\n1. Fixes a bug that prevented `MainActivity` from displaying cached content when offline. \r\n2. Removes `ConnectivityInterceptor` and `NoNetworkConnectionException`, as they prevented a proper use of the Retrofit cache.\r\n3. If cached content is already being displayed, a failed refresh (e.g. due to being offline) now displays a `Snackbar` instead of a full-screen error view. This way, we don’t hide the cached content. ","created_at":"2018-09-29T08:47:30Z","updated_at":"2018-09-30T10:27:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d281994e7bf5f99d4cd913d1d428d2041d13bbae","assignee":null,"assignees":[],"requested_reviewers":[{"login":"kordianbruck","id":298860,"node_id":"MDQ6VXNlcjI5ODg2MA==","avatar_url":"https://avatars2.githubusercontent.com/u/298860?v=4","gravatar_id":"","url":"https://api.github.com/users/kordianbruck","html_url":"https://github.com/kordianbruck","followers_url":"https://api.github.com/users/kordianbruck/followers","following_url":"https://api.github.com/users/kordianbruck/following{/other_user}","gists_url":"https://api.github.com/users/kordianbruck/gists{/gist_id}","starred_url":"https://api.github.com/users/kordianbruck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kordianbruck/subscriptions","organizations_url":"https://api.github.com/users/kordianbruck/orgs","repos_url":"https://api.github.com/users/kordianbruck/repos","events_url":"https://api.github.com/users/kordianbruck/events{/privacy}","received_events_url":"https://api.github.com/users/kordianbruck/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":39249670,"node_id":"MDU6TGFiZWwzOTI0OTY3MA==","url":"https://api.github.com/repos/TCA-Team/TumCampusApp/labels/Bug%20:bug:","name":"Bug :bug:","color":"b60205","default":false},{"id":965603979,"node_id":"MDU6TGFiZWw5NjU2MDM5Nzk=","url":"https://api.github.com/repos/TCA-Team/TumCampusApp/labels/Improvement","name":"Improvement","color":"93f2ab","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/pulls/1104/commits","review_comments_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/pulls/1104/comments","review_comment_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/issues/1104/comments","statuses_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/statuses/6535f587b0fbdc47bcf8c4eb4d1de4e45230d0b3","head":{"label":"TCA-Team:th/loading-behavior","ref":"th/loading-behavior","sha":"6535f587b0fbdc47bcf8c4eb4d1de4e45230d0b3","user":{"login":"TCA-Team","id":4400381,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MDAzODE=","avatar_url":"https://avatars3.githubusercontent.com/u/4400381?v=4","gravatar_id":"","url":"https://api.github.com/users/TCA-Team","html_url":"https://github.com/TCA-Team","followers_url":"https://api.github.com/users/TCA-Team/followers","following_url":"https://api.github.com/users/TCA-Team/following{/other_user}","gists_url":"https://api.github.com/users/TCA-Team/gists{/gist_id}","starred_url":"https://api.github.com/users/TCA-Team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TCA-Team/subscriptions","organizations_url":"https://api.github.com/users/TCA-Team/orgs","repos_url":"https://api.github.com/users/TCA-Team/repos","events_url":"https://api.github.com/users/TCA-Team/events{/privacy}","received_events_url":"https://api.github.com/users/TCA-Team/received_events","type":"Organization","site_admin":false},"repo":{"id":9992050,"node_id":"MDEwOlJlcG9zaXRvcnk5OTkyMDUw","name":"TumCampusApp","full_name":"TCA-Team/TumCampusApp","private":false,"owner":{"login":"TCA-Team","id":4400381,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MDAzODE=","avatar_url":"https://avatars3.githubusercontent.com/u/4400381?v=4","gravatar_id":"","url":"https://api.github.com/users/TCA-Team","html_url":"https://github.com/TCA-Team","followers_url":"https://api.github.com/users/TCA-Team/followers","following_url":"https://api.github.com/users/TCA-Team/following{/other_user}","gists_url":"https://api.github.com/users/TCA-Team/gists{/gist_id}","starred_url":"https://api.github.com/users/TCA-Team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TCA-Team/subscriptions","organizations_url":"https://api.github.com/users/TCA-Team/orgs","repos_url":"https://api.github.com/users/TCA-Team/repos","events_url":"https://api.github.com/users/TCA-Team/events{/privacy}","received_events_url":"https://api.github.com/users/TCA-Team/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/TCA-Team/TumCampusApp","description":"Development of the TUM Campus App for Android devices - for and from students at Technical University of Munich.","fork":false,"url":"https://api.github.com/repos/TCA-Team/TumCampusApp","forks_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/forks","keys_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/teams","hooks_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/hooks","issue_events_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/issues/events{/number}","events_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/events","assignees_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/assignees{/user}","branches_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/branches{/branch}","tags_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/tags","blobs_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/git/refs{/sha}","trees_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/statuses/{sha}","languages_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/languages","stargazers_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/stargazers","contributors_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/contributors","subscribers_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/subscribers","subscription_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/subscription","commits_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/commits{/sha}","git_commits_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/git/commits{/sha}","comments_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/comments{/number}","issue_comment_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/issues/comments{/number}","contents_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/contents/{+path}","compare_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/merges","archive_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/downloads","issues_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/issues{/number}","pulls_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/pulls{/number}","milestones_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/milestones{/number}","notifications_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/labels{/name}","releases_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/releases{/id}","deployments_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/deployments","created_at":"2013-05-10T23:10:12Z","updated_at":"2018-09-29T22:19:46Z","pushed_at":"2018-09-30T06:43:42Z","git_url":"git://github.com/TCA-Team/TumCampusApp.git","ssh_url":"git@github.com:TCA-Team/TumCampusApp.git","clone_url":"https://github.com/TCA-Team/TumCampusApp.git","svn_url":"https://github.com/TCA-Team/TumCampusApp","homepage":"https://app.tum.de","size":130503,"stargazers_count":116,"watchers_count":116,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"archived":false,"open_issues_count":36,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":57,"open_issues":36,"watchers":116,"default_branch":"master"}},"base":{"label":"TCA-Team:master","ref":"master","sha":"b27d4fe956e00b07f5895da2ecf2a267122b495b","user":{"login":"TCA-Team","id":4400381,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MDAzODE=","avatar_url":"https://avatars3.githubusercontent.com/u/4400381?v=4","gravatar_id":"","url":"https://api.github.com/users/TCA-Team","html_url":"https://github.com/TCA-Team","followers_url":"https://api.github.com/users/TCA-Team/followers","following_url":"https://api.github.com/users/TCA-Team/following{/other_user}","gists_url":"https://api.github.com/users/TCA-Team/gists{/gist_id}","starred_url":"https://api.github.com/users/TCA-Team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TCA-Team/subscriptions","organizations_url":"https://api.github.com/users/TCA-Team/orgs","repos_url":"https://api.github.com/users/TCA-Team/repos","events_url":"https://api.github.com/users/TCA-Team/events{/privacy}","received_events_url":"https://api.github.com/users/TCA-Team/received_events","type":"Organization","site_admin":false},"repo":{"id":9992050,"node_id":"MDEwOlJlcG9zaXRvcnk5OTkyMDUw","name":"TumCampusApp","full_name":"TCA-Team/TumCampusApp","private":false,"owner":{"login":"TCA-Team","id":4400381,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MDAzODE=","avatar_url":"https://avatars3.githubusercontent.com/u/4400381?v=4","gravatar_id":"","url":"https://api.github.com/users/TCA-Team","html_url":"https://github.com/TCA-Team","followers_url":"https://api.github.com/users/TCA-Team/followers","following_url":"https://api.github.com/users/TCA-Team/following{/other_user}","gists_url":"https://api.github.com/users/TCA-Team/gists{/gist_id}","starred_url":"https://api.github.com/users/TCA-Team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TCA-Team/subscriptions","organizations_url":"https://api.github.com/users/TCA-Team/orgs","repos_url":"https://api.github.com/users/TCA-Team/repos","events_url":"https://api.github.com/users/TCA-Team/events{/privacy}","received_events_url":"https://api.github.com/users/TCA-Team/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/TCA-Team/TumCampusApp","description":"Development of the TUM Campus App for Android devices - for and from students at Technical University of Munich.","fork":false,"url":"https://api.github.com/repos/TCA-Team/TumCampusApp","forks_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/forks","keys_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/teams","hooks_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/hooks","issue_events_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/issues/events{/number}","events_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/events","assignees_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/assignees{/user}","branches_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/branches{/branch}","tags_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/tags","blobs_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/git/refs{/sha}","trees_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/statuses/{sha}","languages_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/languages","stargazers_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/stargazers","contributors_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/contributors","subscribers_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/subscribers","subscription_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/subscription","commits_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/commits{/sha}","git_commits_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/git/commits{/sha}","comments_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/comments{/number}","issue_comment_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/issues/comments{/number}","contents_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/contents/{+path}","compare_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/merges","archive_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/downloads","issues_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/issues{/number}","pulls_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/pulls{/number}","milestones_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/milestones{/number}","notifications_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/labels{/name}","releases_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/releases{/id}","deployments_url":"https://api.github.com/repos/TCA-Team/TumCampusApp/deployments","created_at":"2013-05-10T23:10:12Z","updated_at":"2018-09-29T22:19:46Z","pushed_at":"2018-09-30T06:43:42Z","git_url":"git://github.com/TCA-Team/TumCampusApp.git","ssh_url":"git@github.com:TCA-Team/TumCampusApp.git","clone_url":"https://github.com/TCA-Team/TumCampusApp.git","svn_url":"https://github.com/TCA-Team/TumCampusApp","homepage":"https://app.tum.de","size":130503,"stargazers_count":116,"watchers_count":116,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"archived":false,"open_issues_count":36,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":57,"open_issues":36,"watchers":116,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TCA-Team/TumCampusApp/pulls/1104"},"html":{"href":"https://github.com/TCA-Team/TumCampusApp/pull/1104"},"issue":{"href":"https://api.github.com/repos/TCA-Team/TumCampusApp/issues/1104"},"comments":{"href":"https://api.github.com/repos/TCA-Team/TumCampusApp/issues/1104/comments"},"review_comments":{"href":"https://api.github.com/repos/TCA-Team/TumCampusApp/pulls/1104/comments"},"review_comment":{"href":"https://api.github.com/repos/TCA-Team/TumCampusApp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TCA-Team/TumCampusApp/pulls/1104/commits"},"statuses":{"href":"https://api.github.com/repos/TCA-Team/TumCampusApp/statuses/6535f587b0fbdc47bcf8c4eb4d1de4e45230d0b3"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pfent"}}