Don't reset special local folders in SpecialFolderUpdater

This commit is contained in:
cketti 2020-05-15 19:57:56 +02:00
parent 35e5fceb0c
commit c85b56828e
2 changed files with 6 additions and 1 deletions

View file

@ -20,6 +20,11 @@ class FolderRepository(
.thenByDescending { it.isInTopGroup }
.thenBy(String.CASE_INSENSITIVE_ORDER) { it.folder.name }
fun getFolders(): List<Folder> {
val folders = localStoreProvider.getInstance(account).getPersonalNamespaces(false)
return folders.map { Folder(it.databaseId, it.serverId, it.name, it.type.toFolderType(), it.isLocalOnly) }
}
fun getRemoteFolders(): List<Folder> {
val folders = localStoreProvider.getInstance(account).getPersonalNamespaces(false)

View file

@ -16,7 +16,7 @@ class SpecialFolderUpdater(
private val account: Account
) {
fun updateSpecialFolders() {
val folders = folderRepository.getRemoteFolders()
val folders = folderRepository.getFolders()
updateInbox(folders)
updateSpecialFolder(FolderType.ARCHIVE, folders)