{"action":"created","comment":{"url":"https://api.github.com/repos/projectbuendia/client/pulls/comments/44490045","id":44490045,"diff_hunk":"@@ -102,6 +132,11 @@ public static void fetchAndShowXform(\n         final int requestCode,\n         @Nullable final org.odk.collect.android.model.Patient patient,\n         @Nullable final Preset fields) {\n+        LOG.i(\"Trying to fetch it from cache.\");","path":"app/src/main/java/org/projectbuendia/client/ui/OdkActivityLauncher.java","position":43,"original_position":43,"commit_id":"b1c967d4a0198679f0afead44ca5833c7c969443","original_commit_id":"b1c967d4a0198679f0afead44ca5833c7c969443","user":{"login":"viniciusboson","id":665045,"avatar_url":"https://avatars.githubusercontent.com/u/665045?v=3","gravatar_id":"","url":"https://api.github.com/users/viniciusboson","html_url":"https://github.com/viniciusboson","followers_url":"https://api.github.com/users/viniciusboson/followers","following_url":"https://api.github.com/users/viniciusboson/following{/other_user}","gists_url":"https://api.github.com/users/viniciusboson/gists{/gist_id}","starred_url":"https://api.github.com/users/viniciusboson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viniciusboson/subscriptions","organizations_url":"https://api.github.com/users/viniciusboson/orgs","repos_url":"https://api.github.com/users/viniciusboson/repos","events_url":"https://api.github.com/users/viniciusboson/events{/privacy}","received_events_url":"https://api.github.com/users/viniciusboson/received_events","type":"User","site_admin":false},"body":"Sorry about that, @dancunningham. I completely forgot to update the PR description. \r\nInitially, it was fetching from the server first, but after discussing with @capnfabs, we've realized that this was not necessary because now the form are synched frequently, together with other datas, and a profile change is much less frequent.  So, i agree that the apps should priorize the cached form. To invalidade the cache, you just need to go to settings and invalidade all the other datas. This is actually the big point. The forms work as the other datas. You don't need to check anywhere that you are working on offline mode.","created_at":"2015-11-11T01:03:58Z","updated_at":"2015-11-11T01:03:58Z","html_url":"https://github.com/projectbuendia/client/pull/130#discussion_r44490045","pull_request_url":"https://api.github.com/repos/projectbuendia/client/pulls/130","_links":{"self":{"href":"https://api.github.com/repos/projectbuendia/client/pulls/comments/44490045"},"html":{"href":"https://github.com/projectbuendia/client/pull/130#discussion_r44490045"},"pull_request":{"href":"https://api.github.com/repos/projectbuendia/client/pulls/130"}}},"pull_request":{"url":"https://api.github.com/repos/projectbuendia/client/pulls/130","id":50042476,"html_url":"https://github.com/projectbuendia/client/pull/130","diff_url":"https://github.com/projectbuendia/client/pull/130.diff","patch_url":"https://github.com/projectbuendia/client/pull/130.patch","issue_url":"https://api.github.com/repos/projectbuendia/client/issues/130","number":130,"state":"open","locked":false,"title":"Open form offline","user":{"login":"viniciusboson","id":665045,"avatar_url":"https://avatars.githubusercontent.com/u/665045?v=3","gravatar_id":"","url":"https://api.github.com/users/viniciusboson","html_url":"https://github.com/viniciusboson","followers_url":"https://api.github.com/users/viniciusboson/followers","following_url":"https://api.github.com/users/viniciusboson/following{/other_user}","gists_url":"https://api.github.com/users/viniciusboson/gists{/gist_id}","starred_url":"https://api.github.com/users/viniciusboson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viniciusboson/subscriptions","organizations_url":"https://api.github.com/users/viniciusboson/orgs","repos_url":"https://api.github.com/users/viniciusboson/repos","events_url":"https://api.github.com/users/viniciusboson/events{/privacy}","received_events_url":"https://api.github.com/users/viniciusboson/received_events","type":"User","site_admin":false},"body":"These changes were made to allow open any form offline.\r\n\r\nWhen the application synchronizes with the server initially (`SynchAdapter`), now it fetches all the forms from the server and caches them. Given that most of the time it will not have many forms, this change will not impact on synch performance.\r\n\r\nThen, whenever the application tries to access a form, it tries to fetch the form again from the server and cache it, but if the sever is inaccessible due whatever reason, the application tries to load the cached form. If there is no such form locally, then the original error is thrown as usual.\r\n\r\nThe application is not alerting the user that the form is loaded offline. I've put a `TODO` to do that.\r\n\r\nThe changes on `OdkDatabase.java` and `OdkDatabaseTest.java` files are actually on PR #128, but as it is not merged yet, it appears here.  \r\n ","created_at":"2015-11-07T18:50:04Z","updated_at":"2015-11-11T01:03:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d290e7d5101e1183c62b28bdb0da229a3471f911","assignee":{"login":"viniciusboson","id":665045,"avatar_url":"https://avatars.githubusercontent.com/u/665045?v=3","gravatar_id":"","url":"https://api.github.com/users/viniciusboson","html_url":"https://github.com/viniciusboson","followers_url":"https://api.github.com/users/viniciusboson/followers","following_url":"https://api.github.com/users/viniciusboson/following{/other_user}","gists_url":"https://api.github.com/users/viniciusboson/gists{/gist_id}","starred_url":"https://api.github.com/users/viniciusboson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viniciusboson/subscriptions","organizations_url":"https://api.github.com/users/viniciusboson/orgs","repos_url":"https://api.github.com/users/viniciusboson/repos","events_url":"https://api.github.com/users/viniciusboson/events{/privacy}","received_events_url":"https://api.github.com/users/viniciusboson/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/projectbuendia/client/pulls/130/commits","review_comments_url":"https://api.github.com/repos/projectbuendia/client/pulls/130/comments","review_comment_url":"https://api.github.com/repos/projectbuendia/client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projectbuendia/client/issues/130/comments","statuses_url":"https://api.github.com/repos/projectbuendia/client/statuses/b1c967d4a0198679f0afead44ca5833c7c969443","head":{"label":"viniciusboson:feature/open-form-offline","ref":"feature/open-form-offline","sha":"b1c967d4a0198679f0afead44ca5833c7c969443","user":{"login":"viniciusboson","id":665045,"avatar_url":"https://avatars.githubusercontent.com/u/665045?v=3","gravatar_id":"","url":"https://api.github.com/users/viniciusboson","html_url":"https://github.com/viniciusboson","followers_url":"https://api.github.com/users/viniciusboson/followers","following_url":"https://api.github.com/users/viniciusboson/following{/other_user}","gists_url":"https://api.github.com/users/viniciusboson/gists{/gist_id}","starred_url":"https://api.github.com/users/viniciusboson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viniciusboson/subscriptions","organizations_url":"https://api.github.com/users/viniciusboson/orgs","repos_url":"https://api.github.com/users/viniciusboson/repos","events_url":"https://api.github.com/users/viniciusboson/events{/privacy}","received_events_url":"https://api.github.com/users/viniciusboson/received_events","type":"User","site_admin":false},"repo":{"id":42251870,"name":"client","full_name":"viniciusboson/client","owner":{"login":"viniciusboson","id":665045,"avatar_url":"https://avatars.githubusercontent.com/u/665045?v=3","gravatar_id":"","url":"https://api.github.com/users/viniciusboson","html_url":"https://github.com/viniciusboson","followers_url":"https://api.github.com/users/viniciusboson/followers","following_url":"https://api.github.com/users/viniciusboson/following{/other_user}","gists_url":"https://api.github.com/users/viniciusboson/gists{/gist_id}","starred_url":"https://api.github.com/users/viniciusboson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viniciusboson/subscriptions","organizations_url":"https://api.github.com/users/viniciusboson/orgs","repos_url":"https://api.github.com/users/viniciusboson/repos","events_url":"https://api.github.com/users/viniciusboson/events{/privacy}","received_events_url":"https://api.github.com/users/viniciusboson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/viniciusboson/client","description":"Android client app","fork":true,"url":"https://api.github.com/repos/viniciusboson/client","forks_url":"https://api.github.com/repos/viniciusboson/client/forks","keys_url":"https://api.github.com/repos/viniciusboson/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/viniciusboson/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/viniciusboson/client/teams","hooks_url":"https://api.github.com/repos/viniciusboson/client/hooks","issue_events_url":"https://api.github.com/repos/viniciusboson/client/issues/events{/number}","events_url":"https://api.github.com/repos/viniciusboson/client/events","assignees_url":"https://api.github.com/repos/viniciusboson/client/assignees{/user}","branches_url":"https://api.github.com/repos/viniciusboson/client/branches{/branch}","tags_url":"https://api.github.com/repos/viniciusboson/client/tags","blobs_url":"https://api.github.com/repos/viniciusboson/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/viniciusboson/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/viniciusboson/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/viniciusboson/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/viniciusboson/client/statuses/{sha}","languages_url":"https://api.github.com/repos/viniciusboson/client/languages","stargazers_url":"https://api.github.com/repos/viniciusboson/client/stargazers","contributors_url":"https://api.github.com/repos/viniciusboson/client/contributors","subscribers_url":"https://api.github.com/repos/viniciusboson/client/subscribers","subscription_url":"https://api.github.com/repos/viniciusboson/client/subscription","commits_url":"https://api.github.com/repos/viniciusboson/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/viniciusboson/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/viniciusboson/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/viniciusboson/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/viniciusboson/client/contents/{+path}","compare_url":"https://api.github.com/repos/viniciusboson/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/viniciusboson/client/merges","archive_url":"https://api.github.com/repos/viniciusboson/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/viniciusboson/client/downloads","issues_url":"https://api.github.com/repos/viniciusboson/client/issues{/number}","pulls_url":"https://api.github.com/repos/viniciusboson/client/pulls{/number}","milestones_url":"https://api.github.com/repos/viniciusboson/client/milestones{/number}","notifications_url":"https://api.github.com/repos/viniciusboson/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/viniciusboson/client/labels{/name}","releases_url":"https://api.github.com/repos/viniciusboson/client/releases{/id}","created_at":"2015-09-10T15:06:21Z","updated_at":"2015-09-10T15:06:22Z","pushed_at":"2015-11-10T15:14:19Z","git_url":"git://github.com/viniciusboson/client.git","ssh_url":"git@github.com:viniciusboson/client.git","clone_url":"https://github.com/viniciusboson/client.git","svn_url":"https://github.com/viniciusboson/client","homepage":null,"size":5929,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"dev"}},"base":{"label":"projectbuendia:dev","ref":"dev","sha":"b9782bfac273c16d024cfeb1a07e1fa78933cc69","user":{"login":"projectbuendia","id":13339011,"avatar_url":"https://avatars.githubusercontent.com/u/13339011?v=3","gravatar_id":"","url":"https://api.github.com/users/projectbuendia","html_url":"https://github.com/projectbuendia","followers_url":"https://api.github.com/users/projectbuendia/followers","following_url":"https://api.github.com/users/projectbuendia/following{/other_user}","gists_url":"https://api.github.com/users/projectbuendia/gists{/gist_id}","starred_url":"https://api.github.com/users/projectbuendia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectbuendia/subscriptions","organizations_url":"https://api.github.com/users/projectbuendia/orgs","repos_url":"https://api.github.com/users/projectbuendia/repos","events_url":"https://api.github.com/users/projectbuendia/events{/privacy}","received_events_url":"https://api.github.com/users/projectbuendia/received_events","type":"Organization","site_admin":false},"repo":{"id":33972326,"name":"client","full_name":"projectbuendia/client","owner":{"login":"projectbuendia","id":13339011,"avatar_url":"https://avatars.githubusercontent.com/u/13339011?v=3","gravatar_id":"","url":"https://api.github.com/users/projectbuendia","html_url":"https://github.com/projectbuendia","followers_url":"https://api.github.com/users/projectbuendia/followers","following_url":"https://api.github.com/users/projectbuendia/following{/other_user}","gists_url":"https://api.github.com/users/projectbuendia/gists{/gist_id}","starred_url":"https://api.github.com/users/projectbuendia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectbuendia/subscriptions","organizations_url":"https://api.github.com/users/projectbuendia/orgs","repos_url":"https://api.github.com/users/projectbuendia/repos","events_url":"https://api.github.com/users/projectbuendia/events{/privacy}","received_events_url":"https://api.github.com/users/projectbuendia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projectbuendia/client","description":"Android client app","fork":false,"url":"https://api.github.com/repos/projectbuendia/client","forks_url":"https://api.github.com/repos/projectbuendia/client/forks","keys_url":"https://api.github.com/repos/projectbuendia/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projectbuendia/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projectbuendia/client/teams","hooks_url":"https://api.github.com/repos/projectbuendia/client/hooks","issue_events_url":"https://api.github.com/repos/projectbuendia/client/issues/events{/number}","events_url":"https://api.github.com/repos/projectbuendia/client/events","assignees_url":"https://api.github.com/repos/projectbuendia/client/assignees{/user}","branches_url":"https://api.github.com/repos/projectbuendia/client/branches{/branch}","tags_url":"https://api.github.com/repos/projectbuendia/client/tags","blobs_url":"https://api.github.com/repos/projectbuendia/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projectbuendia/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projectbuendia/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/projectbuendia/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projectbuendia/client/statuses/{sha}","languages_url":"https://api.github.com/repos/projectbuendia/client/languages","stargazers_url":"https://api.github.com/repos/projectbuendia/client/stargazers","contributors_url":"https://api.github.com/repos/projectbuendia/client/contributors","subscribers_url":"https://api.github.com/repos/projectbuendia/client/subscribers","subscription_url":"https://api.github.com/repos/projectbuendia/client/subscription","commits_url":"https://api.github.com/repos/projectbuendia/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/projectbuendia/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/projectbuendia/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/projectbuendia/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/projectbuendia/client/contents/{+path}","compare_url":"https://api.github.com/repos/projectbuendia/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projectbuendia/client/merges","archive_url":"https://api.github.com/repos/projectbuendia/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projectbuendia/client/downloads","issues_url":"https://api.github.com/repos/projectbuendia/client/issues{/number}","pulls_url":"https://api.github.com/repos/projectbuendia/client/pulls{/number}","milestones_url":"https://api.github.com/repos/projectbuendia/client/milestones{/number}","notifications_url":"https://api.github.com/repos/projectbuendia/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projectbuendia/client/labels{/name}","releases_url":"https://api.github.com/repos/projectbuendia/client/releases{/id}","created_at":"2015-04-15T04:01:52Z","updated_at":"2015-10-26T18:09:27Z","pushed_at":"2015-11-10T15:39:31Z","git_url":"git://github.com/projectbuendia/client.git","ssh_url":"git@github.com:projectbuendia/client.git","clone_url":"https://github.com/projectbuendia/client.git","svn_url":"https://github.com/projectbuendia/client","homepage":null,"size":7991,"stargazers_count":34,"watchers_count":34,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":27,"forks":24,"open_issues":27,"watchers":34,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/projectbuendia/client/pulls/130"},"html":{"href":"https://github.com/projectbuendia/client/pull/130"},"issue":{"href":"https://api.github.com/repos/projectbuendia/client/issues/130"},"comments":{"href":"https://api.github.com/repos/projectbuendia/client/issues/130/comments"},"review_comments":{"href":"https://api.github.com/repos/projectbuendia/client/pulls/130/comments"},"review_comment":{"href":"https://api.github.com/repos/projectbuendia/client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projectbuendia/client/pulls/130/commits"},"statuses":{"href":"https://api.github.com/repos/projectbuendia/client/statuses/b1c967d4a0198679f0afead44ca5833c7c969443"}}}}