mirror of
https://github.com/thunderbird/thunderbird-android.git
synced 2024-09-20 12:12:15 +02:00
Rename to SuggestServerName
This commit is contained in:
parent
a56ca2cbdc
commit
03772c6a5c
@ -2,7 +2,7 @@ package com.fsck.k9
|
||||
|
||||
import android.content.Context
|
||||
import app.k9mail.core.android.common.coreCommonAndroidModule
|
||||
import app.k9mail.feature.account.oauth.domain.usecase.ServerNameSuggester
|
||||
import app.k9mail.feature.account.oauth.domain.usecase.SuggestServerName
|
||||
import com.fsck.k9.helper.Contacts
|
||||
import com.fsck.k9.helper.DefaultTrustedSocketFactory
|
||||
import com.fsck.k9.mail.ssl.LocalKeyStore
|
||||
@ -34,7 +34,7 @@ val mainModule = module {
|
||||
single { LocalKeyStoreManager(get()) }
|
||||
single<TrustedSocketFactory> { DefaultTrustedSocketFactory(get(), get()) }
|
||||
single<Clock> { Clock.System }
|
||||
factory { ServerNameSuggester() }
|
||||
factory { SuggestServerName() }
|
||||
factory { EmailAddressValidator() }
|
||||
factory { ServerSettingsSerializer() }
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import app.k9mail.core.common.mail.Protocols
|
||||
import app.k9mail.feature.account.oauth.domain.usecase.ServerNameSuggester
|
||||
import app.k9mail.feature.account.oauth.domain.usecase.SuggestServerName
|
||||
import com.fsck.k9.Account
|
||||
import com.fsck.k9.Preferences
|
||||
import com.fsck.k9.helper.EmailHelper.getDomainFromEmailAddress
|
||||
@ -23,7 +23,7 @@ import org.koin.android.ext.android.inject
|
||||
*/
|
||||
class AccountSetupAccountType : K9Activity() {
|
||||
private val preferences: Preferences by inject()
|
||||
private val serverNameSuggester: ServerNameSuggester by inject()
|
||||
private val serverNameSuggester: SuggestServerName by inject()
|
||||
private val localFoldersCreator: SpecialLocalFoldersCreator by inject()
|
||||
|
||||
private lateinit var account: Account
|
||||
|
@ -29,7 +29,7 @@ import com.fsck.k9.LocalKeyStoreManager;
|
||||
import com.fsck.k9.Preferences;
|
||||
import com.fsck.k9.account.AccountCreator;
|
||||
import com.fsck.k9.helper.EmailHelper;
|
||||
import app.k9mail.feature.account.oauth.domain.usecase.ServerNameSuggester;
|
||||
import app.k9mail.feature.account.oauth.domain.usecase.SuggestServerName;
|
||||
import com.fsck.k9.ui.base.K9Activity;
|
||||
import com.fsck.k9.activity.setup.AccountSetupCheckSettings.CheckDirection;
|
||||
import com.fsck.k9.helper.Utility;
|
||||
@ -61,7 +61,7 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener
|
||||
private static final String STATE_AUTH_TYPE_POSITION = "authTypePosition";
|
||||
|
||||
private final AccountCreator accountCreator = DI.get(AccountCreator.class);
|
||||
private final ServerNameSuggester serverNameSuggester = DI.get(ServerNameSuggester.class);
|
||||
private final SuggestServerName serverNameSuggester = DI.get(SuggestServerName.class);
|
||||
|
||||
private String mStoreType;
|
||||
private TextInputEditText mUsernameView;
|
||||
|
@ -2,7 +2,7 @@ package app.k9mail.feature.account.oauth.domain.usecase
|
||||
|
||||
import app.k9mail.core.common.mail.Protocols
|
||||
|
||||
class ServerNameSuggester {
|
||||
class SuggestServerName {
|
||||
fun suggestServerName(serverType: String, domainPart: String): String = when (serverType) {
|
||||
Protocols.IMAP -> "imap.$domainPart"
|
||||
Protocols.SMTP -> "smtp.$domainPart"
|
@ -1,16 +1,17 @@
|
||||
package app.k9mail.feature.account.oauth.domain.usecase
|
||||
|
||||
import app.k9mail.core.common.mail.Protocols
|
||||
import app.k9mail.feature.account.oauth.domain.usecase.SuggestServerName
|
||||
import org.junit.Assert
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
|
||||
class ServerNameSuggesterTest {
|
||||
private var serverNameSuggester: ServerNameSuggester? = null
|
||||
class SuggestServerNameTest {
|
||||
private var serverNameSuggester: SuggestServerName? = null
|
||||
@Before
|
||||
@Throws(Exception::class)
|
||||
fun setUp() {
|
||||
serverNameSuggester = ServerNameSuggester()
|
||||
serverNameSuggester = SuggestServerName()
|
||||
}
|
||||
|
||||
@Test
|
Loading…
Reference in New Issue
Block a user