Skip to content

Commit c70dce7

Browse files
committed
refactor: rename LegacyAccountWrapperManager to LegacyAccountManager
1 parent 5b75f0d commit c70dce7

6 files changed

Lines changed: 14 additions & 14 deletions

File tree

app-common/src/main/kotlin/net/thunderbird/app/common/account/AppCommonAccountModule.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ package net.thunderbird.app.common.account
22

33
import app.k9mail.feature.account.setup.AccountSetupExternalContract
44
import net.thunderbird.app.common.account.data.DefaultAccountProfileLocalDataSource
5-
import net.thunderbird.app.common.account.data.DefaultLegacyAccountWrapperManager
5+
import net.thunderbird.app.common.account.data.DefaultLegacyAccountManager
66
import net.thunderbird.core.android.account.AccountDefaultsProvider
7-
import net.thunderbird.core.android.account.LegacyAccountWrapperManager
7+
import net.thunderbird.core.android.account.LegacyAccountManager
88
import net.thunderbird.feature.account.avatar.AvatarMonogramCreator
99
import net.thunderbird.feature.account.avatar.DefaultAvatarMonogramCreator
1010
import net.thunderbird.feature.account.core.AccountCoreExternalContract.AccountProfileLocalDataSource
@@ -19,8 +19,8 @@ internal val appCommonAccountModule = module {
1919
featureAccountStorageLegacyModule,
2020
)
2121

22-
single<LegacyAccountWrapperManager> {
23-
DefaultLegacyAccountWrapperManager(
22+
single<LegacyAccountManager> {
23+
DefaultLegacyAccountManager(
2424
accountManager = get(),
2525
accountDataMapper = get(),
2626
)

app-common/src/main/kotlin/net/thunderbird/app/common/account/data/DefaultAccountProfileLocalDataSource.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ package net.thunderbird.app.common.account.data
33
import kotlinx.coroutines.flow.Flow
44
import kotlinx.coroutines.flow.firstOrNull
55
import kotlinx.coroutines.flow.map
6-
import net.thunderbird.core.android.account.LegacyAccountWrapperManager
6+
import net.thunderbird.core.android.account.LegacyAccountManager
77
import net.thunderbird.feature.account.AccountId
88
import net.thunderbird.feature.account.core.AccountCoreExternalContract.AccountProfileLocalDataSource
99
import net.thunderbird.feature.account.profile.AccountProfile
1010
import net.thunderbird.feature.account.storage.mapper.AccountProfileDataMapper
1111

1212
internal class DefaultAccountProfileLocalDataSource(
13-
private val accountManager: LegacyAccountWrapperManager,
13+
private val accountManager: LegacyAccountManager,
1414
private val dataMapper: AccountProfileDataMapper,
1515
) : AccountProfileLocalDataSource {
1616

app-common/src/main/kotlin/net/thunderbird/app/common/account/data/DefaultLegacyAccountWrapperManager.kt renamed to app-common/src/main/kotlin/net/thunderbird/app/common/account/data/DefaultLegacyAccountManager.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import kotlinx.coroutines.flow.Flow
44
import kotlinx.coroutines.flow.map
55
import net.thunderbird.core.android.account.AccountManager
66
import net.thunderbird.core.android.account.LegacyAccount
7-
import net.thunderbird.core.android.account.LegacyAccountWrapperManager
7+
import net.thunderbird.core.android.account.LegacyAccountManager
88
import net.thunderbird.feature.account.AccountId
99
import net.thunderbird.feature.account.storage.legacy.mapper.DefaultLegacyAccountWrapperDataMapper
1010

11-
internal class DefaultLegacyAccountWrapperManager(
11+
internal class DefaultLegacyAccountManager(
1212
private val accountManager: AccountManager,
1313
private val accountDataMapper: DefaultLegacyAccountWrapperDataMapper,
14-
) : LegacyAccountWrapperManager {
14+
) : LegacyAccountManager {
1515

1616
override fun getAll(): Flow<List<LegacyAccount>> {
1717
return accountManager.getAccountsFlow()

app-common/src/test/kotlin/net/thunderbird/app/common/account/data/DefaultAccountProfileLocalDataSourceTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class DefaultAccountProfileLocalDataSourceTest {
142142
legacyAccount: LegacyAccount?,
143143
): DefaultAccountProfileLocalDataSource {
144144
return DefaultAccountProfileLocalDataSource(
145-
accountManager = FakeLegacyAccountWrapperManager(
145+
accountManager = FakeLegacyAccountManager(
146146
initialAccounts = if (legacyAccount != null) {
147147
listOf(legacyAccount)
148148
} else {

app-common/src/test/kotlin/net/thunderbird/app/common/account/data/FakeLegacyAccountWrapperManager.kt renamed to app-common/src/test/kotlin/net/thunderbird/app/common/account/data/FakeLegacyAccountManager.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import kotlinx.coroutines.flow.StateFlow
66
import kotlinx.coroutines.flow.map
77
import kotlinx.coroutines.flow.update
88
import net.thunderbird.core.android.account.LegacyAccount
9-
import net.thunderbird.core.android.account.LegacyAccountWrapperManager
9+
import net.thunderbird.core.android.account.LegacyAccountManager
1010
import net.thunderbird.feature.account.AccountId
1111

12-
internal class FakeLegacyAccountWrapperManager(
12+
internal class FakeLegacyAccountManager(
1313
initialAccounts: List<LegacyAccount> = emptyList(),
14-
) : LegacyAccountWrapperManager {
14+
) : LegacyAccountManager {
1515

1616
private val accountsState = MutableStateFlow(
1717
initialAccounts,

core/android/account/src/main/kotlin/net/thunderbird/core/android/account/LegacyAccountManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package net.thunderbird.core.android.account
33
import kotlinx.coroutines.flow.Flow
44
import net.thunderbird.feature.account.AccountId
55

6-
interface LegacyAccountWrapperManager {
6+
interface LegacyAccountManager {
77
fun getAll(): Flow<List<LegacyAccount>>
88

99
fun getById(id: AccountId): Flow<LegacyAccount?>

0 commit comments

Comments
 (0)