bugfix: Share Podcast link (Podcast screen) - hide the option if there is no link
This commit is contained in:
parent
250594827d
commit
7c5e3b58b3
|
@ -2,12 +2,13 @@ package de.danoeh.antennapod.menuhandler;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
|
@ -42,6 +43,10 @@ public class FeedMenuHandler {
|
|||
Log.d(TAG, "Preparing options menu");
|
||||
|
||||
menu.findItem(R.id.refresh_complete_item).setVisible(selectedFeed.isPaged());
|
||||
if (StringUtils.isBlank(selectedFeed.getLink())) {
|
||||
menu.findItem(R.id.visit_website_item).setVisible(false);
|
||||
menu.findItem(R.id.share_link_item).setVisible(false);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue