Skip to content

Commit 3f3d671

Browse files
Apply suggestions from code review
Co-authored-by: Fabian Devel <[email protected]>
1 parent 605335f commit 3f3d671

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

app/src/main/java/com/infomaniak/mail/ui/main/move/MoveAdapter.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ class MoveAdapter @Inject constructor() : ListAdapter<Any, MoveFolderViewHolder>
6060

6161
selectedFolderId = newSelectedFolderId
6262

63-
var shouldForceNotify = false
64-
if (newShouldDisplayIndent != shouldDisplayIndent) shouldForceNotify = true
63+
val shouldForceNotify = newShouldDisplayIndent != shouldDisplayIndent
6564
shouldDisplayIndent = newShouldDisplayIndent
6665

6766
submitList(newFolders)

app/src/main/java/com/infomaniak/mail/ui/main/move/MoveViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class MoveViewModel @Inject constructor(
6969
allFolders = folderController.getMoveFolders()
7070
.flattenFolderChildrenAndRemoveMessages()
7171
.addDividerBeforeFirstCustomFolder(dividerType = Unit)
72-
.also { filterResults.postValue(it to true) }
72+
.also { folders -> filterResults.postValue(folders to true) }
7373
}
7474
}
7575

0 commit comments

Comments
 (0)