From 2e3006728a6a5e5b92ee36e29b4474d621385d49 Mon Sep 17 00:00:00 2001 From: Matthew Kevins Date: Tue, 13 Feb 2024 17:36:43 +1000 Subject: [PATCH] Elimintation code duplication in ReaderActivityLauncher --- .../android/ui/reader/ReaderActivityLauncher.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/reader/ReaderActivityLauncher.java b/WordPress/src/main/java/org/wordpress/android/ui/reader/ReaderActivityLauncher.java index 2aea5b62e6e1..a827e3d6cd6d 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/reader/ReaderActivityLauncher.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/reader/ReaderActivityLauncher.java @@ -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) {