Fix validation error with chat folder export.

This commit is contained in:
Greyson Parrelli
2025-10-27 11:57:35 -04:00
committed by jeffrey-signal
parent 0b27c42e89
commit 17e7b1735f

View File

@@ -113,10 +113,10 @@ object ChatFolderArchiveProcessor {
private fun ChatFolderRecord.toBackupFrame(includedRecipientIds: List<Long>, excludedRecipientIds: List<Long>): Frame {
val chatFolder = ChatFolderProto(
name = this.name,
showOnlyUnread = this.showUnread,
showMutedChats = this.showMutedChats,
includeAllIndividualChats = this.showIndividualChats,
includeAllGroupChats = this.showGroupChats,
showOnlyUnread = this.showUnread && this.folderType != ChatFolderRecord.FolderType.ALL,
showMutedChats = this.showMutedChats || this.folderType == ChatFolderRecord.FolderType.ALL,
includeAllIndividualChats = this.showIndividualChats || this.folderType == ChatFolderRecord.FolderType.ALL,
includeAllGroupChats = this.showGroupChats || this.folderType == ChatFolderRecord.FolderType.ALL,
folderType = when (this.folderType) {
ChatFolderRecord.FolderType.ALL -> ChatFolderProto.FolderType.ALL
ChatFolderRecord.FolderType.CUSTOM -> ChatFolderProto.FolderType.CUSTOM