Skip to content

Commit

Permalink
Elimintation code duplication in ReaderActivityLauncher
Browse files Browse the repository at this point in the history
  • Loading branch information
mkevins committed Feb 13, 2024
1 parent 4ae77e5 commit 2e30067
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -403,13 +403,7 @@ public static void openPost(Context context, ReaderPost post) {

public static void sharePost(Context context, ReaderPost post) throws ActivityNotFoundException {
String url = (post.hasShortUrl() ? post.getShortUrl() : post.getUrl());

Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, url);
intent.putExtra(Intent.EXTRA_SUBJECT, post.getTitle());

context.startActivity(Intent.createChooser(intent, context.getString(R.string.share_link)));
ActivityLauncher.openShareIntent(context, url, post.getTitle());
}

public static void openUrl(Context context, String url, OpenUrlType openUrlType) {
Expand Down

0 comments on commit 2e30067

Please sign in to comment.