{"action":"created","comment":{"url":"https://api.github.com/repos/AntennaPod/AntennaPod/pulls/comments/56954089","id":56954089,"diff_hunk":"@@ -0,0 +1,105 @@\n+package de.danoeh.antennapod.adapter;\n+\n+import android.content.Context;\n+import android.view.LayoutInflater;\n+import android.view.View;\n+import android.view.ViewGroup;\n+import android.widget.BaseAdapter;\n+import android.widget.ImageView;\n+import android.widget.TextView;\n+\n+import com.bumptech.glide.Glide;\n+import com.joanzapata.iconify.widget.IconTextView;\n+\n+import java.util.ArrayList;\n+import java.util.Locale;\n+\n+import de.danoeh.antennapod.R;\n+import de.danoeh.antennapod.core.feed.Feed;\n+import de.danoeh.antennapod.core.glide.ApGlideSettings;\n+import de.danoeh.antennapod.core.storage.DBReader;\n+\n+/**\n+ * Adapter for the statistics list\n+ */\n+public class StatisticsListAdapter extends BaseAdapter {\n+    private Context context;\n+    ArrayList<DBReader.StatisticsItem> feedTime = new ArrayList<>();\n+\n+    public StatisticsListAdapter(Context context) {\n+        this.context = context;\n+    }\n+\n+\n+    @Override\n+    public int getCount() {\n+        return feedTime.size();\n+    }\n+\n+    @Override\n+    public DBReader.StatisticsItem getItem(int position) {\n+        return feedTime.get(position);\n+    }\n+\n+    @Override\n+    public long getItemId(int position) {\n+        return 0;\n+    }\n+\n+    @Override\n+    public View getView(int position, View convertView, ViewGroup parent) {\n+        FeedHolder holder;\n+        Feed feed = feedTime.get(position).feed;\n+\n+        if (convertView == null) {\n+            holder = new FeedHolder();\n+            LayoutInflater inflater = (LayoutInflater) context\n+                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n+\n+            convertView = inflater.inflate(R.layout.nav_feedlistitem, parent, false);\n+\n+            holder.image = (ImageView) convertView.findViewById(R.id.imgvCover);\n+            holder.title = (TextView) convertView.findViewById(R.id.txtvTitle);\n+            holder.failure = (IconTextView) convertView.findViewById(R.id.itxtvFailure);\n+            holder.count = (TextView) convertView.findViewById(R.id.txtvCount);\n+            convertView.setTag(holder);\n+        } else {\n+            holder = (FeedHolder) convertView.getTag();\n+        }\n+\n+        Glide.with(context)\n+                .load(feed.getImageUri())\n+                .placeholder(R.color.light_gray)\n+                .error(R.color.light_gray)\n+                .diskCacheStrategy(ApGlideSettings.AP_DISK_CACHE_STRATEGY)\n+                .fitCenter()\n+                .dontAnimate()\n+                .into(holder.image);\n+\n+        holder.title.setText(feed.getTitle());\n+        holder.failure.setVisibility(View.GONE);\n+        holder.count.setVisibility(View.VISIBLE);\n+        holder.count.setText(timeToText(feedTime.get(position).timePlayed));\n+        return convertView;\n+    }\n+\n+    private String timeToText(long time) {\n+        int hours = (int) time / 3600;\n+        int remainder = (int) time - hours * 3600;","path":"app/src/main/java/de/danoeh/antennapod/adapter/StatisticsListAdapter.java","position":88,"original_position":88,"commit_id":"f7ee7e584effae7bc507d043d562970f031c2dcc","original_commit_id":"f7ee7e584effae7bc507d043d562970f031c2dcc","user":{"login":"mfietz","id":6860662,"avatar_url":"https://avatars.githubusercontent.com/u/6860662?v=3","gravatar_id":"","url":"https://api.github.com/users/mfietz","html_url":"https://github.com/mfietz","followers_url":"https://api.github.com/users/mfietz/followers","following_url":"https://api.github.com/users/mfietz/following{/other_user}","gists_url":"https://api.github.com/users/mfietz/gists{/gist_id}","starred_url":"https://api.github.com/users/mfietz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfietz/subscriptions","organizations_url":"https://api.github.com/users/mfietz/orgs","repos_url":"https://api.github.com/users/mfietz/repos","events_url":"https://api.github.com/users/mfietz/events{/privacy}","received_events_url":"https://api.github.com/users/mfietz/received_events","type":"User","site_admin":false},"body":"``time % 3600`` ?","created_at":"2016-03-22T09:06:11Z","updated_at":"2016-03-22T09:06:11Z","html_url":"https://github.com/AntennaPod/AntennaPod/pull/1798#discussion_r56954089","pull_request_url":"https://api.github.com/repos/AntennaPod/AntennaPod/pulls/1798","_links":{"self":{"href":"https://api.github.com/repos/AntennaPod/AntennaPod/pulls/comments/56954089"},"html":{"href":"https://github.com/AntennaPod/AntennaPod/pull/1798#discussion_r56954089"},"pull_request":{"href":"https://api.github.com/repos/AntennaPod/AntennaPod/pulls/1798"}}},"pull_request":{"url":"https://api.github.com/repos/AntennaPod/AntennaPod/pulls/1798","id":63553708,"html_url":"https://github.com/AntennaPod/AntennaPod/pull/1798","diff_url":"https://github.com/AntennaPod/AntennaPod/pull/1798.diff","patch_url":"https://github.com/AntennaPod/AntennaPod/pull/1798.patch","issue_url":"https://api.github.com/repos/AntennaPod/AntennaPod/issues/1798","number":1798,"state":"open","locked":false,"title":"Added statistics fragment","user":{"login":"ByteHamster","id":5811634,"avatar_url":"https://avatars.githubusercontent.com/u/5811634?v=3","gravatar_id":"","url":"https://api.github.com/users/ByteHamster","html_url":"https://github.com/ByteHamster","followers_url":"https://api.github.com/users/ByteHamster/followers","following_url":"https://api.github.com/users/ByteHamster/following{/other_user}","gists_url":"https://api.github.com/users/ByteHamster/gists{/gist_id}","starred_url":"https://api.github.com/users/ByteHamster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ByteHamster/subscriptions","organizations_url":"https://api.github.com/users/ByteHamster/orgs","repos_url":"https://api.github.com/users/ByteHamster/repos","events_url":"https://api.github.com/users/ByteHamster/events{/privacy}","received_events_url":"https://api.github.com/users/ByteHamster/received_events","type":"User","site_admin":false},"body":"#1743","created_at":"2016-03-21T12:03:16Z","updated_at":"2016-03-22T09:06:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"908b20fb8d6b62fb7233d5f272650e27e1f97a07","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AntennaPod/AntennaPod/pulls/1798/commits","review_comments_url":"https://api.github.com/repos/AntennaPod/AntennaPod/pulls/1798/comments","review_comment_url":"https://api.github.com/repos/AntennaPod/AntennaPod/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AntennaPod/AntennaPod/issues/1798/comments","statuses_url":"https://api.github.com/repos/AntennaPod/AntennaPod/statuses/f7ee7e584effae7bc507d043d562970f031c2dcc","head":{"label":"ByteHamster:statistics_page","ref":"statistics_page","sha":"f7ee7e584effae7bc507d043d562970f031c2dcc","user":{"login":"ByteHamster","id":5811634,"avatar_url":"https://avatars.githubusercontent.com/u/5811634?v=3","gravatar_id":"","url":"https://api.github.com/users/ByteHamster","html_url":"https://github.com/ByteHamster","followers_url":"https://api.github.com/users/ByteHamster/followers","following_url":"https://api.github.com/users/ByteHamster/following{/other_user}","gists_url":"https://api.github.com/users/ByteHamster/gists{/gist_id}","starred_url":"https://api.github.com/users/ByteHamster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ByteHamster/subscriptions","organizations_url":"https://api.github.com/users/ByteHamster/orgs","repos_url":"https://api.github.com/users/ByteHamster/repos","events_url":"https://api.github.com/users/ByteHamster/events{/privacy}","received_events_url":"https://api.github.com/users/ByteHamster/received_events","type":"User","site_admin":false},"repo":{"id":51466412,"name":"AntennaPod","full_name":"ByteHamster/AntennaPod","owner":{"login":"ByteHamster","id":5811634,"avatar_url":"https://avatars.githubusercontent.com/u/5811634?v=3","gravatar_id":"","url":"https://api.github.com/users/ByteHamster","html_url":"https://github.com/ByteHamster","followers_url":"https://api.github.com/users/ByteHamster/followers","following_url":"https://api.github.com/users/ByteHamster/following{/other_user}","gists_url":"https://api.github.com/users/ByteHamster/gists{/gist_id}","starred_url":"https://api.github.com/users/ByteHamster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ByteHamster/subscriptions","organizations_url":"https://api.github.com/users/ByteHamster/orgs","repos_url":"https://api.github.com/users/ByteHamster/repos","events_url":"https://api.github.com/users/ByteHamster/events{/privacy}","received_events_url":"https://api.github.com/users/ByteHamster/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ByteHamster/AntennaPod","description":"A podcast manager for Android","fork":true,"url":"https://api.github.com/repos/ByteHamster/AntennaPod","forks_url":"https://api.github.com/repos/ByteHamster/AntennaPod/forks","keys_url":"https://api.github.com/repos/ByteHamster/AntennaPod/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ByteHamster/AntennaPod/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ByteHamster/AntennaPod/teams","hooks_url":"https://api.github.com/repos/ByteHamster/AntennaPod/hooks","issue_events_url":"https://api.github.com/repos/ByteHamster/AntennaPod/issues/events{/number}","events_url":"https://api.github.com/repos/ByteHamster/AntennaPod/events","assignees_url":"https://api.github.com/repos/ByteHamster/AntennaPod/assignees{/user}","branches_url":"https://api.github.com/repos/ByteHamster/AntennaPod/branches{/branch}","tags_url":"https://api.github.com/repos/ByteHamster/AntennaPod/tags","blobs_url":"https://api.github.com/repos/ByteHamster/AntennaPod/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ByteHamster/AntennaPod/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ByteHamster/AntennaPod/git/refs{/sha}","trees_url":"https://api.github.com/repos/ByteHamster/AntennaPod/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ByteHamster/AntennaPod/statuses/{sha}","languages_url":"https://api.github.com/repos/ByteHamster/AntennaPod/languages","stargazers_url":"https://api.github.com/repos/ByteHamster/AntennaPod/stargazers","contributors_url":"https://api.github.com/repos/ByteHamster/AntennaPod/contributors","subscribers_url":"https://api.github.com/repos/ByteHamster/AntennaPod/subscribers","subscription_url":"https://api.github.com/repos/ByteHamster/AntennaPod/subscription","commits_url":"https://api.github.com/repos/ByteHamster/AntennaPod/commits{/sha}","git_commits_url":"https://api.github.com/repos/ByteHamster/AntennaPod/git/commits{/sha}","comments_url":"https://api.github.com/repos/ByteHamster/AntennaPod/comments{/number}","issue_comment_url":"https://api.github.com/repos/ByteHamster/AntennaPod/issues/comments{/number}","contents_url":"https://api.github.com/repos/ByteHamster/AntennaPod/contents/{+path}","compare_url":"https://api.github.com/repos/ByteHamster/AntennaPod/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ByteHamster/AntennaPod/merges","archive_url":"https://api.github.com/repos/ByteHamster/AntennaPod/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ByteHamster/AntennaPod/downloads","issues_url":"https://api.github.com/repos/ByteHamster/AntennaPod/issues{/number}","pulls_url":"https://api.github.com/repos/ByteHamster/AntennaPod/pulls{/number}","milestones_url":"https://api.github.com/repos/ByteHamster/AntennaPod/milestones{/number}","notifications_url":"https://api.github.com/repos/ByteHamster/AntennaPod/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ByteHamster/AntennaPod/labels{/name}","releases_url":"https://api.github.com/repos/ByteHamster/AntennaPod/releases{/id}","deployments_url":"https://api.github.com/repos/ByteHamster/AntennaPod/deployments","created_at":"2016-02-10T19:33:43Z","updated_at":"2016-02-10T19:33:46Z","pushed_at":"2016-03-21T12:00:44Z","git_url":"git://github.com/ByteHamster/AntennaPod.git","ssh_url":"git@github.com:ByteHamster/AntennaPod.git","clone_url":"https://github.com/ByteHamster/AntennaPod.git","svn_url":"https://github.com/ByteHamster/AntennaPod","homepage":"","size":25880,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"AntennaPod:develop","ref":"develop","sha":"2c4aaea708c1b541f801c8b731336173ad38482c","user":{"login":"AntennaPod","id":10713470,"avatar_url":"https://avatars.githubusercontent.com/u/10713470?v=3","gravatar_id":"","url":"https://api.github.com/users/AntennaPod","html_url":"https://github.com/AntennaPod","followers_url":"https://api.github.com/users/AntennaPod/followers","following_url":"https://api.github.com/users/AntennaPod/following{/other_user}","gists_url":"https://api.github.com/users/AntennaPod/gists{/gist_id}","starred_url":"https://api.github.com/users/AntennaPod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AntennaPod/subscriptions","organizations_url":"https://api.github.com/users/AntennaPod/orgs","repos_url":"https://api.github.com/users/AntennaPod/repos","events_url":"https://api.github.com/users/AntennaPod/events{/privacy}","received_events_url":"https://api.github.com/users/AntennaPod/received_events","type":"Organization","site_admin":false},"repo":{"id":5244445,"name":"AntennaPod","full_name":"AntennaPod/AntennaPod","owner":{"login":"AntennaPod","id":10713470,"avatar_url":"https://avatars.githubusercontent.com/u/10713470?v=3","gravatar_id":"","url":"https://api.github.com/users/AntennaPod","html_url":"https://github.com/AntennaPod","followers_url":"https://api.github.com/users/AntennaPod/followers","following_url":"https://api.github.com/users/AntennaPod/following{/other_user}","gists_url":"https://api.github.com/users/AntennaPod/gists{/gist_id}","starred_url":"https://api.github.com/users/AntennaPod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AntennaPod/subscriptions","organizations_url":"https://api.github.com/users/AntennaPod/orgs","repos_url":"https://api.github.com/users/AntennaPod/repos","events_url":"https://api.github.com/users/AntennaPod/events{/privacy}","received_events_url":"https://api.github.com/users/AntennaPod/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AntennaPod/AntennaPod","description":"A podcast manager for Android","fork":false,"url":"https://api.github.com/repos/AntennaPod/AntennaPod","forks_url":"https://api.github.com/repos/AntennaPod/AntennaPod/forks","keys_url":"https://api.github.com/repos/AntennaPod/AntennaPod/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AntennaPod/AntennaPod/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AntennaPod/AntennaPod/teams","hooks_url":"https://api.github.com/repos/AntennaPod/AntennaPod/hooks","issue_events_url":"https://api.github.com/repos/AntennaPod/AntennaPod/issues/events{/number}","events_url":"https://api.github.com/repos/AntennaPod/AntennaPod/events","assignees_url":"https://api.github.com/repos/AntennaPod/AntennaPod/assignees{/user}","branches_url":"https://api.github.com/repos/AntennaPod/AntennaPod/branches{/branch}","tags_url":"https://api.github.com/repos/AntennaPod/AntennaPod/tags","blobs_url":"https://api.github.com/repos/AntennaPod/AntennaPod/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AntennaPod/AntennaPod/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AntennaPod/AntennaPod/git/refs{/sha}","trees_url":"https://api.github.com/repos/AntennaPod/AntennaPod/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AntennaPod/AntennaPod/statuses/{sha}","languages_url":"https://api.github.com/repos/AntennaPod/AntennaPod/languages","stargazers_url":"https://api.github.com/repos/AntennaPod/AntennaPod/stargazers","contributors_url":"https://api.github.com/repos/AntennaPod/AntennaPod/contributors","subscribers_url":"https://api.github.com/repos/AntennaPod/AntennaPod/subscribers","subscription_url":"https://api.github.com/repos/AntennaPod/AntennaPod/subscription","commits_url":"https://api.github.com/repos/AntennaPod/AntennaPod/commits{/sha}","git_commits_url":"https://api.github.com/repos/AntennaPod/AntennaPod/git/commits{/sha}","comments_url":"https://api.github.com/repos/AntennaPod/AntennaPod/comments{/number}","issue_comment_url":"https://api.github.com/repos/AntennaPod/AntennaPod/issues/comments{/number}","contents_url":"https://api.github.com/repos/AntennaPod/AntennaPod/contents/{+path}","compare_url":"https://api.github.com/repos/AntennaPod/AntennaPod/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AntennaPod/AntennaPod/merges","archive_url":"https://api.github.com/repos/AntennaPod/AntennaPod/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AntennaPod/AntennaPod/downloads","issues_url":"https://api.github.com/repos/AntennaPod/AntennaPod/issues{/number}","pulls_url":"https://api.github.com/repos/AntennaPod/AntennaPod/pulls{/number}","milestones_url":"https://api.github.com/repos/AntennaPod/AntennaPod/milestones{/number}","notifications_url":"https://api.github.com/repos/AntennaPod/AntennaPod/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AntennaPod/AntennaPod/labels{/name}","releases_url":"https://api.github.com/repos/AntennaPod/AntennaPod/releases{/id}","deployments_url":"https://api.github.com/repos/AntennaPod/AntennaPod/deployments","created_at":"2012-07-31T10:25:08Z","updated_at":"2016-03-22T07:46:23Z","pushed_at":"2016-03-22T07:33:33Z","git_url":"git://github.com/AntennaPod/AntennaPod.git","ssh_url":"git@github.com:AntennaPod/AntennaPod.git","clone_url":"https://github.com/AntennaPod/AntennaPod.git","svn_url":"https://github.com/AntennaPod/AntennaPod","homepage":"","size":26899,"stargazers_count":1068,"watchers_count":1068,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":383,"mirror_url":null,"open_issues_count":154,"forks":383,"open_issues":154,"watchers":1068,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/AntennaPod/AntennaPod/pulls/1798"},"html":{"href":"https://github.com/AntennaPod/AntennaPod/pull/1798"},"issue":{"href":"https://api.github.com/repos/AntennaPod/AntennaPod/issues/1798"},"comments":{"href":"https://api.github.com/repos/AntennaPod/AntennaPod/issues/1798/comments"},"review_comments":{"href":"https://api.github.com/repos/AntennaPod/AntennaPod/pulls/1798/comments"},"review_comment":{"href":"https://api.github.com/repos/AntennaPod/AntennaPod/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AntennaPod/AntennaPod/pulls/1798/commits"},"statuses":{"href":"https://api.github.com/repos/AntennaPod/AntennaPod/statuses/f7ee7e584effae7bc507d043d562970f031c2dcc"}}}}