Only put the status for reblog. That avoids too much management

This commit is contained in:
stom79 2019-02-23 09:14:09 +01:00
parent 860d52d384
commit bf702b742e
2 changed files with 12 additions and 14 deletions

View File

@ -132,19 +132,11 @@ public class CustomSharingActivity extends BaseActivity implements OnCustomShari
} }
if (status.getReblog() != null) { bundle_url = status.getUrl();
bundle_url = status.getReblog().getUrl(); bundle_id = status.getUri();
bundle_id = status.getReblog().getUri(); bundle_source = status.getAccount().getAcct();
bundle_source = status.getReblog().getAccount().getAcct(); bundle_tags = status.getTagsString();
bundle_tags = status.getReblog().getTagsString(); bundle_content = formatedContent(status.getContent(), status.getEmojis());
bundle_content = formatedContent(status.getReblog().getContent(), status.getReblog().getEmojis());
} else {
bundle_url = status.getUrl();
bundle_id = status.getUri();
bundle_source = status.getAccount().getAcct();
bundle_tags = status.getTagsString();
bundle_content = formatedContent(status.getContent(), status.getEmojis());
}
if (!bundle_source.contains("@")) { if (!bundle_source.contains("@")) {
bundle_source = bundle_source + "@" + account.getInstance(); bundle_source = bundle_source + "@" + account.getInstance();
@ -252,6 +244,7 @@ public class CustomSharingActivity extends BaseActivity implements OnCustomShari
paramFound = true; paramFound = true;
builder.appendQueryParameter(param_name, keywords); builder.appendQueryParameter(param_name, keywords);
break; break;
} }
if (!paramFound) { if (!paramFound) {
builder.appendQueryParameter(param_name, param_value); builder.appendQueryParameter(param_name, param_value);

View File

@ -2259,7 +2259,12 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
case R.id.action_custom_sharing: case R.id.action_custom_sharing:
Intent intentCustomSharing = new Intent(context, CustomSharingActivity.class); Intent intentCustomSharing = new Intent(context, CustomSharingActivity.class);
Bundle bCustomSharing = new Bundle(); Bundle bCustomSharing = new Bundle();
bCustomSharing.putParcelable("status", status); if (status.getReblog() != null) {
bCustomSharing.putParcelable("status", status.getReblog());
} else {
bCustomSharing.putParcelable("status", status);
}
intentCustomSharing.putExtras(bCustomSharing); intentCustomSharing.putExtras(bCustomSharing);
context.startActivity(intentCustomSharing); context.startActivity(intentCustomSharing);
return true; return true;