Show warning message also on item details page
This commit is contained in:
parent
aac4fd5b88
commit
bfc5738268
|
@ -88,6 +88,7 @@ public class FeedItemMenuHandler {
|
|||
|
||||
if (selectedItem.getFeed().getState() != Feed.STATE_SUBSCRIBED) {
|
||||
setItemVisibility(menu, R.id.mark_read_item, false);
|
||||
setItemVisibility(menu, R.id.add_to_favorites_item, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -116,6 +116,7 @@ public class ItemFragment extends Fragment {
|
|||
private ItemActionButton actionButton1;
|
||||
private ItemActionButton actionButton2;
|
||||
private View noMediaLabel;
|
||||
private View nonSubscribedWarningLabel;
|
||||
|
||||
private Disposable disposable;
|
||||
private PlaybackController controller;
|
||||
|
@ -166,6 +167,7 @@ public class ItemFragment extends Fragment {
|
|||
butAction1Text = layout.findViewById(R.id.butAction1Text);
|
||||
butAction2Text = layout.findViewById(R.id.butAction2Text);
|
||||
noMediaLabel = layout.findViewById(R.id.noMediaLabel);
|
||||
nonSubscribedWarningLabel = layout.findViewById(R.id.nonSubscribedWarningLabel);
|
||||
|
||||
butAction1.setOnClickListener(v -> {
|
||||
if (actionButton1 instanceof StreamActionButton && !UserPreferences.isStreamOverDownload()
|
||||
|
@ -289,6 +291,11 @@ public class ItemFragment extends Fragment {
|
|||
txtvPublished.setContentDescription(DateFormatter.formatForAccessibility(item.getPubDate()));
|
||||
}
|
||||
|
||||
if (item.getFeed().getState() != Feed.STATE_SUBSCRIBED) {
|
||||
nonSubscribedWarningLabel.setVisibility(View.VISIBLE);
|
||||
nonSubscribedWarningLabel.setOnClickListener(v -> openPodcast());
|
||||
}
|
||||
|
||||
float radius = 8 * getResources().getDisplayMetrics().density;
|
||||
RequestOptions options = new RequestOptions()
|
||||
.error(ImagePlaceholder.getDrawable(getContext(), radius))
|
||||
|
|
|
@ -174,6 +174,20 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nonSubscribedWarningLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginVertical="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:background="@drawable/bg_message_info"
|
||||
android:textColor="?attr/colorAccent"
|
||||
android:visibility="gone"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:text="@string/state_deleted_not_subscribed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/noMediaLabel"
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Reference in New Issue