0
0
mirror of https://github.com/thunderbird/thunderbird-android.git synced 2024-09-19 19:52:14 +02:00

Change getDisplayFoldersFlow from Account to account uuid

This commit is contained in:
Wolf-Martell Montwé 2024-09-09 18:41:07 +02:00
parent 3cd270818a
commit aae2721e01
No known key found for this signature in database
GPG Key ID: 6D45B21512ACBF72
3 changed files with 4 additions and 4 deletions

View File

@ -91,8 +91,8 @@ class FolderRepository(
.flowOn(ioDispatcher)
}
fun getDisplayFoldersFlow(account: Account): Flow<List<DisplayFolder>> {
return accountManager.getAccountFlow(account.uuid)
fun getDisplayFoldersFlow(accountUuid: String): Flow<List<DisplayFolder>> {
return accountManager.getAccountFlow(accountUuid)
.map { latestAccount ->
AccountContainer(latestAccount, latestAccount.folderDisplayMode)
}

View File

@ -33,7 +33,7 @@ class FoldersViewModel(
if (account == null) {
flowOf(0 to emptyList())
} else {
folderRepository.getDisplayFoldersFlow(account)
folderRepository.getDisplayFoldersFlow(account.uuid)
.map { displayFolders ->
account.accountNumber to displayFolders
}

View File

@ -9,6 +9,6 @@ import app.k9mail.legacy.mailstore.FolderRepository
class ManageFoldersViewModel(private val folderRepository: FolderRepository) : ViewModel() {
fun getFolders(account: Account): LiveData<List<DisplayFolder>> {
return folderRepository.getDisplayFoldersFlow(account).asLiveData()
return folderRepository.getDisplayFoldersFlow(account.uuid).asLiveData()
}
}