Share only the link of the post instead of title + link. Version 1.6.2.

This commit is contained in:
Alex Ning 2019-12-06 11:02:58 +08:00
parent 3d93cb37b9
commit f7eaa7ca06
4 changed files with 7 additions and 12 deletions

View File

@ -6,8 +6,8 @@ android {
applicationId "ml.docilealligator.infinityforreddit"
minSdkVersion 21
targetSdkVersion 29
versionCode 23
versionName "1.6.1"
versionCode 24
versionName "1.6.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {

View File

@ -917,8 +917,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
try {
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
String extraText = comment.getPermalink();
intent.putExtra(Intent.EXTRA_TEXT, extraText);
intent.putExtra(Intent.EXTRA_TEXT, comment.getPermalink());
mActivity.startActivity(Intent.createChooser(intent, mActivity.getString(R.string.share)));
} catch (ActivityNotFoundException e) {
Toast.makeText(mActivity, R.string.no_activity_found_for_share, Toast.LENGTH_SHORT).show();
@ -1623,8 +1622,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
try {
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
String extraText = mPost.getTitle() + "\n" + mPost.getPermalink();
intent.putExtra(Intent.EXTRA_TEXT, extraText);
intent.putExtra(Intent.EXTRA_TEXT, mPost.getPermalink());
mActivity.startActivity(Intent.createChooser(intent, mActivity.getString(R.string.share)));
} catch (ActivityNotFoundException e) {
Toast.makeText(mActivity, R.string.no_activity_found_for_share, Toast.LENGTH_SHORT).show();

View File

@ -204,8 +204,7 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
try {
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
String extraText = comment.getPermalink();
intent.putExtra(Intent.EXTRA_TEXT, extraText);
intent.putExtra(Intent.EXTRA_TEXT, comment.getPermalink());
mContext.startActivity(Intent.createChooser(intent, mContext.getString(R.string.share)));
} catch (ActivityNotFoundException e) {
Toast.makeText(mContext, R.string.no_activity_found_for_share, Toast.LENGTH_SHORT).show();

View File

@ -710,8 +710,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
try {
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
String extraText = title + "\n" + permalink;
intent.putExtra(Intent.EXTRA_TEXT, extraText);
intent.putExtra(Intent.EXTRA_TEXT, permalink);
mContext.startActivity(Intent.createChooser(intent, mContext.getString(R.string.share)));
} catch (ActivityNotFoundException e) {
Toast.makeText(mContext, R.string.no_activity_found_for_share, Toast.LENGTH_SHORT).show();
@ -1255,8 +1254,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
try {
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
String extraText = title + "\n" + permalink;
intent.putExtra(Intent.EXTRA_TEXT, extraText);
intent.putExtra(Intent.EXTRA_TEXT, permalink);
mContext.startActivity(Intent.createChooser(intent, mContext.getString(R.string.share)));
} catch (ActivityNotFoundException e) {
Toast.makeText(mContext, R.string.no_activity_found_for_share, Toast.LENGTH_SHORT).show();