From f6a60cb41123b449d0c2b15fa8db2267c7d0ca3b Mon Sep 17 00:00:00 2001 From: Kevin Boulongne Date: Fri, 7 Mar 2025 11:21:12 +0100 Subject: [PATCH] refactor: Update FolderRole imports --- .../refreshStrategies/InboxRefreshStrategy.kt | 6 +++--- .../refreshStrategies/SnoozeRefreshStrategy.kt | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/infomaniak/mail/data/cache/mailboxContent/refreshStrategies/InboxRefreshStrategy.kt b/app/src/main/java/com/infomaniak/mail/data/cache/mailboxContent/refreshStrategies/InboxRefreshStrategy.kt index 92ef2e1664..56c74b1ff1 100644 --- a/app/src/main/java/com/infomaniak/mail/data/cache/mailboxContent/refreshStrategies/InboxRefreshStrategy.kt +++ b/app/src/main/java/com/infomaniak/mail/data/cache/mailboxContent/refreshStrategies/InboxRefreshStrategy.kt @@ -19,7 +19,7 @@ package com.infomaniak.mail.data.cache.mailboxContent.refreshStrategies import com.infomaniak.mail.data.cache.mailboxContent.ImpactedFolders import com.infomaniak.mail.data.cache.mailboxContent.ThreadController -import com.infomaniak.mail.data.models.Folder +import com.infomaniak.mail.data.models.Folder.FolderRole import com.infomaniak.mail.data.models.thread.Thread import io.realm.kotlin.TypedRealm @@ -28,10 +28,10 @@ val inboxRefreshStrategy = object : DefaultRefreshStrategy { return ThreadController.getInboxThreadsWithSnoozeFilter(withSnooze = false, realm = realm) } - override fun otherFolderRolesToQueryThreads(): List = listOf(Folder.FolderRole.SNOOZED) + override fun otherFolderRolesToQueryThreads(): List = listOf(FolderRole.SNOOZED) override fun addFolderToImpactedFolders(folderId: String, impactedFolders: ImpactedFolders) { impactedFolders += folderId - impactedFolders += Folder.FolderRole.SNOOZED + impactedFolders += FolderRole.SNOOZED } } diff --git a/app/src/main/java/com/infomaniak/mail/data/cache/mailboxContent/refreshStrategies/SnoozeRefreshStrategy.kt b/app/src/main/java/com/infomaniak/mail/data/cache/mailboxContent/refreshStrategies/SnoozeRefreshStrategy.kt index 2c559b9cdd..3f43d0c080 100644 --- a/app/src/main/java/com/infomaniak/mail/data/cache/mailboxContent/refreshStrategies/SnoozeRefreshStrategy.kt +++ b/app/src/main/java/com/infomaniak/mail/data/cache/mailboxContent/refreshStrategies/SnoozeRefreshStrategy.kt @@ -22,7 +22,7 @@ import com.infomaniak.mail.data.cache.mailboxContent.FolderController import com.infomaniak.mail.data.cache.mailboxContent.ImpactedFolders import com.infomaniak.mail.data.cache.mailboxContent.MessageController import com.infomaniak.mail.data.cache.mailboxContent.ThreadController -import com.infomaniak.mail.data.models.Folder +import com.infomaniak.mail.data.models.Folder.FolderRole import com.infomaniak.mail.data.models.mailbox.Mailbox import com.infomaniak.mail.data.models.message.Message import com.infomaniak.mail.data.models.message.Message.MessageInitialState @@ -36,12 +36,12 @@ val snoozeRefreshStrategy = object : DefaultRefreshStrategy { return ThreadController.getInboxThreadsWithSnoozeFilter(withSnooze = true, realm = realm) } - override fun otherFolderRolesToQueryThreads(): List = listOf(Folder.FolderRole.INBOX) + override fun otherFolderRolesToQueryThreads(): List = listOf(FolderRole.INBOX) override fun shouldHideEmptyFolder(): Boolean = true override fun getMessageFromShortUid(shortUid: String, folderId: String, realm: TypedRealm): Message? { - val inboxId = FolderController.getFolder(Folder.FolderRole.INBOX, realm)?.id ?: return null + val inboxId = FolderController.getFolder(FolderRole.INBOX, realm)?.id ?: return null return super.getMessageFromShortUid(shortUid, inboxId, realm) } @@ -61,7 +61,7 @@ val snoozeRefreshStrategy = object : DefaultRefreshStrategy { override fun addFolderToImpactedFolders(folderId: String, impactedFolders: ImpactedFolders) { impactedFolders += folderId - impactedFolders += Folder.FolderRole.INBOX + impactedFolders += FolderRole.INBOX } override fun processDeletedThread(thread: Thread, realm: MutableRealm) = thread.recomputeThread()