inherit content warnings in replys
This commit is contained in:
parent
632cb0d6e3
commit
50d386e271
@ -369,6 +369,7 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFrag
|
||||
|
||||
String startingVisibility;
|
||||
boolean startingHideText;
|
||||
String startingContentWarning = null;
|
||||
ArrayList<SavedQueuedMedia> savedMediaQueued = null;
|
||||
if (savedInstanceState != null) {
|
||||
showMarkSensitive = savedInstanceState.getBoolean("showMarkSensitive");
|
||||
@ -411,6 +412,13 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFrag
|
||||
}
|
||||
|
||||
mentionedUsernames = intent.getStringArrayExtra("mentioned_usernames");
|
||||
|
||||
if(inReplyToId != null) {
|
||||
startingHideText = !intent.getStringExtra("content_warning").equals("");
|
||||
if(startingHideText){
|
||||
startingContentWarning = intent.getStringExtra("content_warning");
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Only after the starting visibility is determined and the send button is initialised can
|
||||
* the status visibility be set. */
|
||||
@ -476,6 +484,10 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFrag
|
||||
});
|
||||
showContentWarning(startingHideText);
|
||||
|
||||
if(startingContentWarning != null){
|
||||
contentWarningEditor.setText(startingContentWarning);
|
||||
}
|
||||
|
||||
statusAlreadyInFlight = false;
|
||||
|
||||
// These can only be added after everything affected by the media queue is initialized.
|
||||
|
@ -66,6 +66,7 @@ public class SFragment extends BaseFragment {
|
||||
String inReplyToId = status.getActionableId();
|
||||
Status actionableStatus = status.getActionableStatus();
|
||||
String replyVisibility = actionableStatus.getVisibility().toString().toLowerCase();
|
||||
String contentWarning = actionableStatus.spoilerText;
|
||||
Status.Mention[] mentions = actionableStatus.mentions;
|
||||
List<String> mentionedUsernames = new ArrayList<>();
|
||||
for (Status.Mention mention : mentions) {
|
||||
@ -76,6 +77,7 @@ public class SFragment extends BaseFragment {
|
||||
Intent intent = new Intent(getContext(), ComposeActivity.class);
|
||||
intent.putExtra("in_reply_to_id", inReplyToId);
|
||||
intent.putExtra("reply_visibility", replyVisibility);
|
||||
intent.putExtra("content_warning", contentWarning);
|
||||
intent.putExtra("mentioned_usernames", mentionedUsernames.toArray(new String[0]));
|
||||
startActivity(intent);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user