GitHub PullRequestEvent at 2014-05-19 03:36:04
Repository: Anki-Android
Actor: nicolas-raoul
Payload: {"action":"closed","number":361,"pull_request":{"url":"https://api.github.com/repos/ankidroid/Anki-Android/pulls/361","id":15927190,"html_url":"https://github.com/ankidroid/Anki-Android/pull/361","diff_url":"https://github.com/ankidroid/Anki-Android/pull/361.diff","patch_url":"https://github.com/ankidroid/Anki-Android/pull/361.patch","issue_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/361","number":361,"state":"closed","title":"Enable total new count on deck front page.","user":{"login":"chajadan","id":5352747,"avatar_url":"https://avatars.githubusercontent.com/u/5352747?","gravatar_id":"f6f9b107475aa8df2e20fcb5945cf094","url":"https://api.github.com/users/chajadan","html_url":"https://github.com/chajadan","followers_url":"https://api.github.com/users/chajadan/followers","following_url":"https://api.github.com/users/chajadan/following{/other_user}","gists_url":"https://api.github.com/users/chajadan/gists{/gist_id}","starred_url":"https://api.github.com/users/chajadan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chajadan/subscriptions","organizations_url":"https://api.github.com/users/chajadan/orgs","repos_url":"https://api.github.com/users/chajadan/repos","events_url":"https://api.github.com/users/chajadan/events{/privacy}","received_events_url":"https://api.github.com/users/chajadan/received_events","type":"User","site_admin":false},"body":"This change allows the user to see the actual number of new cards in a deck on the deck intro page. If a truncated result is received (currently capped at 1000), a thread is spawned that gets the actual total and updates the UI -- that way if this process is slow for some reason the user can either wait for the UI to update if they care, or they can simply move on and not notice if they don't care.\r\n\r\nThere are 2 TODO: comments in this code. In both cases, modifying Sched.java would have been the most elegant solution, but I've been made paranoid about introducing changes to libanki. I've added code comments to mention what I would have liked to do.\r\n\r\nI'm about to make a pull request to anki however to change their query to the version I use in this thread. You asked for \"a cool fast sql query\" @nicolas-raoul so, this might it assuming sqlite wasn't able to optimize out the unnecessary subquery.","created_at":"2014-05-15T10:51:12Z","updated_at":"2014-05-19T03:36:04Z","closed_at":"2014-05-19T03:36:04Z","merged_at":"2014-05-19T03:36:04Z","merge_commit_sha":"d85de67a89cabbfdcf41ced36e3f42d1e34bb619","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ankidroid/Anki-Android/pulls/361/commits","review_comments_url":"https://api.github.com/repos/ankidroid/Anki-Android/pulls/361/comments","review_comment_url":"https://api.github.com/repos/ankidroid/Anki-Android/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/361/comments","statuses_url":"https://api.github.com/repos/ankidroid/Anki-Android/statuses/d9cf86202143a19d7f5d29071e86c2e8ae75ca35","head":{"label":"chajadan:show_exact_new_card_count","ref":"show_exact_new_card_count","sha":"d9cf86202143a19d7f5d29071e86c2e8ae75ca35","user":{"login":"chajadan","id":5352747,"avatar_url":"https://avatars.githubusercontent.com/u/5352747?","gravatar_id":"f6f9b107475aa8df2e20fcb5945cf094","url":"https://api.github.com/users/chajadan","html_url":"https://github.com/chajadan","followers_url":"https://api.github.com/users/chajadan/followers","following_url":"https://api.github.com/users/chajadan/following{/other_user}","gists_url":"https://api.github.com/users/chajadan/gists{/gist_id}","starred_url":"https://api.github.com/users/chajadan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chajadan/subscriptions","organizations_url":"https://api.github.com/users/chajadan/orgs","repos_url":"https://api.github.com/users/chajadan/repos","events_url":"https://api.github.com/users/chajadan/events{/privacy}","received_events_url":"https://api.github.com/users/chajadan/received_events","type":"User","site_admin":false},"repo":{"id":15626154,"name":"Anki-Android","full_name":"chajadan/Anki-Android","owner":{"login":"chajadan","id":5352747,"avatar_url":"https://avatars.githubusercontent.com/u/5352747?","gravatar_id":"f6f9b107475aa8df2e20fcb5945cf094","url":"https://api.github.com/users/chajadan","html_url":"https://github.com/chajadan","followers_url":"https://api.github.com/users/chajadan/followers","following_url":"https://api.github.com/users/chajadan/following{/other_user}","gists_url":"https://api.github.com/users/chajadan/gists{/gist_id}","starred_url":"https://api.github.com/users/chajadan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chajadan/subscriptions","organizations_url":"https://api.github.com/users/chajadan/orgs","repos_url":"https://api.github.com/users/chajadan/repos","events_url":"https://api.github.com/users/chajadan/events{/privacy}","received_events_url":"https://api.github.com/users/chajadan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chajadan/Anki-Android","description":"Anki on Android","fork":true,"url":"https://api.github.com/repos/chajadan/Anki-Android","forks_url":"https://api.github.com/repos/chajadan/Anki-Android/forks","keys_url":"https://api.github.com/repos/chajadan/Anki-Android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chajadan/Anki-Android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chajadan/Anki-Android/teams","hooks_url":"https://api.github.com/repos/chajadan/Anki-Android/hooks","issue_events_url":"https://api.github.com/repos/chajadan/Anki-Android/issues/events{/number}","events_url":"https://api.github.com/repos/chajadan/Anki-Android/events","assignees_url":"https://api.github.com/repos/chajadan/Anki-Android/assignees{/user}","branches_url":"https://api.github.com/repos/chajadan/Anki-Android/branches{/branch}","tags_url":"https://api.github.com/repos/chajadan/Anki-Android/tags","blobs_url":"https://api.github.com/repos/chajadan/Anki-Android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chajadan/Anki-Android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chajadan/Anki-Android/git/refs{/sha}","trees_url":"https://api.github.com/repos/chajadan/Anki-Android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chajadan/Anki-Android/statuses/{sha}","languages_url":"https://api.github.com/repos/chajadan/Anki-Android/languages","stargazers_url":"https://api.github.com/repos/chajadan/Anki-Android/stargazers","contributors_url":"https://api.github.com/repos/chajadan/Anki-Android/contributors","subscribers_url":"https://api.github.com/repos/chajadan/Anki-Android/subscribers","subscription_url":"https://api.github.com/repos/chajadan/Anki-Android/subscription","commits_url":"https://api.github.com/repos/chajadan/Anki-Android/commits{/sha}","git_commits_url":"https://api.github.com/repos/chajadan/Anki-Android/git/commits{/sha}","comments_url":"https://api.github.com/repos/chajadan/Anki-Android/comments{/number}","issue_comment_url":"https://api.github.com/repos/chajadan/Anki-Android/issues/comments/{number}","contents_url":"https://api.github.com/repos/chajadan/Anki-Android/contents/{+path}","compare_url":"https://api.github.com/repos/chajadan/Anki-Android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chajadan/Anki-Android/merges","archive_url":"https://api.github.com/repos/chajadan/Anki-Android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chajadan/Anki-Android/downloads","issues_url":"https://api.github.com/repos/chajadan/Anki-Android/issues{/number}","pulls_url":"https://api.github.com/repos/chajadan/Anki-Android/pulls{/number}","milestones_url":"https://api.github.com/repos/chajadan/Anki-Android/milestones{/number}","notifications_url":"https://api.github.com/repos/chajadan/Anki-Android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chajadan/Anki-Android/labels{/name}","releases_url":"https://api.github.com/repos/chajadan/Anki-Android/releases{/id}","created_at":"2014-01-04T04:15:19Z","updated_at":"2014-05-19T03:36:04Z","pushed_at":"2014-05-15T12:41:16Z","git_url":"git://github.com/chajadan/Anki-Android.git","ssh_url":"git@github.com:chajadan/Anki-Android.git","clone_url":"https://github.com/chajadan/Anki-Android.git","svn_url":"https://github.com/chajadan/Anki-Android","homepage":"https://code.google.com/p/ankidroid/","size":52063,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"ankidroid:develop","ref":"develop","sha":"5b1838e29989cedf1001d62b62c792dd94b12abc","user":{"login":"ankidroid","id":3320903,"avatar_url":"https://avatars.githubusercontent.com/u/3320903?","gravatar_id":"38fec72c602a367010590df5471605e9","url":"https://api.github.com/users/ankidroid","html_url":"https://github.com/ankidroid","followers_url":"https://api.github.com/users/ankidroid/followers","following_url":"https://api.github.com/users/ankidroid/following{/other_user}","gists_url":"https://api.github.com/users/ankidroid/gists{/gist_id}","starred_url":"https://api.github.com/users/ankidroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankidroid/subscriptions","organizations_url":"https://api.github.com/users/ankidroid/orgs","repos_url":"https://api.github.com/users/ankidroid/repos","events_url":"https://api.github.com/users/ankidroid/events{/privacy}","received_events_url":"https://api.github.com/users/ankidroid/received_events","type":"Organization","site_admin":false},"repo":{"id":7716883,"name":"Anki-Android","full_name":"ankidroid/Anki-Android","owner":{"login":"ankidroid","id":3320903,"avatar_url":"https://avatars.githubusercontent.com/u/3320903?","gravatar_id":"38fec72c602a367010590df5471605e9","url":"https://api.github.com/users/ankidroid","html_url":"https://github.com/ankidroid","followers_url":"https://api.github.com/users/ankidroid/followers","following_url":"https://api.github.com/users/ankidroid/following{/other_user}","gists_url":"https://api.github.com/users/ankidroid/gists{/gist_id}","starred_url":"https://api.github.com/users/ankidroid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankidroid/subscriptions","organizations_url":"https://api.github.com/users/ankidroid/orgs","repos_url":"https://api.github.com/users/ankidroid/repos","events_url":"https://api.github.com/users/ankidroid/events{/privacy}","received_events_url":"https://api.github.com/users/ankidroid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ankidroid/Anki-Android","description":"Anki on Android","fork":true,"url":"https://api.github.com/repos/ankidroid/Anki-Android","forks_url":"https://api.github.com/repos/ankidroid/Anki-Android/forks","keys_url":"https://api.github.com/repos/ankidroid/Anki-Android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ankidroid/Anki-Android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ankidroid/Anki-Android/teams","hooks_url":"https://api.github.com/repos/ankidroid/Anki-Android/hooks","issue_events_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/events{/number}","events_url":"https://api.github.com/repos/ankidroid/Anki-Android/events","assignees_url":"https://api.github.com/repos/ankidroid/Anki-Android/assignees{/user}","branches_url":"https://api.github.com/repos/ankidroid/Anki-Android/branches{/branch}","tags_url":"https://api.github.com/repos/ankidroid/Anki-Android/tags","blobs_url":"https://api.github.com/repos/ankidroid/Anki-Android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ankidroid/Anki-Android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ankidroid/Anki-Android/git/refs{/sha}","trees_url":"https://api.github.com/repos/ankidroid/Anki-Android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ankidroid/Anki-Android/statuses/{sha}","languages_url":"https://api.github.com/repos/ankidroid/Anki-Android/languages","stargazers_url":"https://api.github.com/repos/ankidroid/Anki-Android/stargazers","contributors_url":"https://api.github.com/repos/ankidroid/Anki-Android/contributors","subscribers_url":"https://api.github.com/repos/ankidroid/Anki-Android/subscribers","subscription_url":"https://api.github.com/repos/ankidroid/Anki-Android/subscription","commits_url":"https://api.github.com/repos/ankidroid/Anki-Android/commits{/sha}","git_commits_url":"https://api.github.com/repos/ankidroid/Anki-Android/git/commits{/sha}","comments_url":"https://api.github.com/repos/ankidroid/Anki-Android/comments{/number}","issue_comment_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/comments/{number}","contents_url":"https://api.github.com/repos/ankidroid/Anki-Android/contents/{+path}","compare_url":"https://api.github.com/repos/ankidroid/Anki-Android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ankidroid/Anki-Android/merges","archive_url":"https://api.github.com/repos/ankidroid/Anki-Android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ankidroid/Anki-Android/downloads","issues_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues{/number}","pulls_url":"https://api.github.com/repos/ankidroid/Anki-Android/pulls{/number}","milestones_url":"https://api.github.com/repos/ankidroid/Anki-Android/milestones{/number}","notifications_url":"https://api.github.com/repos/ankidroid/Anki-Android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ankidroid/Anki-Android/labels{/name}","releases_url":"https://api.github.com/repos/ankidroid/Anki-Android/releases{/id}","created_at":"2013-01-20T13:55:53Z","updated_at":"2014-05-19T03:36:04Z","pushed_at":"2014-05-19T03:36:04Z","git_url":"git://github.com/ankidroid/Anki-Android.git","ssh_url":"git@github.com:ankidroid/Anki-Android.git","clone_url":"https://github.com/ankidroid/Anki-Android.git","svn_url":"https://github.com/ankidroid/Anki-Android","homepage":"https://code.google.com/p/ankidroid/","size":64751,"stargazers_count":110,"watchers_count":110,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"forks_count":195,"mirror_url":null,"open_issues_count":5,"forks":195,"open_issues":5,"watchers":110,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ankidroid/Anki-Android/pulls/361"},"html":{"href":"https://github.com/ankidroid/Anki-Android/pull/361"},"issue":{"href":"https://api.github.com/repos/ankidroid/Anki-Android/issues/361"},"comments":{"href":"https://api.github.com/repos/ankidroid/Anki-Android/issues/361/comments"},"review_comments":{"href":"https://api.github.com/repos/ankidroid/Anki-Android/pulls/361/comments"},"review_comment":{"href":"https://api.github.com/repos/ankidroid/Anki-Android/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ankidroid/Anki-Android/pulls/361/commits"},"statuses":{"href":"https://api.github.com/repos/ankidroid/Anki-Android/statuses/d9cf86202143a19d7f5d29071e86c2e8ae75ca35"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"nicolas-raoul","id":99590,"avatar_url":"https://avatars.githubusercontent.com/u/99590?","gravatar_id":"c3af87f6b1d4d247d01ce3b73d918fc7","url":"https://api.github.com/users/nicolas-raoul","html_url":"https://github.com/nicolas-raoul","followers_url":"https://api.github.com/users/nicolas-raoul/followers","following_url":"https://api.github.com/users/nicolas-raoul/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-raoul/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-raoul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-raoul/subscriptions","organizations_url":"https://api.github.com/users/nicolas-raoul/orgs","repos_url":"https://api.github.com/users/nicolas-raoul/repos","events_url":"https://api.github.com/users/nicolas-raoul/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-raoul/received_events","type":"User","site_admin":false},"comments":6,"review_comments":2,"commits":1,"additions":39,"deletions":1,"changed_files":1}}