@@ -1011,30 +1011,32 @@ public static void openSystemShareSheet(Context context, Object obj){
10111011 Intent intent =new Intent (Intent .ACTION_SEND );
10121012 intent .setType ("text/plain" );
10131013 Account account ;
1014- String url ;
1014+ String text ;
10151015 String previewTitle ;
10161016
10171017 if (obj instanceof Account acc ){
10181018 account =acc ;
1019- url =acc .url ;
1019+ text =acc .url ;
10201020 previewTitle =context .getString (R .string .share_sheet_preview_profile , account .displayName );
10211021 }else if (obj instanceof Status st ){
10221022 account =st .account ;
1023- url =st .url ;
10241023 String postText =st .getStrippedText ();
10251024 if (TextUtils .isEmpty (postText )){
10261025 previewTitle =context .getString (R .string .share_sheet_preview_profile , account .displayName );
1026+ text =st .url ;
10271027 }else {
10281028 if (postText .length ()>100 )
10291029 postText =postText .substring (0 , 100 )+"..." ;
10301030 previewTitle =context .getString (R .string .share_sheet_preview_post , account .displayName , postText );
1031+ text =context .getString (R .string .share_sheet_post , account .displayName , postText , st .url );
10311032 }
10321033 }else {
10331034 throw new IllegalArgumentException ("Unsupported share object type" );
10341035 }
10351036
1036- intent .putExtra (Intent .EXTRA_TEXT , url );
1037+ intent .putExtra (Intent .EXTRA_TEXT , text );
10371038 intent .putExtra (Intent .EXTRA_TITLE , previewTitle );
1039+ intent .putExtra (Intent .EXTRA_SUBJECT , previewTitle );
10381040 ImageCache cache =ImageCache .getInstance (context );
10391041 try {
10401042 File ava =cache .getFile (new UrlImageLoaderRequest (account .avatarStatic ));
0 commit comments