From dfdfa82b4b0cc0768fd17afcd9fc19b4dabdb177 Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Tue, 12 May 2015 10:03:41 +0200 Subject: [PATCH] Fix download bar displacement --- .../de/danoeh/antennapod/adapter/FeedItemlistAdapter.java | 2 -- .../de/danoeh/antennapod/menuhandler/FeedMenuHandler.java | 3 +-- .../main/java/de/danoeh/antennapod/core/feed/Feed.java | 5 +---- core/src/main/res/values/strings.xml | 8 ++++---- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java index 4a640f112..72bcda4d0 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/FeedItemlistAdapter.java @@ -139,12 +139,10 @@ public class FeedItemlistAdapter extends BaseAdapter { item.getMedia())) { holder.episodeProgress.setVisibility(View.VISIBLE); holder.episodeProgress.setProgress(((ItemAccess) itemAccess).getItemDownloadProgressPercent(item)); - holder.published.setVisibility(View.GONE); } else { if(media.getPosition() == 0) { holder.episodeProgress.setVisibility(View.GONE); } - holder.published.setVisibility(View.VISIBLE); } TypedArray typeDrawables = context.obtainStyledAttributes( diff --git a/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedMenuHandler.java b/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedMenuHandler.java index af3368c41..31106e727 100644 --- a/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedMenuHandler.java +++ b/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedMenuHandler.java @@ -39,8 +39,7 @@ public class FeedMenuHandler { } Log.d(TAG, "Preparing options menu"); - menu.findItem(R.id.mark_all_read_item).setVisible( - selectedFeed.hasNewItems(true)); + menu.findItem(R.id.mark_all_read_item).setVisible(selectedFeed.hasNewItems()); if (selectedFeed.getPaymentLink() != null && selectedFeed.getFlattrStatus().flattrable()) menu.findItem(R.id.support_item).setVisible(true); else diff --git a/core/src/main/java/de/danoeh/antennapod/core/feed/Feed.java b/core/src/main/java/de/danoeh/antennapod/core/feed/Feed.java index 44be0e3c5..73e414c6a 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/feed/Feed.java +++ b/core/src/main/java/de/danoeh/antennapod/core/feed/Feed.java @@ -173,11 +173,8 @@ public class Feed extends FeedFile implements FlattrThing, PicassoImageResource /** * Returns true if at least one item in the itemlist is unread. * - * @param enableEpisodeFilter true if this method should only count items with episodes if - * the 'display only episodes' - preference is set to true by the - * user. */ - public boolean hasNewItems(boolean enableEpisodeFilter) { + public boolean hasNewItems() { for (FeedItem item : items) { if (item.getState() == FeedItem.State.UNREAD) { if (item.getMedia() != null) { diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index 4400fc7f2..c6308fa7b 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -80,10 +80,10 @@ Browse gpodder.net - Mark all as read - Marked all episodes as read - Please confirm that you want to mark all episodes as being read. - Please confirm that you want to mark all episodes in this feed as being read. + Mark all as played + Marked all episodes as played + Please confirm that you want to mark all episodes as being played. + Please confirm that you want to mark all episodes in this feed as being played. Show information Remove podcast Share website link