summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authordatavizard <44409076+datavizard@users.noreply.github.com>2021-03-10 18:00:45 +0530
committerGitHub <noreply@github.com>2021-03-10 13:30:45 +0100
commitb276c349423335c23807b9f61f0a78c0de2b3104 (patch)
tree811faa3e3afc263c19e37373ef2a146b8e76639f /app/src
parent57e5784e6f17f591641f43659148cfeb627ccbc5 (diff)
downloadAntennaPod-b276c349423335c23807b9f61f0a78c0de2b3104.zip
Adds a visual cue to the podcast header view whenever updates are disabled (#5014)
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java9
-rw-r--r--app/src/main/res/layout/feeditemlist_header.xml11
2 files changed, 20 insertions, 0 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java
index acb929dd2..7a363bcc1 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java
@@ -100,6 +100,7 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
private ImageView imgvCover;
private TextView txtvInformation;
private TextView txtvAuthor;
+ private TextView txtvUpdatesDisabled;
private ImageButton butShowInfo;
private ImageButton butShowSettings;
private View header;
@@ -166,6 +167,7 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
butShowSettings = root.findViewById(R.id.butShowSettings);
txtvInformation = root.findViewById(R.id.txtvInformation);
txtvFailure = root.findViewById(R.id.txtvFailure);
+ txtvUpdatesDisabled = root.findViewById(R.id.txtvUpdatesDisabled);
header = root.findViewById(R.id.headerContainer);
AppBarLayout appBar = root.findViewById(R.id.appBar);
CollapsingToolbarLayout collapsingToolbar = root.findViewById(R.id.collapsing_toolbar);
@@ -456,6 +458,13 @@ public class FeedItemlistFragment extends Fragment implements AdapterView.OnItem
} else {
txtvFailure.setVisibility(View.GONE);
}
+ if (!feed.getPreferences().getKeepUpdated()) {
+ txtvUpdatesDisabled.setText("{md-pause-circle-outline} " + this.getString(R.string.updates_disabled_label));
+ Iconify.addIcons(txtvUpdatesDisabled);
+ txtvUpdatesDisabled.setVisibility(View.VISIBLE);
+ } else {
+ txtvUpdatesDisabled.setVisibility(View.GONE);
+ }
txtvTitle.setText(feed.getTitle());
txtvAuthor.setText(feed.getAuthor());
if (feed.getItemFilter() != null) {
diff --git a/app/src/main/res/layout/feeditemlist_header.xml b/app/src/main/res/layout/feeditemlist_header.xml
index 2b59845f7..540baf4a7 100644
--- a/app/src/main/res/layout/feeditemlist_header.xml
+++ b/app/src/main/res/layout/feeditemlist_header.xml
@@ -117,4 +117,15 @@
android:gravity="center"
tools:visibility="visible"
tools:text="(i) Information"/>
+
+ <TextView
+ android:id="@+id/txtvUpdatesDisabled"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="2dp"
+ android:background="?android:attr/windowBackground"
+ android:visibility="gone"
+ android:gravity="center"
+ tools:visibility="visible"
+ tools:text="Updates disabled"/>
</LinearLayout>