{"action":"created","comment":{"url":"https://api.github.com/repos/wikimedia/wikipedia-ios/pulls/comments/42032144","id":42032144,"diff_hunk":"@@ -70,6 +48,8 @@\n \n @protocol WMFWebViewControllerDelegate <NSObject>\n \n+- (void)webViewController:(WebViewController*)controller didLoadArticle:(MWKArticle*)article;","path":"Wikipedia/View Controllers/WebView/WebViewController.h","position":70,"original_position":70,"commit_id":"f757aacef8d4d04459f9c7034f994cab8d792e86","original_commit_id":"f757aacef8d4d04459f9c7034f994cab8d792e86","user":{"login":"bgerstle","id":444217,"avatar_url":"https://avatars.githubusercontent.com/u/444217?v=3","gravatar_id":"","url":"https://api.github.com/users/bgerstle","html_url":"https://github.com/bgerstle","followers_url":"https://api.github.com/users/bgerstle/followers","following_url":"https://api.github.com/users/bgerstle/following{/other_user}","gists_url":"https://api.github.com/users/bgerstle/gists{/gist_id}","starred_url":"https://api.github.com/users/bgerstle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgerstle/subscriptions","organizations_url":"https://api.github.com/users/bgerstle/orgs","repos_url":"https://api.github.com/users/bgerstle/repos","events_url":"https://api.github.com/users/bgerstle/events{/privacy}","received_events_url":"https://api.github.com/users/bgerstle/received_events","type":"User","site_admin":false},"body":"is there a particular reason why we're passing an article instead of a title?","created_at":"2015-10-14T18:23:01Z","updated_at":"2015-10-14T18:23:01Z","html_url":"https://github.com/wikimedia/wikipedia-ios/pull/159#discussion_r42032144","pull_request_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/pulls/159","_links":{"self":{"href":"https://api.github.com/repos/wikimedia/wikipedia-ios/pulls/comments/42032144"},"html":{"href":"https://github.com/wikimedia/wikipedia-ios/pull/159#discussion_r42032144"},"pull_request":{"href":"https://api.github.com/repos/wikimedia/wikipedia-ios/pulls/159"}}},"pull_request":{"url":"https://api.github.com/repos/wikimedia/wikipedia-ios/pulls/159","id":47326272,"html_url":"https://github.com/wikimedia/wikipedia-ios/pull/159","diff_url":"https://github.com/wikimedia/wikipedia-ios/pull/159.diff","patch_url":"https://github.com/wikimedia/wikipedia-ios/pull/159.patch","issue_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/159","number":159,"state":"open","locked":false,"title":"(Re)Enable last scroll position restore for continue reading feature","user":{"login":"coreyfloyd","id":64771,"avatar_url":"https://avatars.githubusercontent.com/u/64771?v=3","gravatar_id":"","url":"https://api.github.com/users/coreyfloyd","html_url":"https://github.com/coreyfloyd","followers_url":"https://api.github.com/users/coreyfloyd/followers","following_url":"https://api.github.com/users/coreyfloyd/following{/other_user}","gists_url":"https://api.github.com/users/coreyfloyd/gists{/gist_id}","starred_url":"https://api.github.com/users/coreyfloyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreyfloyd/subscriptions","organizations_url":"https://api.github.com/users/coreyfloyd/orgs","repos_url":"https://api.github.com/users/coreyfloyd/repos","events_url":"https://api.github.com/users/coreyfloyd/events{/privacy}","received_events_url":"https://api.github.com/users/coreyfloyd/received_events","type":"User","site_admin":false},"body":"This enables articles shown on startup (restore) or articles shown from the continue reading section to restore their previous offset (using the legacy logic which used the discovery method to decide whether or not to scroll a user to the previous offset)\r\n\r\n**IMPORTANT:** For evaluating this pull request, please look at each commit in order. They explain why changes were made along the way. Its probably best i walk you through.\r\n\r\nTL;DR\r\nPeeled an onion here. Basically, we needed to pass down the discovery method to the web view controller to get this working again. This involved changing some APIs, and from there I had decisions of whether to update old (soon to be deleted) code to work with the new APIs or delete the old code. I went with the latter. As noted above, I left a detailed story along the way to explain why some refactors were completed.\r\n\r\n\r\n\r\n\r\n\r\n\r\n","created_at":"2015-10-09T22:21:24Z","updated_at":"2015-10-14T18:23:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"163f5d5510f92cb8c61c408f75e8e9b0677b4c92","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/pulls/159/commits","review_comments_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/pulls/159/comments","review_comment_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/159/comments","statuses_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/statuses/f757aacef8d4d04459f9c7034f994cab8d792e86","head":{"label":"wikimedia:feature/T113068/continue-reading-scroll-position","ref":"feature/T113068/continue-reading-scroll-position","sha":"f757aacef8d4d04459f9c7034f994cab8d792e86","user":{"login":"wikimedia","id":56668,"avatar_url":"https://avatars.githubusercontent.com/u/56668?v=3","gravatar_id":"","url":"https://api.github.com/users/wikimedia","html_url":"https://github.com/wikimedia","followers_url":"https://api.github.com/users/wikimedia/followers","following_url":"https://api.github.com/users/wikimedia/following{/other_user}","gists_url":"https://api.github.com/users/wikimedia/gists{/gist_id}","starred_url":"https://api.github.com/users/wikimedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wikimedia/subscriptions","organizations_url":"https://api.github.com/users/wikimedia/orgs","repos_url":"https://api.github.com/users/wikimedia/repos","events_url":"https://api.github.com/users/wikimedia/events{/privacy}","received_events_url":"https://api.github.com/users/wikimedia/received_events","type":"Organization","site_admin":false},"repo":{"id":13863130,"name":"wikipedia-ios","full_name":"wikimedia/wikipedia-ios","owner":{"login":"wikimedia","id":56668,"avatar_url":"https://avatars.githubusercontent.com/u/56668?v=3","gravatar_id":"","url":"https://api.github.com/users/wikimedia","html_url":"https://github.com/wikimedia","followers_url":"https://api.github.com/users/wikimedia/followers","following_url":"https://api.github.com/users/wikimedia/following{/other_user}","gists_url":"https://api.github.com/users/wikimedia/gists{/gist_id}","starred_url":"https://api.github.com/users/wikimedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wikimedia/subscriptions","organizations_url":"https://api.github.com/users/wikimedia/orgs","repos_url":"https://api.github.com/users/wikimedia/repos","events_url":"https://api.github.com/users/wikimedia/events{/privacy}","received_events_url":"https://api.github.com/users/wikimedia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wikimedia/wikipedia-ios","description":"The official Wikipedia iOS client.","fork":false,"url":"https://api.github.com/repos/wikimedia/wikipedia-ios","forks_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/forks","keys_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/teams","hooks_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/hooks","issue_events_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/events{/number}","events_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/events","assignees_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/assignees{/user}","branches_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/branches{/branch}","tags_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/tags","blobs_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/languages","stargazers_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/stargazers","contributors_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/contributors","subscribers_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/subscribers","subscription_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/subscription","commits_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/contents/{+path}","compare_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/merges","archive_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/downloads","issues_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues{/number}","pulls_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/labels{/name}","releases_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/releases{/id}","created_at":"2013-10-25T14:36:56Z","updated_at":"2015-10-14T16:41:15Z","pushed_at":"2015-10-14T18:11:17Z","git_url":"git://github.com/wikimedia/wikipedia-ios.git","ssh_url":"git@github.com:wikimedia/wikipedia-ios.git","clone_url":"https://github.com/wikimedia/wikipedia-ios.git","svn_url":"https://github.com/wikimedia/wikipedia-ios","homepage":"https://www.mediawiki.org/wiki/Wikimedia_Apps","size":112496,"stargazers_count":410,"watchers_count":410,"language":"Objective-C","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":120,"mirror_url":null,"open_issues_count":5,"forks":120,"open_issues":5,"watchers":410,"default_branch":"master"}},"base":{"label":"wikimedia:master","ref":"master","sha":"a876d4420fd9049b088f715e27dab123ba3f04eb","user":{"login":"wikimedia","id":56668,"avatar_url":"https://avatars.githubusercontent.com/u/56668?v=3","gravatar_id":"","url":"https://api.github.com/users/wikimedia","html_url":"https://github.com/wikimedia","followers_url":"https://api.github.com/users/wikimedia/followers","following_url":"https://api.github.com/users/wikimedia/following{/other_user}","gists_url":"https://api.github.com/users/wikimedia/gists{/gist_id}","starred_url":"https://api.github.com/users/wikimedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wikimedia/subscriptions","organizations_url":"https://api.github.com/users/wikimedia/orgs","repos_url":"https://api.github.com/users/wikimedia/repos","events_url":"https://api.github.com/users/wikimedia/events{/privacy}","received_events_url":"https://api.github.com/users/wikimedia/received_events","type":"Organization","site_admin":false},"repo":{"id":13863130,"name":"wikipedia-ios","full_name":"wikimedia/wikipedia-ios","owner":{"login":"wikimedia","id":56668,"avatar_url":"https://avatars.githubusercontent.com/u/56668?v=3","gravatar_id":"","url":"https://api.github.com/users/wikimedia","html_url":"https://github.com/wikimedia","followers_url":"https://api.github.com/users/wikimedia/followers","following_url":"https://api.github.com/users/wikimedia/following{/other_user}","gists_url":"https://api.github.com/users/wikimedia/gists{/gist_id}","starred_url":"https://api.github.com/users/wikimedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wikimedia/subscriptions","organizations_url":"https://api.github.com/users/wikimedia/orgs","repos_url":"https://api.github.com/users/wikimedia/repos","events_url":"https://api.github.com/users/wikimedia/events{/privacy}","received_events_url":"https://api.github.com/users/wikimedia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wikimedia/wikipedia-ios","description":"The official Wikipedia iOS client.","fork":false,"url":"https://api.github.com/repos/wikimedia/wikipedia-ios","forks_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/forks","keys_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/teams","hooks_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/hooks","issue_events_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/events{/number}","events_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/events","assignees_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/assignees{/user}","branches_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/branches{/branch}","tags_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/tags","blobs_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/languages","stargazers_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/stargazers","contributors_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/contributors","subscribers_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/subscribers","subscription_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/subscription","commits_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/contents/{+path}","compare_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/merges","archive_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/downloads","issues_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues{/number}","pulls_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/labels{/name}","releases_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/releases{/id}","created_at":"2013-10-25T14:36:56Z","updated_at":"2015-10-14T16:41:15Z","pushed_at":"2015-10-14T18:11:17Z","git_url":"git://github.com/wikimedia/wikipedia-ios.git","ssh_url":"git@github.com:wikimedia/wikipedia-ios.git","clone_url":"https://github.com/wikimedia/wikipedia-ios.git","svn_url":"https://github.com/wikimedia/wikipedia-ios","homepage":"https://www.mediawiki.org/wiki/Wikimedia_Apps","size":112496,"stargazers_count":410,"watchers_count":410,"language":"Objective-C","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":120,"mirror_url":null,"open_issues_count":5,"forks":120,"open_issues":5,"watchers":410,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wikimedia/wikipedia-ios/pulls/159"},"html":{"href":"https://github.com/wikimedia/wikipedia-ios/pull/159"},"issue":{"href":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/159"},"comments":{"href":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/159/comments"},"review_comments":{"href":"https://api.github.com/repos/wikimedia/wikipedia-ios/pulls/159/comments"},"review_comment":{"href":"https://api.github.com/repos/wikimedia/wikipedia-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wikimedia/wikipedia-ios/pulls/159/commits"},"statuses":{"href":"https://api.github.com/repos/wikimedia/wikipedia-ios/statuses/f757aacef8d4d04459f9c7034f994cab8d792e86"}}}}