Skip to content

Commit 8101bf8

Browse files
committed
refactor(mailstore): remove duplicate integrate property from PartialUpdatableFolderDetails
The `integrate` property was redundant with `includeInUnifiedInbox` and has been replaced throughout the codebase.
1 parent 73f99aa commit 8101bf8

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

feature/mail/folder/api/src/commonMain/kotlin/net/thunderbird/feature/mail/folder/api/data/repository/FolderDetailsRepository.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ interface FolderDetailsRepository {
3434
data class PartialUpdatableFolderDetails(
3535
val folderId: Long,
3636
val includeInUnifiedInbox: Boolean? = null,
37-
val integrate: Boolean? = null,
3837
val syncEnabled: Boolean? = null,
3938
val visible: Boolean? = null,
4039
val notificationsEnabled: Boolean? = null,

legacy/mailstore/src/main/java/app/k9mail/legacy/mailstore/folder/DefaultFolderDetailsRepository.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ class DefaultFolderDetailsRepository(
123123
val folderId = folderDetails.folderId
124124
logger.verbose { "$LOG_ID executing partial update of folder '$folderId'" }
125125
messageStore.apply {
126-
val integrate = folderDetails.integrate
126+
val includeInUnifiedInbox = folderDetails.includeInUnifiedInbox
127127
val syncEnabled = folderDetails.syncEnabled
128128
val visible = folderDetails.visible
129129
val notificationsEnabled = folderDetails.notificationsEnabled
130130
val pushEnabled = folderDetails.isPushEnabled
131131

132-
if (integrate != null) {
133-
logger.verbose { "$LOG_ID updating 'integrate' to '$integrate' of folder '$folderId'" }
134-
setIncludeInUnifiedInbox(folderId = folderId, includeInUnifiedInbox = integrate)
132+
if (includeInUnifiedInbox != null) {
133+
logger.verbose { "$LOG_ID updating 'integrate' to '$includeInUnifiedInbox' of folder '$folderId'" }
134+
setIncludeInUnifiedInbox(folderId = folderId, includeInUnifiedInbox = includeInUnifiedInbox)
135135
}
136136
if (syncEnabled != null) {
137137
logger.verbose { "$LOG_ID updating 'sync_enabled' to '$syncEnabled' of folder '$folderId'" }

legacy/mailstore/src/test/java/app/k9mail/legacy/mailstore/folder/DefaultFolderDetailsRepositoryTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ class DefaultFolderDetailsRepositoryTest {
234234
// Arrange
235235
val partialUpdate = PartialUpdatableFolderDetails(
236236
folderId = REGULAR_FOLDER_ID,
237-
integrate = true,
237+
includeInUnifiedInbox = true,
238238
syncEnabled = false,
239239
visible = true,
240240
notificationsEnabled = false,

0 commit comments

Comments
 (0)