summaryrefslogtreecommitdiff
path: root/src/de/podfetcher/util/FeedItemMenuHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/podfetcher/util/FeedItemMenuHandler.java')
-rw-r--r--src/de/podfetcher/util/FeedItemMenuHandler.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/de/podfetcher/util/FeedItemMenuHandler.java b/src/de/podfetcher/util/FeedItemMenuHandler.java
index 0edb183d0..503c454eb 100644
--- a/src/de/podfetcher/util/FeedItemMenuHandler.java
+++ b/src/de/podfetcher/util/FeedItemMenuHandler.java
@@ -1,6 +1,8 @@
package de.podfetcher.util;
import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
@@ -44,6 +46,10 @@ public class FeedItemMenuHandler {
menu.findItem(R.id.mark_read_item).setVisible(true);
}
+ if (selectedItem.getLink() != null) {
+ menu.findItem(R.id.visit_website_item).setVisible(true);
+ }
+
return true;
}
@@ -82,6 +88,10 @@ public class FeedItemMenuHandler {
manager.playMedia(context, selectedItem.getMedia(), true, true,
true);
break;
+ case R.id.visit_website_item:
+ Uri uri = Uri.parse(selectedItem.getLink());
+ context.startActivity(new Intent(Intent.ACTION_VIEW, uri));
+ break;
default:
return false;
}