markdown: now markdown mode is restored from drafts
This commit is contained in:
parent
64b488e825
commit
dfee6f1f98
|
@ -561,7 +561,8 @@ public final class ComposeActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
if(intent.hasExtra(MARKDOWN_MODE_EXTRA)) {
|
if(intent.hasExtra(MARKDOWN_MODE_EXTRA)) {
|
||||||
enableMarkdownMode(intent.getBooleanExtra(MARKDOWN_MODE_EXTRA, false));
|
// button will be activated later, when we get instance info
|
||||||
|
markdownMode = intent.getBooleanExtra(MARKDOWN_MODE_EXTRA, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -865,6 +866,7 @@ public final class ComposeActivity
|
||||||
emojiButton.setClickable(false);
|
emojiButton.setClickable(false);
|
||||||
hideMediaToggle.setClickable(false);
|
hideMediaToggle.setClickable(false);
|
||||||
scheduleButton.setClickable(false);
|
scheduleButton.setClickable(false);
|
||||||
|
markdownButton.setClickable(false);
|
||||||
tootButton.setEnabled(false);
|
tootButton.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -874,6 +876,7 @@ public final class ComposeActivity
|
||||||
emojiButton.setClickable(true);
|
emojiButton.setClickable(true);
|
||||||
hideMediaToggle.setClickable(true);
|
hideMediaToggle.setClickable(true);
|
||||||
scheduleButton.setClickable(true);
|
scheduleButton.setClickable(true);
|
||||||
|
markdownButton.setClickable(true);
|
||||||
tootButton.setEnabled(true);
|
tootButton.setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1903,7 +1906,8 @@ public final class ComposeActivity
|
||||||
getIntent().getStringExtra(REPLYING_STATUS_CONTENT_EXTRA),
|
getIntent().getStringExtra(REPLYING_STATUS_CONTENT_EXTRA),
|
||||||
getIntent().getStringExtra(REPLYING_STATUS_AUTHOR_USERNAME_EXTRA),
|
getIntent().getStringExtra(REPLYING_STATUS_AUTHOR_USERNAME_EXTRA),
|
||||||
statusVisibility,
|
statusVisibility,
|
||||||
poll);
|
poll,
|
||||||
|
markdownMode);
|
||||||
finishWithoutSlideOutAnimation();
|
finishWithoutSlideOutAnimation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2040,6 +2044,7 @@ public final class ComposeActivity
|
||||||
if ((isPleroma = instance.isPleroma())) {
|
if ((isPleroma = instance.isPleroma())) {
|
||||||
// TODO: implement nodeinfo later
|
// TODO: implement nodeinfo later
|
||||||
enableButton(markdownButton, true, true);
|
enableButton(markdownButton, true, true);
|
||||||
|
enableMarkdownMode(markdownMode);
|
||||||
|
|
||||||
// we always can add new poll but only one
|
// we always can add new poll but only one
|
||||||
if (poll == null)
|
if (poll == null)
|
||||||
|
|
|
@ -164,6 +164,7 @@ public final class SavedTootActivity extends BaseActivity implements SavedTootAd
|
||||||
.replyingStatusContent(item.getInReplyToText())
|
.replyingStatusContent(item.getInReplyToText())
|
||||||
.visibility(item.getVisibility())
|
.visibility(item.getVisibility())
|
||||||
.poll(item.getPoll())
|
.poll(item.getPoll())
|
||||||
|
.markdownMode(item.getMarkdownMode())
|
||||||
.build(this);
|
.build(this);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
|
@ -261,7 +261,8 @@ class SendTootService : Service(), Injectable {
|
||||||
toot.replyingStatusContent,
|
toot.replyingStatusContent,
|
||||||
toot.replyingStatusAuthorUsername,
|
toot.replyingStatusAuthorUsername,
|
||||||
Status.Visibility.byString(toot.visibility),
|
Status.Visibility.byString(toot.visibility),
|
||||||
toot.poll)
|
toot.poll,
|
||||||
|
toot.markdownMode)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun cancelSendingIntent(tootId: Int): PendingIntent {
|
private fun cancelSendingIntent(tootId: Int): PendingIntent {
|
||||||
|
|
|
@ -51,7 +51,8 @@ public final class SaveTootHelper {
|
||||||
@Nullable String replyingStatusContent,
|
@Nullable String replyingStatusContent,
|
||||||
@Nullable String replyingStatusAuthorUsername,
|
@Nullable String replyingStatusAuthorUsername,
|
||||||
@NonNull Status.Visibility statusVisibility,
|
@NonNull Status.Visibility statusVisibility,
|
||||||
@Nullable NewPoll poll) {
|
@Nullable NewPoll poll,
|
||||||
|
@Nullable Boolean markdownMode) {
|
||||||
|
|
||||||
if (TextUtils.isEmpty(content) && mediaUris.isEmpty() && poll == null) {
|
if (TextUtils.isEmpty(content) && mediaUris.isEmpty() && poll == null) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -89,7 +90,7 @@ public final class SaveTootHelper {
|
||||||
replyingStatusContent,
|
replyingStatusContent,
|
||||||
replyingStatusAuthorUsername,
|
replyingStatusAuthorUsername,
|
||||||
statusVisibility,
|
statusVisibility,
|
||||||
poll);
|
poll, markdownMode);
|
||||||
|
|
||||||
new AsyncTask<Void, Void, Void>() {
|
new AsyncTask<Void, Void, Void>() {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue