From 7a6f06b9c2a3b8763856f6bd38b64183e5b73138 Mon Sep 17 00:00:00 2001 From: cketti Date: Thu, 4 Jan 2024 12:54:49 +0100 Subject: [PATCH] Move string to :feature:account:common --- feature/account/common/src/main/res/values/strings.xml | 2 ++ .../server/validation/ui/ServerValidationStringMapper.kt | 5 +++-- .../server/validation/src/main/res/values/strings.xml | 1 - 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/feature/account/common/src/main/res/values/strings.xml b/feature/account/common/src/main/res/values/strings.xml index ecff2a1a3..bc1eaca22 100644 --- a/feature/account/common/src/main/res/values/strings.xml +++ b/feature/account/common/src/main/res/values/strings.xml @@ -3,4 +3,6 @@ K-9 Mail Next Back + + The server returned the following message:\n%s diff --git a/feature/account/server/validation/src/main/kotlin/app/k9mail/feature/account/server/validation/ui/ServerValidationStringMapper.kt b/feature/account/server/validation/src/main/kotlin/app/k9mail/feature/account/server/validation/ui/ServerValidationStringMapper.kt index 8ca4bb7e8..407969e98 100644 --- a/feature/account/server/validation/src/main/kotlin/app/k9mail/feature/account/server/validation/ui/ServerValidationStringMapper.kt +++ b/feature/account/server/validation/src/main/kotlin/app/k9mail/feature/account/server/validation/ui/ServerValidationStringMapper.kt @@ -4,6 +4,7 @@ import android.content.res.Resources import androidx.annotation.StringRes import app.k9mail.feature.account.server.validation.R import app.k9mail.feature.account.server.validation.ui.ServerValidationContract.Error +import app.k9mail.feature.account.common.R as CommonR internal fun Error.toResourceString(resources: Resources): String { return when (this) { @@ -12,7 +13,7 @@ internal fun Error.toResourceString(resources: Resources): String { is Error.AuthenticationError -> { resources.buildErrorString( titleResId = R.string.account_server_validation_error_authentication, - detailsResId = R.string.account_server_validation_error_server_message, + detailsResId = CommonR.string.account_common_error_server_message, detailsMessage = serverMessage, ) } @@ -28,7 +29,7 @@ internal fun Error.toResourceString(resources: Resources): String { is Error.ServerError -> { resources.buildErrorString( titleResId = R.string.account_server_validation_error_server, - detailsResId = R.string.account_server_validation_error_server_message, + detailsResId = CommonR.string.account_common_error_server_message, detailsMessage = serverMessage, ) } diff --git a/feature/account/server/validation/src/main/res/values/strings.xml b/feature/account/server/validation/src/main/res/values/strings.xml index e8203383c..9ecb7fe1d 100644 --- a/feature/account/server/validation/src/main/res/values/strings.xml +++ b/feature/account/server/validation/src/main/res/values/strings.xml @@ -7,7 +7,6 @@ The client certificate is no longer valid "The client certificate couldn't be accessed" Missing server capability - The server returned the following message:\n%s Details:\n%s The server is missing this capability:\n%s Checking incoming server settingsā€¦