Fixes issue #117 - Takes url for GNU social instance
This commit is contained in:
parent
62e48bb8e7
commit
24a82b5252
|
@ -43,6 +43,7 @@ import android.text.SpannableString;
|
|||
import android.text.Spanned;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.text.style.ForegroundColorSpan;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
|
@ -1162,10 +1163,18 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
Intent sendIntent = new Intent(Intent.ACTION_SEND);
|
||||
sendIntent.putExtra(Intent.EXTRA_SUBJECT, context.getString(R.string.shared_via));
|
||||
String url;
|
||||
if( status.getReblog() != null)
|
||||
url = status.getReblog().getUri();
|
||||
else
|
||||
url = status.getUri();
|
||||
|
||||
if( status.getReblog() != null) {
|
||||
if( status.getReblog().getUri().startsWith("http"))
|
||||
url = status.getReblog().getUri();
|
||||
else
|
||||
url = status.getReblog().getUrl();
|
||||
}else {
|
||||
if( status.getUri().startsWith("http"))
|
||||
url = status.getUri();
|
||||
else
|
||||
url = status.getUrl();
|
||||
}
|
||||
sendIntent.putExtra(Intent.EXTRA_TEXT, url);
|
||||
sendIntent.setType("text/plain");
|
||||
context.startActivity(Intent.createChooser(sendIntent, context.getString(R.string.share_with)));
|
||||
|
|
Loading…
Reference in New Issue