mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-27 03:18:24 +01:00
Minor fix for sharing users/communities
This commit is contained in:
parent
40b6722e66
commit
72ba41c940
@ -1174,7 +1174,8 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
|||||||
} else if (itemId == R.id.action_share_view_subreddit_detail_activity) {
|
} else if (itemId == R.id.action_share_view_subreddit_detail_activity) {
|
||||||
Intent shareIntent = new Intent(Intent.ACTION_SEND);
|
Intent shareIntent = new Intent(Intent.ACTION_SEND);
|
||||||
shareIntent.setType("text/plain");
|
shareIntent.setType("text/plain");
|
||||||
shareIntent.putExtra(Intent.EXTRA_TEXT, mRetrofit.getBaseURL() + qualifiedName);
|
String baseURL = mRetrofit.getBaseURL().endsWith("/") ? mRetrofit.getBaseURL() : mRetrofit.getBaseURL() + "/";
|
||||||
|
shareIntent.putExtra(Intent.EXTRA_TEXT, baseURL + "/" + qualifiedName);
|
||||||
if (shareIntent.resolveActivity(getPackageManager()) != null) {
|
if (shareIntent.resolveActivity(getPackageManager()) != null) {
|
||||||
startActivity(Intent.createChooser(shareIntent, getString(R.string.share)));
|
startActivity(Intent.createChooser(shareIntent, getString(R.string.share)));
|
||||||
} else {
|
} else {
|
||||||
|
@ -1154,7 +1154,8 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
|
|||||||
} else if (itemId == R.id.action_share_view_user_detail_activity) {
|
} else if (itemId == R.id.action_share_view_user_detail_activity) {
|
||||||
Intent shareIntent = new Intent(Intent.ACTION_SEND);
|
Intent shareIntent = new Intent(Intent.ACTION_SEND);
|
||||||
shareIntent.setType("text/plain");
|
shareIntent.setType("text/plain");
|
||||||
shareIntent.putExtra(Intent.EXTRA_TEXT, mRetrofit.getBaseURL() + qualifiedName);
|
String baseURL = mRetrofit.getBaseURL().endsWith("/") ? mRetrofit.getBaseURL() : mRetrofit.getBaseURL() + "/";
|
||||||
|
shareIntent.putExtra(Intent.EXTRA_TEXT, baseURL + qualifiedName);
|
||||||
if (shareIntent.resolveActivity(getPackageManager()) != null) {
|
if (shareIntent.resolveActivity(getPackageManager()) != null) {
|
||||||
startActivity(Intent.createChooser(shareIntent, getString(R.string.share)));
|
startActivity(Intent.createChooser(shareIntent, getString(R.string.share)));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user