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:
parent
3cd270818a
commit
aae2721e01
@ -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)
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user