summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsRecyclerAdapter.java4
-rw-r--r--app/src/main/res/layout/nav_listitem.xml1
-rw-r--r--app/src/main/res/layout/subscription_item.xml15
3 files changed, 19 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsRecyclerAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsRecyclerAdapter.java
index bfa37b600..284f3e468 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsRecyclerAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/SubscriptionsRecyclerAdapter.java
@@ -216,6 +216,7 @@ public class SubscriptionsRecyclerAdapter extends SelectableAdapter<Subscription
private final FrameLayout selectView;
private final CheckBox selectCheckbox;
private final CardView card;
+ private final View errorIcon;
public SubscriptionViewHolder(@NonNull View itemView) {
super(itemView);
@@ -226,6 +227,7 @@ public class SubscriptionsRecyclerAdapter extends SelectableAdapter<Subscription
selectView = itemView.findViewById(R.id.selectContainer);
selectCheckbox = itemView.findViewById(R.id.selectCheckBox);
card = itemView.findViewById(R.id.outerContainer);
+ errorIcon = itemView.findViewById(R.id.errorIcon);
}
public void bind(NavDrawerData.DrawerItem drawerItem) {
@@ -249,9 +251,11 @@ public class SubscriptionsRecyclerAdapter extends SelectableAdapter<Subscription
textAndImageCombined = feed.isLocalFeed() && feed.getImageUrl() != null
&& feed.getImageUrl().startsWith(Feed.PREFIX_GENERATIVE_COVER);
coverLoader.withUri(feed.getImageUrl());
+ errorIcon.setVisibility(feed.hasLastUpdateFailed() ? View.VISIBLE : View.GONE);
} else {
textAndImageCombined = true;
coverLoader.withResource(R.drawable.ic_tag);
+ errorIcon.setVisibility(View.GONE);
}
if (UserPreferences.shouldShowSubscriptionTitle()) {
// No need for fallback title when already showing title
diff --git a/app/src/main/res/layout/nav_listitem.xml b/app/src/main/res/layout/nav_listitem.xml
index e0a7f9ed0..47d6e6c00 100644
--- a/app/src/main/res/layout/nav_listitem.xml
+++ b/app/src/main/res/layout/nav_listitem.xml
@@ -57,6 +57,7 @@
android:layout_toStartOf="@id/txtvCount"
android:layout_toLeftOf="@id/txtvCount"
android:visibility="gone"
+ android:contentDescription="@string/refresh_failed_msg"
app:srcCompat="@drawable/ic_error"
app:tint="?attr/icon_red"
tools:text="!" />
diff --git a/app/src/main/res/layout/subscription_item.xml b/app/src/main/res/layout/subscription_item.xml
index d9a2800c1..b3271ffa3 100644
--- a/app/src/main/res/layout/subscription_item.xml
+++ b/app/src/main/res/layout/subscription_item.xml
@@ -6,7 +6,8 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:padding="4dp">
+ android:padding="4dp"
+ tools:layout_width="150dp">
<androidx.cardview.widget.CardView
android:id="@+id/outerContainer"
@@ -70,6 +71,18 @@
android:textSize="14sp"
style="@style/TextPill" />
+ <ImageView
+ android:id="@+id/errorIcon"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_alignParentEnd="true"
+ android:layout_alignBottom="@id/coverImage"
+ android:layout_margin="8dp"
+ android:visibility="gone"
+ android:contentDescription="@string/refresh_failed_msg"
+ app:srcCompat="@drawable/ic_error"
+ tools:visibility="visible" />
+
</RelativeLayout>
</androidx.cardview.widget.CardView>