From d5092f50f6b635dbb2a5b50fdd32d3e01dcb876b Mon Sep 17 00:00:00 2001 From: Balazs Toldi Date: Fri, 18 Aug 2023 21:26:12 +0200 Subject: [PATCH] Fix issue with sharing urls Closes #139 --- .../activities/ViewSubredditDetailActivity.java | 2 +- .../infinityforlemmy/activities/ViewUserDetailActivity.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/activities/ViewSubredditDetailActivity.java b/app/src/main/java/eu/toldi/infinityforlemmy/activities/ViewSubredditDetailActivity.java index 47d6143e..146b7c78 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/activities/ViewSubredditDetailActivity.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/activities/ViewSubredditDetailActivity.java @@ -1219,7 +1219,7 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.setType("text/plain"); String baseURL = mRetrofit.getBaseURL().endsWith("/") ? mRetrofit.getBaseURL() : mRetrofit.getBaseURL() + "/"; - shareIntent.putExtra(Intent.EXTRA_TEXT, baseURL + "/" + qualifiedName); + shareIntent.putExtra(Intent.EXTRA_TEXT, baseURL + "c/" + qualifiedName); if (shareIntent.resolveActivity(getPackageManager()) != null) { startActivity(Intent.createChooser(shareIntent, getString(R.string.share))); } else { diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/activities/ViewUserDetailActivity.java b/app/src/main/java/eu/toldi/infinityforlemmy/activities/ViewUserDetailActivity.java index dfced343..e5ee5e0f 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/activities/ViewUserDetailActivity.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/activities/ViewUserDetailActivity.java @@ -1255,7 +1255,7 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.setType("text/plain"); String baseURL = mRetrofit.getBaseURL().endsWith("/") ? mRetrofit.getBaseURL() : mRetrofit.getBaseURL() + "/"; - shareIntent.putExtra(Intent.EXTRA_TEXT, baseURL + qualifiedName); + shareIntent.putExtra(Intent.EXTRA_TEXT, baseURL + "u/" + qualifiedName); if (shareIntent.resolveActivity(getPackageManager()) != null) { startActivity(Intent.createChooser(shareIntent, getString(R.string.share))); } else {