Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GetDrawerConfig attribute name #8835

Merged
merged 1 commit into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ val navigationDrawerModule: Module = module {

single<UseCase.GetDrawerConfig> {
GetDrawerConfig(
configProver = get(),
configLoader = get(),
)
}
single<UseCase.SaveDrawerConfig> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import app.k9mail.feature.navigation.drawer.domain.DomainContract.UseCase
import kotlinx.coroutines.flow.Flow

internal class GetDrawerConfig(
private val configProver: DrawerConfigLoader,
private val configLoader: DrawerConfigLoader,
) : UseCase.GetDrawerConfig {
override operator fun invoke(): Flow<DrawerConfig> {
return configProver.loadDrawerConfigFlow()
return configLoader.loadDrawerConfigFlow()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ internal class GetDrawerConfigTest {

@Test
fun `should get drawer config`() = runTest {
val configProver: DrawerConfigLoader = mock()
val configLoader: DrawerConfigLoader = mock()
val drawerConfig = DrawerConfig(
showUnifiedFolders = true,
showStarredCount = true,
showAccountSelector = true,
)

val testSubject = GetDrawerConfig(configProver = configProver)
whenever(configProver.loadDrawerConfigFlow()).thenReturn(flowOf(drawerConfig))
val testSubject = GetDrawerConfig(configLoader = configLoader)
whenever(configLoader.loadDrawerConfigFlow()).thenReturn(flowOf(drawerConfig))

val result = testSubject().first()

Expand Down