Local feeds: Hide "Share..." menu item (#4444)

This commit is contained in:
Herbert Reiter 2020-09-27 21:48:35 +02:00 committed by GitHub
parent 4996d46851
commit cf8d4c42f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -64,9 +64,6 @@ public class FeedItemMenuHandler {
if (!ShareUtils.hasLinkToShare(selectedItem)) {
setItemVisibility(menu, R.id.visit_website_item, false);
}
if (selectedItem.getFeed().isLocalFeed()) {
setItemVisibility(menu, R.id.visit_website_item, false);
}
boolean fileDownloaded = hasMedia && selectedItem.getMedia().fileExists();
@ -105,6 +102,11 @@ public class FeedItemMenuHandler {
setItemVisibility(menu, R.id.remove_item, fileDownloaded);
if (selectedItem.getFeed().isLocalFeed()) {
setItemVisibility(menu, R.id.visit_website_item, false);
setItemVisibility(menu, R.id.share_item, false);
}
return true;
}

View File

@ -51,6 +51,10 @@ public class FeedMenuHandler {
menu.findItem(R.id.visit_website_item).setVisible(false);
menu.findItem(R.id.share_link_item).setVisible(false);
}
if (selectedFeed.isLocalFeed()) {
// hide complete submenu "Share..." as both sub menu items are not visible
menu.findItem(R.id.share_item).setVisible(false);
}
return true;
}