Merge pull request #5668 from k9mail/reply_to_header_in_drafts
Load Reply-To header from draft messages
This commit is contained in:
commit
d061e5aab5
2 changed files with 9 additions and 0 deletions
|
@ -1373,6 +1373,7 @@ public class MessageCompose extends K9Activity implements OnClickListener,
|
|||
draftMessageId = messagingController.getId(message);
|
||||
subjectView.setText(messageViewInfo.subject);
|
||||
|
||||
replyToPresenter.initFromDraftMessage(message);
|
||||
recipientPresenter.initFromDraftMessage(message);
|
||||
|
||||
// Read In-Reply-To header from draft
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.fsck.k9.activity.compose
|
|||
import android.os.Bundle
|
||||
import com.fsck.k9.Identity
|
||||
import com.fsck.k9.mail.Address
|
||||
import com.fsck.k9.mail.Message
|
||||
|
||||
private const val STATE_KEY_REPLY_TO_SHOWN = "com.fsck.k9.activity.compose.ReplyToPresenter.replyToShown"
|
||||
|
||||
|
@ -10,6 +11,13 @@ class ReplyToPresenter(private val view: ReplyToView) {
|
|||
private lateinit var identity: Identity
|
||||
private var identityReplyTo: Array<Address>? = null
|
||||
|
||||
fun initFromDraftMessage(message: Message) {
|
||||
message.replyTo.takeIf { it.isNotEmpty() }?.let { addresses ->
|
||||
view.silentlyAddAddresses(addresses)
|
||||
view.isVisible = true
|
||||
}
|
||||
}
|
||||
|
||||
fun getAddresses(): Array<Address> {
|
||||
return view.getAddresses()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue