Persist Markdown setting

This commit is contained in:
M66B 2024-02-22 09:47:55 +01:00
parent f6895c1ff8
commit c152a5c3ca
1 changed files with 6 additions and 0 deletions

View File

@ -2343,6 +2343,8 @@ public class FragmentCompose extends FragmentBase {
private void onMenuMarkdown() {
markdown = !markdown;
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
prefs.edit().putBoolean("markdown", markdown).apply();
Bundle args = new Bundle();
args.putBoolean("markdown", true);
@ -5611,6 +5613,10 @@ public class FragmentCompose extends FragmentBase {
}
}
boolean markdown = prefs.getBoolean("markdown", false);
if (markdown)
document.body().attr("markdown", Boolean.toString(markdown));
data.draft.signature = prefs.getBoolean("signature_new", true);
addSignature(context, document, data.draft, selected);
} else {