Skip to content

Commit

Permalink
refactor: Remove latestCalendarEventResponse from keepHeavyData()
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Mar 11, 2025
1 parent 2e3208e commit 3b3933f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ val snoozeRefreshStrategy = object : DefaultRefreshStrategy {
draftLocalUuid = localMessage.draftLocalUuid,
),
messageIds = localMessage.messageIds,
latestCalendarEventResponse = localMessage.latestCalendarEventResponse,
)
remoteMessage.keepHeavyData(localMessage)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,13 @@ class ThreadController @Inject constructor(
// The Search only returns Messages from TRASH if we explicitly selected this folder,
// which is the reason why we can compute the `isTrashed` value so loosely.
remoteMessage.initLocalValues(
MessageInitialState(
messageInitialState = MessageInitialState(
isFullyDownloaded = localMessage?.isFullyDownloaded() ?: false,
isTrashed = filterFolder?.role == FolderRole.TRASH,
isFromSearch = localMessage == null,
draftLocalUuid = localMessage?.draftLocalUuid,
),
latestCalendarEventResponse = localMessage?.latestCalendarEventResponse,
)

localMessage?.let(remoteMessage::keepHeavyData)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ class Message : RealmObject {
fun keepHeavyData(message: Message) {
attachments.replaceContent(message.attachments.copyFromRealm())
swissTransferFiles.replaceContent(message.swissTransferFiles.copyFromRealm())
latestCalendarEventResponse = message.latestCalendarEventResponse?.copyFromRealm()
body = message.body?.copyFromRealm()

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

0 comments on commit 3b3933f

Please sign in to comment.