Skip to content

Commit

Permalink
Pass app name to ImapServerSettingsValidator for use with the IMAP …
Browse files Browse the repository at this point in the history
…ID command
  • Loading branch information
cketti committed Sep 22, 2023
1 parent 2c8e0b8 commit 89530e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import com.fsck.k9.mail.store.imap.ImapServerSettingsValidator
import com.fsck.k9.mail.store.pop3.Pop3ServerSettingsValidator
import com.fsck.k9.mail.transport.smtp.SmtpServerSettingsValidator
import org.koin.androidx.viewmodel.dsl.viewModel
import org.koin.core.qualifier.named
import org.koin.dsl.module

val featureAccountServerValidationModule = module {
Expand All @@ -28,7 +29,7 @@ val featureAccountServerValidationModule = module {
imapValidator = ImapServerSettingsValidator(
trustedSocketFactory = get(),
oAuth2TokenProviderFactory = get(),
clientIdAppName = "null", // TODO get real value
clientIdAppName = get(named("ClientIdAppName")),
),
pop3Validator = Pop3ServerSettingsValidator(
trustedSocketFactory = get(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import org.junit.runner.RunWith
import org.koin.android.ext.koin.androidContext
import org.koin.core.annotation.KoinExperimentalAPI
import org.koin.core.module.Module
import org.koin.core.qualifier.named
import org.koin.dsl.koinApplication
import org.koin.dsl.module
import org.koin.test.KoinTest
Expand All @@ -42,6 +43,7 @@ class ServerValidationModuleKtTest : KoinTest {
}
}
single<LocalKeyStore> { Mockito.mock() }
single(named("ClientIdAppName")) { "App Name" }
}

@OptIn(KoinExperimentalAPI::class)
Expand Down

0 comments on commit 89530e5

Please sign in to comment.