Fix download bar displacement

This commit is contained in:
Martin Fietz 2015-05-12 10:03:41 +02:00
parent 1bf0216788
commit dfdfa82b4b
4 changed files with 6 additions and 12 deletions

View File

@ -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(

View File

@ -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

View File

@ -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) {

View File

@ -80,10 +80,10 @@
<string name="browse_gpoddernet_label">Browse gpodder.net</string>
<!-- Actions on feeds -->
<string name="mark_all_read_label">Mark all as read</string>
<string name="mark_all_read_msg">Marked all episodes as read</string>
<string name="mark_all_read_confirmation_msg">Please confirm that you want to mark all episodes as being read.</string>
<string name="mark_all_read_feed_confirmation_msg">Please confirm that you want to mark all episodes in this feed as being read.</string>
<string name="mark_all_read_label">Mark all as played</string>
<string name="mark_all_read_msg">Marked all episodes as played</string>
<string name="mark_all_read_confirmation_msg">Please confirm that you want to mark all episodes as being played.</string>
<string name="mark_all_read_feed_confirmation_msg">Please confirm that you want to mark all episodes in this feed as being played.</string>
<string name="show_info_label">Show information</string>
<string name="remove_feed_label">Remove podcast</string>
<string name="share_link_label">Share website link</string>