File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
app/src/main/java/com/infomaniak/mail/utils/extensions Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -421,15 +421,11 @@ fun List<Folder>.addDividerBeforeFirstCustomFolder(dividerType: Any): List<Any>
421
421
fun List<Message>.getFoldersIds (exception : String? = null): ImpactedFolders {
422
422
val impactedFolders = ImpactedFolders ()
423
423
424
- forEach { message ->
425
- when {
426
- message.folderId == exception -> Unit
427
- message.snoozeState == SnoozeState .Snoozed -> {
428
- impactedFolders + = message.folderId
429
- impactedFolders + = FolderRole .SNOOZED
430
- }
431
- else -> impactedFolders + = message.folderId
432
- }
424
+ for (message in this ) {
425
+ if (message.folderId == exception) continue
426
+
427
+ impactedFolders + = message.folderId
428
+ if (message.snoozeState == SnoozeState .Snoozed ) impactedFolders + = FolderRole .SNOOZED
433
429
}
434
430
435
431
return impactedFolders
You can’t perform that action at this time.
0 commit comments