mirror of
https://github.com/tuskyapp/Tusky
synced 2024-12-17 19:39:05 +01:00
Merge branch 'inherit_warnings' of https://github.com/ntngrtltr/Tusky into ntngrtltr-inherit_warnings
This commit is contained in:
commit
2ba35fae35
@ -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