Skip to content

Commit

Permalink
fix: Default reply signatures ignored when set as "Identical to new m…
Browse files Browse the repository at this point in the history
…essages" on the web
  • Loading branch information
TommyDL-Infomaniak committed Feb 19, 2025
1 parent cf245cb commit 143b9ff
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/src/main/java/com/infomaniak/mail/utils/SharedUtils.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Infomaniak Mail - Android
* Copyright (C) 2022-2024 Infomaniak Network SA
* Copyright (C) 2022-2025 Infomaniak Network SA
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -172,8 +172,12 @@ class SharedUtils @Inject constructor(
customRealm.write {
MailboxController.getMailbox(mailbox.objectId, realm = this)?.let { mailbox ->
mailbox.signatures = signaturesResult.signatures.toMutableList().apply {
firstOrNull { it.id == signaturesResult.defaultSignatureId }?.isDefault = true
firstOrNull { it.id == signaturesResult.defaultReplySignatureId }?.isDefaultReply = true
val defaultSignatureId = firstOrNull { it.id == signaturesResult.defaultSignatureId }
val defaultReplySignatureId = firstOrNull { it.id == signaturesResult.defaultReplySignatureId }
?: defaultSignatureId

defaultSignatureId?.isDefault = true
defaultReplySignatureId?.isDefaultReply = true
}.toRealmList()
}
}
Expand Down

0 comments on commit 143b9ff

Please sign in to comment.