{"action":"created","comment":{"url":"https://api.github.com/repos/buttercup/buttercup-mobile/pulls/comments/209635190","pull_request_review_id":145685684,"id":209635190,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTYzNTE5MA==","diff_hunk":"@@ -20,16 +32,83 @@ function openArchive(dispatch, getState, sourceID) {\n     const targetSource = archivesList.find(source => source.id === sourceID);\n     // Select source\n     dispatch(setSelectedSource(sourceID));\n+    const isReadOnly = getSourceReadonlyStatus(sourceID);\n+    dispatch(markCurrentSourceReadOnly(isReadOnly));\n     // populate groups\n     updateCurrentArchive();\n     // navigate to archive contents\n     dispatch(navigateToGroups({ groupID: \"0\", title: `🗂 ${targetSource.name}` }));\n }\n \n+function performOfflineProcedure(dispatch, getState, sourceID, password, isOffline = false) {\n+    return checkSourceHasOfflineCopy(sourceID).then(hasOffline => {\n+        if (!hasOffline) {\n+            return false;\n+        }\n+        Alert.alert(\n+            isOffline ? \"Offline Content (currently offline)\" : \"Offline Content\",\n+            \"Would you like to try and load this archive in offline (read-only) mode?\",\n+            [\n+                {\n+                    text: \"Cancel\",\n+                    style: \"cancel\",\n+                    onPress: () => {\n+                        dispatch(setBusyState(null));\n+                    }\n+                },\n+                {\n+                    text: \"Use Offline\",\n+                    style: \"default\",\n+                    onPress: () => {\n+                        performSourceUnlock(dispatch, getState, sourceID, password, true)","path":"source/containers/ArchivesList.js","position":66,"original_position":66,"commit_id":"2c414351a13645c815fb4f66d8084390a4527340","original_commit_id":"2c414351a13645c815fb4f66d8084390a4527340","user":{"login":"perry-mitchell","id":3869469,"node_id":"MDQ6VXNlcjM4Njk0Njk=","avatar_url":"https://avatars0.githubusercontent.com/u/3869469?v=4","gravatar_id":"","url":"https://api.github.com/users/perry-mitchell","html_url":"https://github.com/perry-mitchell","followers_url":"https://api.github.com/users/perry-mitchell/followers","following_url":"https://api.github.com/users/perry-mitchell/following{/other_user}","gists_url":"https://api.github.com/users/perry-mitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/perry-mitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perry-mitchell/subscriptions","organizations_url":"https://api.github.com/users/perry-mitchell/orgs","repos_url":"https://api.github.com/users/perry-mitchell/repos","events_url":"https://api.github.com/users/perry-mitchell/events{/privacy}","received_events_url":"https://api.github.com/users/perry-mitchell/received_events","type":"User","site_admin":false},"body":"Ok, but does redux thunk understand promises? Not sure how that'd work in your first example. \r\n\r\n`const performSourceUnlock = (sourceID, password, ...) => (dispatch, getState) => {...}`\r\n\r\nThis is still quite verbose don't you think? Having the dispatch and getState in the signature is actually shorter..","created_at":"2018-08-13T14:41:33Z","updated_at":"2018-08-13T14:41:34Z","html_url":"https://github.com/buttercup/buttercup-mobile/pull/115#discussion_r209635190","pull_request_url":"https://api.github.com/repos/buttercup/buttercup-mobile/pulls/115","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/buttercup/buttercup-mobile/pulls/comments/209635190"},"html":{"href":"https://github.com/buttercup/buttercup-mobile/pull/115#discussion_r209635190"},"pull_request":{"href":"https://api.github.com/repos/buttercup/buttercup-mobile/pulls/115"}},"in_reply_to_id":209518794},"pull_request":{"url":"https://api.github.com/repos/buttercup/buttercup-mobile/pulls/115","id":207784781,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3Nzg0Nzgx","html_url":"https://github.com/buttercup/buttercup-mobile/pull/115","diff_url":"https://github.com/buttercup/buttercup-mobile/pull/115.diff","patch_url":"https://github.com/buttercup/buttercup-mobile/pull/115.patch","issue_url":"https://api.github.com/repos/buttercup/buttercup-mobile/issues/115","number":115,"state":"open","locked":false,"title":"Offline support","user":{"login":"perry-mitchell","id":3869469,"node_id":"MDQ6VXNlcjM4Njk0Njk=","avatar_url":"https://avatars0.githubusercontent.com/u/3869469?v=4","gravatar_id":"","url":"https://api.github.com/users/perry-mitchell","html_url":"https://github.com/perry-mitchell","followers_url":"https://api.github.com/users/perry-mitchell/followers","following_url":"https://api.github.com/users/perry-mitchell/following{/other_user}","gists_url":"https://api.github.com/users/perry-mitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/perry-mitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perry-mitchell/subscriptions","organizations_url":"https://api.github.com/users/perry-mitchell/orgs","repos_url":"https://api.github.com/users/perry-mitchell/repos","events_url":"https://api.github.com/users/perry-mitchell/events{/privacy}","received_events_url":"https://api.github.com/users/perry-mitchell/received_events","type":"User","site_admin":false},"body":"Adds offline support, among other small features.\r\n\r\n## Offline support\r\nProvides the user with offline-access of archives:\r\n\r\n![image](https://user-images.githubusercontent.com/3869469/43996313-dcab9c26-9dc8-11e8-8673-583ebb9197aa.png)\r\n\r\n![image](https://user-images.githubusercontent.com/3869469/43996396-9fbe0d10-9dca-11e8-92fd-b10c175156e7.png)\r\n\r\n![image](https://user-images.githubusercontent.com/3869469/44002444-129a8036-9e4b-11e8-88eb-a5607b8cac82.png)\r\n\r\n![image](https://user-images.githubusercontent.com/3869469/44004780-120973b8-9e71-11e8-833d-e54fb0f09a4e.png)\r\n\r\n![image](https://user-images.githubusercontent.com/3869469/44005626-f8d6ae2a-9e7e-11e8-8275-88a3d0854b4c.png)\r\n\r\n## Updated alerts\r\nMost errors now show the dropbox message rather than a blocking alert:\r\n\r\n![image](https://user-images.githubusercontent.com/3869469/43994458-cf8b6436-9da5-11e8-93d3-d6db171240e7.png)\r\n\r\n## Improved icons\r\nIcon _stacking_ on the main page has been removed and cleaned up:\r\n\r\n![image](https://user-images.githubusercontent.com/3869469/44005633-127baa38-9e7f-11e8-8cf5-0d54aeafa629.png)\r\n","created_at":"2018-08-11T17:33:40Z","updated_at":"2018-08-13T14:41:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eece09f56600789e1825de3c1df701b6b082340a","assignee":{"login":"perry-mitchell","id":3869469,"node_id":"MDQ6VXNlcjM4Njk0Njk=","avatar_url":"https://avatars0.githubusercontent.com/u/3869469?v=4","gravatar_id":"","url":"https://api.github.com/users/perry-mitchell","html_url":"https://github.com/perry-mitchell","followers_url":"https://api.github.com/users/perry-mitchell/followers","following_url":"https://api.github.com/users/perry-mitchell/following{/other_user}","gists_url":"https://api.github.com/users/perry-mitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/perry-mitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perry-mitchell/subscriptions","organizations_url":"https://api.github.com/users/perry-mitchell/orgs","repos_url":"https://api.github.com/users/perry-mitchell/repos","events_url":"https://api.github.com/users/perry-mitchell/events{/privacy}","received_events_url":"https://api.github.com/users/perry-mitchell/received_events","type":"User","site_admin":false},"assignees":[{"login":"perry-mitchell","id":3869469,"node_id":"MDQ6VXNlcjM4Njk0Njk=","avatar_url":"https://avatars0.githubusercontent.com/u/3869469?v=4","gravatar_id":"","url":"https://api.github.com/users/perry-mitchell","html_url":"https://github.com/perry-mitchell","followers_url":"https://api.github.com/users/perry-mitchell/followers","following_url":"https://api.github.com/users/perry-mitchell/following{/other_user}","gists_url":"https://api.github.com/users/perry-mitchell/gists{/gist_id}","starred_url":"https://api.github.com/users/perry-mitchell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perry-mitchell/subscriptions","organizations_url":"https://api.github.com/users/perry-mitchell/orgs","repos_url":"https://api.github.com/users/perry-mitchell/repos","events_url":"https://api.github.com/users/perry-mitchell/events{/privacy}","received_events_url":"https://api.github.com/users/perry-mitchell/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/buttercup/buttercup-mobile/pulls/115/commits","review_comments_url":"https://api.github.com/repos/buttercup/buttercup-mobile/pulls/115/comments","review_comment_url":"https://api.github.com/repos/buttercup/buttercup-mobile/pulls/comments{/number}","comments_url":"https://api.github.com/repos/buttercup/buttercup-mobile/issues/115/comments","statuses_url":"https://api.github.com/repos/buttercup/buttercup-mobile/statuses/2c414351a13645c815fb4f66d8084390a4527340","head":{"label":"buttercup:offline_support","ref":"offline_support","sha":"2c414351a13645c815fb4f66d8084390a4527340","user":{"login":"buttercup","id":16577796,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NTc3Nzk2","avatar_url":"https://avatars2.githubusercontent.com/u/16577796?v=4","gravatar_id":"","url":"https://api.github.com/users/buttercup","html_url":"https://github.com/buttercup","followers_url":"https://api.github.com/users/buttercup/followers","following_url":"https://api.github.com/users/buttercup/following{/other_user}","gists_url":"https://api.github.com/users/buttercup/gists{/gist_id}","starred_url":"https://api.github.com/users/buttercup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buttercup/subscriptions","organizations_url":"https://api.github.com/users/buttercup/orgs","repos_url":"https://api.github.com/users/buttercup/repos","events_url":"https://api.github.com/users/buttercup/events{/privacy}","received_events_url":"https://api.github.com/users/buttercup/received_events","type":"Organization","site_admin":false},"repo":{"id":81740196,"node_id":"MDEwOlJlcG9zaXRvcnk4MTc0MDE5Ng==","name":"buttercup-mobile","full_name":"buttercup/buttercup-mobile","owner":{"login":"buttercup","id":16577796,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NTc3Nzk2","avatar_url":"https://avatars2.githubusercontent.com/u/16577796?v=4","gravatar_id":"","url":"https://api.github.com/users/buttercup","html_url":"https://github.com/buttercup","followers_url":"https://api.github.com/users/buttercup/followers","following_url":"https://api.github.com/users/buttercup/following{/other_user}","gists_url":"https://api.github.com/users/buttercup/gists{/gist_id}","starred_url":"https://api.github.com/users/buttercup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buttercup/subscriptions","organizations_url":"https://api.github.com/users/buttercup/orgs","repos_url":"https://api.github.com/users/buttercup/repos","events_url":"https://api.github.com/users/buttercup/events{/privacy}","received_events_url":"https://api.github.com/users/buttercup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/buttercup/buttercup-mobile","description":":iphone: React-Native mobile application for Buttercup","fork":false,"url":"https://api.github.com/repos/buttercup/buttercup-mobile","forks_url":"https://api.github.com/repos/buttercup/buttercup-mobile/forks","keys_url":"https://api.github.com/repos/buttercup/buttercup-mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/buttercup/buttercup-mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/buttercup/buttercup-mobile/teams","hooks_url":"https://api.github.com/repos/buttercup/buttercup-mobile/hooks","issue_events_url":"https://api.github.com/repos/buttercup/buttercup-mobile/issues/events{/number}","events_url":"https://api.github.com/repos/buttercup/buttercup-mobile/events","assignees_url":"https://api.github.com/repos/buttercup/buttercup-mobile/assignees{/user}","branches_url":"https://api.github.com/repos/buttercup/buttercup-mobile/branches{/branch}","tags_url":"https://api.github.com/repos/buttercup/buttercup-mobile/tags","blobs_url":"https://api.github.com/repos/buttercup/buttercup-mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/buttercup/buttercup-mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/buttercup/buttercup-mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/buttercup/buttercup-mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/buttercup/buttercup-mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/buttercup/buttercup-mobile/languages","stargazers_url":"https://api.github.com/repos/buttercup/buttercup-mobile/stargazers","contributors_url":"https://api.github.com/repos/buttercup/buttercup-mobile/contributors","subscribers_url":"https://api.github.com/repos/buttercup/buttercup-mobile/subscribers","subscription_url":"https://api.github.com/repos/buttercup/buttercup-mobile/subscription","commits_url":"https://api.github.com/repos/buttercup/buttercup-mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/buttercup/buttercup-mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/buttercup/buttercup-mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/buttercup/buttercup-mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/buttercup/buttercup-mobile/contents/{+path}","compare_url":"https://api.github.com/repos/buttercup/buttercup-mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/buttercup/buttercup-mobile/merges","archive_url":"https://api.github.com/repos/buttercup/buttercup-mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/buttercup/buttercup-mobile/downloads","issues_url":"https://api.github.com/repos/buttercup/buttercup-mobile/issues{/number}","pulls_url":"https://api.github.com/repos/buttercup/buttercup-mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/buttercup/buttercup-mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/buttercup/buttercup-mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/buttercup/buttercup-mobile/labels{/name}","releases_url":"https://api.github.com/repos/buttercup/buttercup-mobile/releases{/id}","deployments_url":"https://api.github.com/repos/buttercup/buttercup-mobile/deployments","created_at":"2017-02-12T16:35:33Z","updated_at":"2018-08-13T13:43:20Z","pushed_at":"2018-08-12T19:29:43Z","git_url":"git://github.com/buttercup/buttercup-mobile.git","ssh_url":"git@github.com:buttercup/buttercup-mobile.git","clone_url":"https://github.com/buttercup/buttercup-mobile.git","svn_url":"https://github.com/buttercup/buttercup-mobile","homepage":"https://buttercup.pw","size":42056,"stargazers_count":86,"watchers_count":86,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":27,"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":14,"open_issues":27,"watchers":86,"default_branch":"master"}},"base":{"label":"buttercup:master","ref":"master","sha":"5159fc640ef24a2b37fc90d3f5b0514662b6cbed","user":{"login":"buttercup","id":16577796,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NTc3Nzk2","avatar_url":"https://avatars2.githubusercontent.com/u/16577796?v=4","gravatar_id":"","url":"https://api.github.com/users/buttercup","html_url":"https://github.com/buttercup","followers_url":"https://api.github.com/users/buttercup/followers","following_url":"https://api.github.com/users/buttercup/following{/other_user}","gists_url":"https://api.github.com/users/buttercup/gists{/gist_id}","starred_url":"https://api.github.com/users/buttercup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buttercup/subscriptions","organizations_url":"https://api.github.com/users/buttercup/orgs","repos_url":"https://api.github.com/users/buttercup/repos","events_url":"https://api.github.com/users/buttercup/events{/privacy}","received_events_url":"https://api.github.com/users/buttercup/received_events","type":"Organization","site_admin":false},"repo":{"id":81740196,"node_id":"MDEwOlJlcG9zaXRvcnk4MTc0MDE5Ng==","name":"buttercup-mobile","full_name":"buttercup/buttercup-mobile","owner":{"login":"buttercup","id":16577796,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NTc3Nzk2","avatar_url":"https://avatars2.githubusercontent.com/u/16577796?v=4","gravatar_id":"","url":"https://api.github.com/users/buttercup","html_url":"https://github.com/buttercup","followers_url":"https://api.github.com/users/buttercup/followers","following_url":"https://api.github.com/users/buttercup/following{/other_user}","gists_url":"https://api.github.com/users/buttercup/gists{/gist_id}","starred_url":"https://api.github.com/users/buttercup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buttercup/subscriptions","organizations_url":"https://api.github.com/users/buttercup/orgs","repos_url":"https://api.github.com/users/buttercup/repos","events_url":"https://api.github.com/users/buttercup/events{/privacy}","received_events_url":"https://api.github.com/users/buttercup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/buttercup/buttercup-mobile","description":":iphone: React-Native mobile application for Buttercup","fork":false,"url":"https://api.github.com/repos/buttercup/buttercup-mobile","forks_url":"https://api.github.com/repos/buttercup/buttercup-mobile/forks","keys_url":"https://api.github.com/repos/buttercup/buttercup-mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/buttercup/buttercup-mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/buttercup/buttercup-mobile/teams","hooks_url":"https://api.github.com/repos/buttercup/buttercup-mobile/hooks","issue_events_url":"https://api.github.com/repos/buttercup/buttercup-mobile/issues/events{/number}","events_url":"https://api.github.com/repos/buttercup/buttercup-mobile/events","assignees_url":"https://api.github.com/repos/buttercup/buttercup-mobile/assignees{/user}","branches_url":"https://api.github.com/repos/buttercup/buttercup-mobile/branches{/branch}","tags_url":"https://api.github.com/repos/buttercup/buttercup-mobile/tags","blobs_url":"https://api.github.com/repos/buttercup/buttercup-mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/buttercup/buttercup-mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/buttercup/buttercup-mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/buttercup/buttercup-mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/buttercup/buttercup-mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/buttercup/buttercup-mobile/languages","stargazers_url":"https://api.github.com/repos/buttercup/buttercup-mobile/stargazers","contributors_url":"https://api.github.com/repos/buttercup/buttercup-mobile/contributors","subscribers_url":"https://api.github.com/repos/buttercup/buttercup-mobile/subscribers","subscription_url":"https://api.github.com/repos/buttercup/buttercup-mobile/subscription","commits_url":"https://api.github.com/repos/buttercup/buttercup-mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/buttercup/buttercup-mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/buttercup/buttercup-mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/buttercup/buttercup-mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/buttercup/buttercup-mobile/contents/{+path}","compare_url":"https://api.github.com/repos/buttercup/buttercup-mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/buttercup/buttercup-mobile/merges","archive_url":"https://api.github.com/repos/buttercup/buttercup-mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/buttercup/buttercup-mobile/downloads","issues_url":"https://api.github.com/repos/buttercup/buttercup-mobile/issues{/number}","pulls_url":"https://api.github.com/repos/buttercup/buttercup-mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/buttercup/buttercup-mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/buttercup/buttercup-mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/buttercup/buttercup-mobile/labels{/name}","releases_url":"https://api.github.com/repos/buttercup/buttercup-mobile/releases{/id}","deployments_url":"https://api.github.com/repos/buttercup/buttercup-mobile/deployments","created_at":"2017-02-12T16:35:33Z","updated_at":"2018-08-13T13:43:20Z","pushed_at":"2018-08-12T19:29:43Z","git_url":"git://github.com/buttercup/buttercup-mobile.git","ssh_url":"git@github.com:buttercup/buttercup-mobile.git","clone_url":"https://github.com/buttercup/buttercup-mobile.git","svn_url":"https://github.com/buttercup/buttercup-mobile","homepage":"https://buttercup.pw","size":42056,"stargazers_count":86,"watchers_count":86,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":27,"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":14,"open_issues":27,"watchers":86,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/buttercup/buttercup-mobile/pulls/115"},"html":{"href":"https://github.com/buttercup/buttercup-mobile/pull/115"},"issue":{"href":"https://api.github.com/repos/buttercup/buttercup-mobile/issues/115"},"comments":{"href":"https://api.github.com/repos/buttercup/buttercup-mobile/issues/115/comments"},"review_comments":{"href":"https://api.github.com/repos/buttercup/buttercup-mobile/pulls/115/comments"},"review_comment":{"href":"https://api.github.com/repos/buttercup/buttercup-mobile/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/buttercup/buttercup-mobile/pulls/115/commits"},"statuses":{"href":"https://api.github.com/repos/buttercup/buttercup-mobile/statuses/2c414351a13645c815fb4f66d8084390a4527340"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"perry-mitchell"}}