We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ea38c1c + fc83ab1 commit 97819a4Copy full SHA for 97819a4
app/src/main/java/com/infomaniak/mail/ui/newMessage/NewMessageViewModel.kt
@@ -633,6 +633,7 @@ class NewMessageViewModel @Inject constructor(
633
private fun saveDraftToLocal(action: DraftAction) {
634
SentryLog.d("Draft", "Save Draft to local")
635
636
+ draft.subject = draft.subject?.take(SUBJECT_MAX_LENGTH)
637
draft.body = draft.uiBody.textToHtml() + (draft.uiSignature ?: "") + (draft.uiQuote ?: "")
638
draft.action = action
639
@@ -733,5 +734,6 @@ class NewMessageViewModel @Inject constructor(
733
734
companion object {
735
private const val DELAY_BEFORE_AUTO_SAVING_DRAFT = 1_000L
736
private const val FILE_SIZE_25_MB = 25L * 1_024L * 1_024L
737
+ private const val SUBJECT_MAX_LENGTH = 998
738
}
739
0 commit comments