Skip to content

Commit 3b3933f

Browse files
refactor: Remove latestCalendarEventResponse from keepHeavyData()
1 parent 2e3208e commit 3b3933f

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

app/src/main/java/com/infomaniak/mail/data/cache/mailboxContent/CustomRefreshStrategies.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ val snoozeRefreshStrategy = object : DefaultRefreshStrategy {
9999
draftLocalUuid = localMessage.draftLocalUuid,
100100
),
101101
messageIds = localMessage.messageIds,
102+
latestCalendarEventResponse = localMessage.latestCalendarEventResponse,
102103
)
103104
remoteMessage.keepHeavyData(localMessage)
104105
}

app/src/main/java/com/infomaniak/mail/data/cache/mailboxContent/ThreadController.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,13 @@ class ThreadController @Inject constructor(
108108
// The Search only returns Messages from TRASH if we explicitly selected this folder,
109109
// which is the reason why we can compute the `isTrashed` value so loosely.
110110
remoteMessage.initLocalValues(
111-
MessageInitialState(
111+
messageInitialState = MessageInitialState(
112112
isFullyDownloaded = localMessage?.isFullyDownloaded() ?: false,
113113
isTrashed = filterFolder?.role == FolderRole.TRASH,
114114
isFromSearch = localMessage == null,
115115
draftLocalUuid = localMessage?.draftLocalUuid,
116116
),
117+
latestCalendarEventResponse = localMessage?.latestCalendarEventResponse,
117118
)
118119

119120
localMessage?.let(remoteMessage::keepHeavyData)

app/src/main/java/com/infomaniak/mail/data/models/message/Message.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ class Message : RealmObject {
265265
fun keepHeavyData(message: Message) {
266266
attachments.replaceContent(message.attachments.copyFromRealm())
267267
swissTransferFiles.replaceContent(message.swissTransferFiles.copyFromRealm())
268-
latestCalendarEventResponse = message.latestCalendarEventResponse?.copyFromRealm()
269268
body = message.body?.copyFromRealm()
270269

271270
// TODO: Those are unused for now, but if we ever want to use them, we need to save them here.

0 commit comments

Comments
 (0)