diff --git a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/DomainContract.kt b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/DomainContract.kt index 61d6fcc9bd..dec8f13f82 100644 --- a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/DomainContract.kt +++ b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/DomainContract.kt @@ -7,7 +7,7 @@ interface DomainContract { interface UseCase { fun interface GetDisplayAccounts { - fun execute(): Flow> + operator fun invoke(): Flow> } } } diff --git a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/usecase/GetDisplayAccounts.kt b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/usecase/GetDisplayAccounts.kt index 7327e90c47..17e1435a00 100644 --- a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/usecase/GetDisplayAccounts.kt +++ b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/domain/usecase/GetDisplayAccounts.kt @@ -27,7 +27,7 @@ class GetDisplayAccounts( ) : UseCase.GetDisplayAccounts { @OptIn(ExperimentalCoroutinesApi::class) - override fun execute(): Flow> { + override fun invoke(): Flow> { return accountManager.getAccountsFlow() .flatMapLatest { accounts -> val messageCountsFlows: List> = accounts.map { account -> diff --git a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/legacy/AccountsViewModel.kt b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/legacy/AccountsViewModel.kt index ca630d6bab..351a9107d0 100644 --- a/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/legacy/AccountsViewModel.kt +++ b/feature/navigation/drawer/src/main/kotlin/app/k9mail/feature/navigation/drawer/legacy/AccountsViewModel.kt @@ -9,5 +9,5 @@ import app.k9mail.feature.navigation.drawer.domain.entity.DisplayAccount class AccountsViewModel( getDisplayAccounts: UseCase.GetDisplayAccounts, ) : ViewModel() { - val displayAccountsLiveData: LiveData> = getDisplayAccounts.execute().asLiveData() + val displayAccountsLiveData: LiveData> = getDisplayAccounts().asLiveData() }