"Edit as new mail" after send fail always sets the identity to default identity?
Checklist
- [x] I have used the search function to see if someone else has already submitted the same bug report.
- [x] I will describe the problem with as much detail as possible.
App
Thunderbird for Android
App version
18.0b2
Where did you get the app from?
F-Droid
Android version
12
Device model
No response
Steps to reproduce
- Make sure you have 2 identities, one of which is the default.
- Turn off your device's network.
- Compose and send a mail with an identity that's not the default.
- Find the mail in the sending box, and choose "edit as new mail".
- Hit send button.
- View mail in sending box.
Expected behavior
The mail uses the identity that's not the default.
Actual behavior
The mail uses the default identity.
Logs
No response
I guess that's a design choice but I too feel it should assume the original ("copied") mail's addressees.
@mgw2013 For context I asked on the forum if it's designed behavior but no one seems to know. No answers.
I was able to confirm this. Adding a second identity to my account, filling out the email, and finding it in the inbox later does seem to produce the default identity instead of the selected non-default identity. It does seem to pull over the reply to field correctly, but would still send from the initial identity. Good catch!
I found this bug in the sent mail folder too. If you click "Edit as new message" for an email you sent with a secondary identity, the default identity is shown instead. The same issue occurs when clicking the message header of an email you sent with a second identity because a bottom sheet is shown that displays the initial identity as the sender.
I would like to get permission to work on this issue. I would use a debugger to understand the issue in more detail, and to modify the relevant code.
From my findings so far, the findIdentity method in LegacyAccountDto.kt is at least part of the problem because it isn't taking into account the personal field of the passed in Address object, but only the address field. What ends up happening is that the first identity that matches the address of the Address object gets returned, and that's the default identity. There's no chance for a non-default identity to be returned when it has the same email address as the default identity.
@Synchronized
fun findIdentity(address: Address): Identity? {
return identities.find { identity ->
identity.email.equals(address.address, ignoreCase = true)
identity.name.equals(address.personal, ignoreCase = true) // new line: takes into account the personal field of the passed in Address
}
}
I would like to get permission to work on this issue. I would use a debugger to understand the issue in more detail, and to modify the relevant code.
From my findings so far, the
findIdentitymethod inLegacyAccountDto.ktis at least part of the problem because it isn't taking into account thepersonalfield of the passed inAddressobject, but only theaddressfield. What ends up happening is that the first identity that matches theaddressof theAddressobject gets returned, and that's the default identity. There's no chance for a non-default identity to be returned when it has the same email address as the default identity.@Synchronized fun findIdentity(address: Address): Identity? { return identities.find { identity -> identity.email.equals(address.address, ignoreCase = true) identity.name.equals(address.personal, ignoreCase = true) // new line: takes into account the personal field of the passed in Address } }
Thanks for getting interested in working on this. I've assigned the ticket to you! Feel free to contact us if you have any questions
I appreciate the opportunity! Just to give an update, I have a working solution, but I still need to work on the tests.