From 697f201c151047d3f54bd168559b8d138b1fd3b2 Mon Sep 17 00:00:00 2001
From: cketti
Date: Fri, 3 Feb 2023 12:32:09 +0100
Subject: [PATCH 001/317] Prepare for version 6.507
---
app/k9mail/build.gradle | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/k9mail/build.gradle b/app/k9mail/build.gradle
index 074462f534..37c4d2c4bc 100644
--- a/app/k9mail/build.gradle
+++ b/app/k9mail/build.gradle
@@ -54,7 +54,7 @@ android {
testApplicationId "com.fsck.k9.tests"
versionCode 35006
- versionName '6.506'
+ versionName '6.507-SNAPSHOT'
// Keep in sync with the resource string array 'supported_languages'
resConfigs "in", "br", "ca", "cs", "cy", "da", "de", "et", "en", "en_GB", "es", "eo", "eu", "fr", "gd", "gl",
--
GitLab
From 713dbf9462369db80af16145b9dde06883f3cba2 Mon Sep 17 00:00:00 2001
From: Wolf Montwe
Date: Fri, 3 Feb 2023 16:49:14 +0100
Subject: [PATCH 002/317] Add spotless plugin for code formatting and rule for
Kotlin sources
---
build.gradle | 12 ++++++++++++
gradle/libs.versions.toml | 4 +++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/build.gradle b/build.gradle
index d54924e0bb..077dd8721b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -11,6 +11,7 @@ plugins {
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.ktlint) apply false
+ alias(libs.plugins.spotless)
}
project.ext {
@@ -101,6 +102,17 @@ allprojects {
}
}
+spotless {
+ kotlin {
+ ktlint(libs.versions.ktlint.get())
+ .setEditorConfigPath("$projectDir/.editorconfig")
+ target("**/*.kt")
+ targetExclude("**/build/", "**/resources/")
+ trimTrailingWhitespace()
+ endWithNewline()
+ }
+}
+
tasks.register('testsOnCi') {
dependsOn getSubprojects()
.collect { project -> project.tasks.withType(Test) }
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index dff73ab629..a0d6f08e35 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -3,7 +3,8 @@
[versions]
androidGradlePlugin = "7.4.0"
-ktlint = "0.44.0"
+ktlint = "0.47.1"
+spotless = "6.14.0"
kotlin = "1.8.0"
kotlinCoroutines = "1.6.4"
@@ -39,6 +40,7 @@ kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
ktlint = "org.jlleitschuh.gradle.ktlint:11.0.0"
+spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
[libraries]
desugar = "com.android.tools:desugar_jdk_libs:1.1.8"
--
GitLab
From 4a1d7f1d39c49568e542153605e1b30b94477b2e Mon Sep 17 00:00:00 2001
From: Wolf Montwe
Date: Fri, 3 Feb 2023 17:17:42 +0100
Subject: [PATCH 003/317] Remove Gradle ktlint plugin
---
build.gradle | 6 ------
gradle/libs.versions.toml | 1 -
2 files changed, 7 deletions(-)
diff --git a/build.gradle b/build.gradle
index 077dd8721b..23eeb67bd4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -10,7 +10,6 @@ plugins {
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.kotlin.jvm) apply false
- alias(libs.plugins.ktlint) apply false
alias(libs.plugins.spotless)
}
@@ -95,11 +94,6 @@ allprojects {
jvmTarget = jvmTargetVersion
}
}
-
- apply plugin: 'org.jlleitschuh.gradle.ktlint'
- ktlint {
- version = libs.versions.ktlint.get()
- }
}
spotless {
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index a0d6f08e35..dfab2102d5 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -39,7 +39,6 @@ ksp = "com.google.devtools.ksp:1.8.0-1.0.8"
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
-ktlint = "org.jlleitschuh.gradle.ktlint:11.0.0"
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
[libraries]
--
GitLab
From 1854a2c91166fdd53dd02e29ed893d4050b25fe2 Mon Sep 17 00:00:00 2001
From: Wolf Montwe
Date: Fri, 3 Feb 2023 17:23:57 +0100
Subject: [PATCH 004/317] Change Kotlin code format
---
.../providersxml/ProvidersXmlDiscoveryTest.kt | 2 +-
app/core/src/main/java/com/fsck/k9/Account.kt | 14 ++++---
.../fsck/k9/AccountPreferenceSerializer.kt | 22 ++++++----
app/core/src/main/java/com/fsck/k9/Core.kt | 7 ++--
.../k9/autocrypt/AutocryptDraftStateHeader.kt | 16 ++++++--
.../com/fsck/k9/mailstore/FolderSettings.kt | 2 +-
.../k9/mailstore/FolderSettingsProvider.kt | 2 +-
.../fsck/k9/mailstore/MessageRepository.kt | 2 +-
.../k9/mailstore/OutboxStateRepository.kt | 5 ++-
.../com/fsck/k9/message/html/UriMatcher.kt | 2 +-
.../fsck/k9/notification/CoreKoinModule.kt | 4 +-
.../SingleMessageNotificationDataCreator.kt | 4 +-
.../com/fsck/k9/power/AndroidPowerManager.kt | 5 ++-
.../fsck/k9/preferences/SettingsExporter.kt | 13 ++++--
.../fsck/k9/search/AccountSearchConditions.kt | 4 +-
.../fsck/k9/mailstore/K9BackendStorageTest.kt | 2 +-
.../k9/mailstore/MessageListRepositoryTest.kt | 2 +-
.../fsck/k9/message/html/DisplayHtmlTest.kt | 3 +-
...tificateErrorNotificationControllerTest.kt | 4 +-
.../NewMailNotificationManagerTest.kt | 10 ++++-
.../k9/notification/NotificationIdsTest.kt | 10 ++---
.../app/k9mail/html/cleaner/BodyCleaner.kt | 8 +++-
app/k9mail/src/main/java/com/fsck/k9/App.kt | 2 +-
.../src/main/java/com/fsck/k9/Dependencies.kt | 2 +-
.../com/fsck/k9/auth/OAuthConfigurations.kt | 2 +-
.../K9NotificationResourceProvider.kt | 3 +-
.../k9/notification/K9NotificationStrategy.kt | 1 -
.../unread/UnreadWidgetDataProviderTest.kt | 16 ++++++--
.../storage/messages/CheckFolderOperations.kt | 3 +-
.../storage/messages/CopyMessageOperations.kt | 4 +-
.../messages/KeyValueStoreOperations.kt | 16 ++++++--
.../storage/messages/MoveMessageOperations.kt | 4 +-
.../messages/RetrieveMessageListOperations.kt | 4 +-
.../messages/RetrieveMessageOperations.kt | 6 ++-
.../k9/storage/migrations/MigrationTo84.kt | 1 -
.../fsck/k9/storage/messages/FolderHelpers.kt | 2 +-
.../messages/MessagePartDatabaseHelpers.kt | 2 +-
.../messages/RetrieveFolderOperationsTest.kt | 10 ++---
.../NotificationsTableHelpers.kt | 2 +-
.../java/com/fsck/k9/ui/base/ThemeManager.kt | 2 +-
.../extensions/TextInputLayoutExtensions.kt | 2 +-
.../com/fsck/k9/activity/FolderInfoHolder.kt | 3 ++
.../java/com/fsck/k9/activity/MessageList.kt | 4 +-
.../k9/activity/MessageListActivityConfig.kt | 4 +-
.../k9/activity/compose/RecipientPresenter.kt | 3 +-
.../k9/contacts/ContactLetterBitmapCreator.kt | 3 +-
.../src/main/java/com/fsck/k9/ui/K9Drawer.kt | 5 ++-
.../k9/ui/account/AccountImageModelLoader.kt | 2 +-
.../fsck/k9/ui/helper/ContextExtensions.kt | 1 +
.../k9/ui/messagelist/MessageListFragment.kt | 5 ++-
.../k9/ui/messageview/MessageViewFragment.kt | 32 +++++++++++----
.../k9/ui/messageview/RecipientNamesView.kt | 10 ++++-
.../fsck/k9/ui/settings/SettingsViewModel.kt | 2 +-
.../account/AccountSettingsDataStore.kt | 2 +-
.../AutocryptPreferEncryptPreference.kt | 6 ++-
.../settings/account/FolderListPreference.kt | 3 +-
.../account/NotificationsPreference.kt | 6 ++-
.../settings/account/VibrationPreference.kt | 3 +-
.../compose/AttachmentPresenterTest.kt | 23 ++++++++---
.../compose/RecipientPresenterTest.kt | 18 ++++++---
.../fsck/k9/message/PgpMessageBuilderTest.kt | 40 +++++++++++++------
.../k9mail/ui/widget/list/MessageListItem.kt | 2 +-
.../ui/widget/list/MessageListItemMapper.kt | 2 +-
.../widget/list/MessageListWidgetManager.kt | 2 +-
.../backend/imap/CommandMoveOrCopyMessages.kt | 8 +++-
.../java/com/fsck/k9/backend/imap/ImapSync.kt | 24 ++++++++---
.../k9/mail/internet/MimeParameterDecoder.kt | 7 +++-
.../fsck/k9/mail/internet/PartExtensions.kt | 1 +
.../main/java/com/fsck/k9/sasl/OAuthBearer.kt | 1 +
.../k9/mail/store/imap/RealImapConnection.kt | 9 ++++-
.../fsck/k9/mail/store/imap/RealImapFolder.kt | 20 +++++++---
.../k9/mail/store/imap/UidValidityResponse.kt | 4 +-
.../mail/store/imap/RealImapConnectionTest.kt | 2 +-
.../k9/mail/store/imap/RealImapFolderTest.kt | 4 +-
.../k9/mail/store/imap/RealImapStoreTest.kt | 5 ++-
.../k9/mail/transport/smtp/SmtpTransport.kt | 3 +-
76 files changed, 343 insertions(+), 153 deletions(-)
diff --git a/app/autodiscovery/providersxml/src/test/java/com/fsck/k9/autodiscovery/providersxml/ProvidersXmlDiscoveryTest.kt b/app/autodiscovery/providersxml/src/test/java/com/fsck/k9/autodiscovery/providersxml/ProvidersXmlDiscoveryTest.kt
index f91ce3b38d..d37fae5611 100644
--- a/app/autodiscovery/providersxml/src/test/java/com/fsck/k9/autodiscovery/providersxml/ProvidersXmlDiscoveryTest.kt
+++ b/app/autodiscovery/providersxml/src/test/java/com/fsck/k9/autodiscovery/providersxml/ProvidersXmlDiscoveryTest.kt
@@ -53,7 +53,7 @@ class ProvidersXmlDiscoveryTest : RobolectricTest() {
return OAuthConfigurationProvider(
configurations = mapOf(
- listOf("imap.gmail.com", "smtp.gmail.com") to googleConfig,
+ listOf("imap.gmail.com", "smtp.gmail.com") to googleConfig
),
googleConfiguration = googleConfig
)
diff --git a/app/core/src/main/java/com/fsck/k9/Account.kt b/app/core/src/main/java/com/fsck/k9/Account.kt
index 7f155d5cf5..9dc569a0b8 100644
--- a/app/core/src/main/java/com/fsck/k9/Account.kt
+++ b/app/core/src/main/java/com/fsck/k9/Account.kt
@@ -551,12 +551,14 @@ class Account(override val uuid: String) : BaseAccount {
if (age < 28) {
now.add(Calendar.DATE, age * -1)
- } else when (age) {
- 28 -> now.add(Calendar.MONTH, -1)
- 56 -> now.add(Calendar.MONTH, -2)
- 84 -> now.add(Calendar.MONTH, -3)
- 168 -> now.add(Calendar.MONTH, -6)
- 365 -> now.add(Calendar.YEAR, -1)
+ } else {
+ when (age) {
+ 28 -> now.add(Calendar.MONTH, -1)
+ 56 -> now.add(Calendar.MONTH, -2)
+ 84 -> now.add(Calendar.MONTH, -3)
+ 168 -> now.add(Calendar.MONTH, -6)
+ 365 -> now.add(Calendar.YEAR, -1)
+ }
}
return now.time
diff --git a/app/core/src/main/java/com/fsck/k9/AccountPreferenceSerializer.kt b/app/core/src/main/java/com/fsck/k9/AccountPreferenceSerializer.kt
index e9b8ffe31a..851bf8d9e3 100644
--- a/app/core/src/main/java/com/fsck/k9/AccountPreferenceSerializer.kt
+++ b/app/core/src/main/java/com/fsck/k9/AccountPreferenceSerializer.kt
@@ -67,35 +67,40 @@ class AccountPreferenceSerializer(
val draftsFolderId = storage.getString("$accountUuid.draftsFolderId", null)?.toLongOrNull()
val draftsFolderSelection = getEnumStringPref(
- storage, "$accountUuid.draftsFolderSelection",
+ storage,
+ "$accountUuid.draftsFolderSelection",
SpecialFolderSelection.AUTOMATIC
)
setDraftsFolderId(draftsFolderId, draftsFolderSelection)
val sentFolderId = storage.getString("$accountUuid.sentFolderId", null)?.toLongOrNull()
val sentFolderSelection = getEnumStringPref(
- storage, "$accountUuid.sentFolderSelection",
+ storage,
+ "$accountUuid.sentFolderSelection",
SpecialFolderSelection.AUTOMATIC
)
setSentFolderId(sentFolderId, sentFolderSelection)
val trashFolderId = storage.getString("$accountUuid.trashFolderId", null)?.toLongOrNull()
val trashFolderSelection = getEnumStringPref(
- storage, "$accountUuid.trashFolderSelection",
+ storage,
+ "$accountUuid.trashFolderSelection",
SpecialFolderSelection.AUTOMATIC
)
setTrashFolderId(trashFolderId, trashFolderSelection)
val archiveFolderId = storage.getString("$accountUuid.archiveFolderId", null)?.toLongOrNull()
val archiveFolderSelection = getEnumStringPref(
- storage, "$accountUuid.archiveFolderSelection",
+ storage,
+ "$accountUuid.archiveFolderSelection",
SpecialFolderSelection.AUTOMATIC
)
setArchiveFolderId(archiveFolderId, archiveFolderSelection)
val spamFolderId = storage.getString("$accountUuid.spamFolderId", null)?.toLongOrNull()
val spamFolderSelection = getEnumStringPref(
- storage, "$accountUuid.spamFolderSelection",
+ storage,
+ "$accountUuid.spamFolderSelection",
SpecialFolderSelection.AUTOMATIC
)
setSpamFolderId(spamFolderId, spamFolderSelection)
@@ -524,8 +529,11 @@ class AccountPreferenceSerializer(
java.lang.Enum.valueOf(defaultEnum.declaringJavaClass, stringPref)
} catch (ex: IllegalArgumentException) {
Timber.w(
- ex, "Unable to convert preference key [%s] value [%s] to enum of type %s",
- key, stringPref, defaultEnum.declaringJavaClass
+ ex,
+ "Unable to convert preference key [%s] value [%s] to enum of type %s",
+ key,
+ stringPref,
+ defaultEnum.declaringJavaClass
)
defaultEnum
diff --git a/app/core/src/main/java/com/fsck/k9/Core.kt b/app/core/src/main/java/com/fsck/k9/Core.kt
index 75e8201ec3..ea140fe371 100644
--- a/app/core/src/main/java/com/fsck/k9/Core.kt
+++ b/app/core/src/main/java/com/fsck/k9/Core.kt
@@ -65,10 +65,11 @@ object Core : EarlyInit {
if (enabled != alreadyEnabled) {
pm.setComponentEnabledSetting(
ComponentName(context, clazz),
- if (enabled)
+ if (enabled) {
PackageManager.COMPONENT_ENABLED_STATE_ENABLED
- else
- PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
+ } else {
+ PackageManager.COMPONENT_ENABLED_STATE_DISABLED
+ },
PackageManager.DONT_KILL_APP
)
}
diff --git a/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptDraftStateHeader.kt b/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptDraftStateHeader.kt
index e3711c4cfb..bcb3f09d46 100644
--- a/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptDraftStateHeader.kt
+++ b/app/core/src/main/java/com/fsck/k9/autocrypt/AutocryptDraftStateHeader.kt
@@ -49,13 +49,21 @@ data class AutocryptDraftStateHeader(
fun fromCryptoStatus(cryptoStatus: CryptoStatus): AutocryptDraftStateHeader {
if (cryptoStatus.isSignOnly) {
return AutocryptDraftStateHeader(
- false, true, cryptoStatus.isReplyToEncrypted,
- cryptoStatus.isUserChoice(), cryptoStatus.isPgpInlineModeEnabled, mapOf()
+ false,
+ true,
+ cryptoStatus.isReplyToEncrypted,
+ cryptoStatus.isUserChoice(),
+ cryptoStatus.isPgpInlineModeEnabled,
+ mapOf()
)
}
return AutocryptDraftStateHeader(
- cryptoStatus.isEncryptionEnabled, false, cryptoStatus.isReplyToEncrypted,
- cryptoStatus.isUserChoice(), cryptoStatus.isPgpInlineModeEnabled, mapOf()
+ cryptoStatus.isEncryptionEnabled,
+ false,
+ cryptoStatus.isReplyToEncrypted,
+ cryptoStatus.isUserChoice(),
+ cryptoStatus.isPgpInlineModeEnabled,
+ mapOf()
)
}
}
diff --git a/app/core/src/main/java/com/fsck/k9/mailstore/FolderSettings.kt b/app/core/src/main/java/com/fsck/k9/mailstore/FolderSettings.kt
index 0aa6ab7809..11d046e298 100644
--- a/app/core/src/main/java/com/fsck/k9/mailstore/FolderSettings.kt
+++ b/app/core/src/main/java/com/fsck/k9/mailstore/FolderSettings.kt
@@ -9,5 +9,5 @@ data class FolderSettings(
val notifyClass: FolderClass,
val pushClass: FolderClass,
val inTopGroup: Boolean,
- val integrate: Boolean,
+ val integrate: Boolean
)
diff --git a/app/core/src/main/java/com/fsck/k9/mailstore/FolderSettingsProvider.kt b/app/core/src/main/java/com/fsck/k9/mailstore/FolderSettingsProvider.kt
index ef5dd3363f..cc8125d2c7 100644
--- a/app/core/src/main/java/com/fsck/k9/mailstore/FolderSettingsProvider.kt
+++ b/app/core/src/main/java/com/fsck/k9/mailstore/FolderSettingsProvider.kt
@@ -19,7 +19,7 @@ class FolderSettingsProvider(val preferences: Preferences, val account: Account)
notifyClass = storage.getString("$prefix.notifyMode", null).toFolderClass(FolderClass.INHERITED),
pushClass = storage.getString("$prefix.pushMode", null).toFolderClass(FolderClass.SECOND_CLASS),
inTopGroup = storage.getBoolean("$prefix.inTopGroup", false),
- integrate = storage.getBoolean("$prefix.integrate", false),
+ integrate = storage.getBoolean("$prefix.integrate", false)
).also {
removeImportedFolderSettings(prefix)
}
diff --git a/app/core/src/main/java/com/fsck/k9/mailstore/MessageRepository.kt b/app/core/src/main/java/com/fsck/k9/mailstore/MessageRepository.kt
index e2fc950b16..a73c67010e 100644
--- a/app/core/src/main/java/com/fsck/k9/mailstore/MessageRepository.kt
+++ b/app/core/src/main/java/com/fsck/k9/mailstore/MessageRepository.kt
@@ -63,7 +63,7 @@ class MessageRepository(private val messageStoreManager: MessageStoreManager) {
"reply-to",
"to",
"cc",
- "bcc",
+ "bcc"
)
}
}
diff --git a/app/core/src/main/java/com/fsck/k9/mailstore/OutboxStateRepository.kt b/app/core/src/main/java/com/fsck/k9/mailstore/OutboxStateRepository.kt
index c2c11aa932..360b9a1b51 100644
--- a/app/core/src/main/java/com/fsck/k9/mailstore/OutboxStateRepository.kt
+++ b/app/core/src/main/java/com/fsck/k9/mailstore/OutboxStateRepository.kt
@@ -15,7 +15,10 @@ class OutboxStateRepository(private val database: LockableDatabase, private val
TABLE_NAME,
COLUMNS,
"$COLUMN_MESSAGE_ID = ?",
- arrayOf(messageId.toString()), null, null, null
+ arrayOf(messageId.toString()),
+ null,
+ null,
+ null
).use { cursor ->
if (!cursor.moveToFirst()) {
throw IllegalStateException("No outbox_state entry for message with id $messageId")
diff --git a/app/core/src/main/java/com/fsck/k9/message/html/UriMatcher.kt b/app/core/src/main/java/com/fsck/k9/message/html/UriMatcher.kt
index 44329acfdb..2d29463e8a 100644
--- a/app/core/src/main/java/com/fsck/k9/message/html/UriMatcher.kt
+++ b/app/core/src/main/java/com/fsck/k9/message/html/UriMatcher.kt
@@ -10,7 +10,7 @@ object UriMatcher {
"mailto:" to genericUriParser,
"matrix:" to genericUriParser,
"rtsp:" to httpUriParser,
- "xmpp:" to genericUriParser,
+ "xmpp:" to genericUriParser
)
}
diff --git a/app/core/src/main/java/com/fsck/k9/notification/CoreKoinModule.kt b/app/core/src/main/java/com/fsck/k9/notification/CoreKoinModule.kt
index f0ac2f20ec..6b1ce14839 100644
--- a/app/core/src/main/java/com/fsck/k9/notification/CoreKoinModule.kt
+++ b/app/core/src/main/java/com/fsck/k9/notification/CoreKoinModule.kt
@@ -120,7 +120,9 @@ val coreNotificationModule = module {
}
factory {
NotificationSettingsUpdater(
- preferences = get(), notificationChannelManager = get(), notificationConfigurationConverter = get()
+ preferences = get(),
+ notificationChannelManager = get(),
+ notificationConfigurationConverter = get()
)
}
}
diff --git a/app/core/src/main/java/com/fsck/k9/notification/SingleMessageNotificationDataCreator.kt b/app/core/src/main/java/com/fsck/k9/notification/SingleMessageNotificationDataCreator.kt
index d095ef00b6..f693ab39f1 100644
--- a/app/core/src/main/java/com/fsck/k9/notification/SingleMessageNotificationDataCreator.kt
+++ b/app/core/src/main/java/com/fsck/k9/notification/SingleMessageNotificationDataCreator.kt
@@ -36,8 +36,8 @@ internal class SingleMessageNotificationDataCreator {
content = data.activeNotifications.first().content,
actions = createSingleNotificationActions(),
wearActions = createSingleNotificationWearActions(data.account),
- addLockScreenNotification = false,
- ),
+ addLockScreenNotification = false
+ )
)
}
diff --git a/app/core/src/main/java/com/fsck/k9/power/AndroidPowerManager.kt b/app/core/src/main/java/com/fsck/k9/power/AndroidPowerManager.kt
index fbf30c048d..51546280ee 100644
--- a/app/core/src/main/java/com/fsck/k9/power/AndroidPowerManager.kt
+++ b/app/core/src/main/java/com/fsck/k9/power/AndroidPowerManager.kt
@@ -70,7 +70,10 @@ internal class AndroidPowerManager(private val systemPowerManager: SystemPowerMa
Timber.v(
"AndroidWakeLock for tag %s / id %d: releasing after %d ms, timeout = %d ms",
- tag, id, endTime - startTime, timeout
+ tag,
+ id,
+ endTime - startTime,
+ timeout
)
} else {
Timber.v("AndroidWakeLock for tag %s / id %d, timeout = %d ms: releasing", tag, id, timeout)
diff --git a/app/core/src/main/java/com/fsck/k9/preferences/SettingsExporter.kt b/app/core/src/main/java/com/fsck/k9/preferences/SettingsExporter.kt
index 08bc5bbefc..0098813b3f 100644
--- a/app/core/src/main/java/com/fsck/k9/preferences/SettingsExporter.kt
+++ b/app/core/src/main/java/com/fsck/k9/preferences/SettingsExporter.kt
@@ -105,7 +105,8 @@ class SettingsExporter(
} catch (e: InvalidSettingValueException) {
Timber.w(
"Global setting \"%s\" has invalid value \"%s\" in preference storage. This shouldn't happen!",
- key, valueString
+ key,
+ valueString
)
}
} else {
@@ -271,7 +272,9 @@ class SettingsExporter(
Timber.w(
"Account setting \"%s\" (%s) has invalid value \"%s\" in preference storage. " +
"This shouldn't happen!",
- keyPart, account, valueString
+ keyPart,
+ account,
+ valueString
)
}
}
@@ -375,7 +378,8 @@ class SettingsExporter(
Timber.w(
"Identity setting \"%s\" has invalid value \"%s\" in preference storage. " +
"This shouldn't happen!",
- identityKey, valueString
+ identityKey,
+ valueString
)
}
}
@@ -413,7 +417,8 @@ class SettingsExporter(
} catch (e: InvalidSettingValueException) {
Timber.w(
"Folder setting \"%s\" has invalid value \"%s\" in preference storage. This shouldn't happen!",
- key, value
+ key,
+ value
)
}
}
diff --git a/app/core/src/main/java/com/fsck/k9/search/AccountSearchConditions.kt b/app/core/src/main/java/com/fsck/k9/search/AccountSearchConditions.kt
index 51e80f8d95..3a0beef26c 100644
--- a/app/core/src/main/java/com/fsck/k9/search/AccountSearchConditions.kt
+++ b/app/core/src/main/java/com/fsck/k9/search/AccountSearchConditions.kt
@@ -25,7 +25,9 @@ fun LocalSearch.limitToDisplayableFolders(account: Account) {
// TODO: Create a proper interface for creating arbitrary condition trees
val searchCondition = SearchCondition(
- SearchField.DISPLAY_CLASS, Attribute.EQUALS, FolderClass.SECOND_CLASS.name
+ SearchField.DISPLAY_CLASS,
+ Attribute.EQUALS,
+ FolderClass.SECOND_CLASS.name
)
val root = conditions
if (root.mRight != null) {
diff --git a/app/core/src/test/java/com/fsck/k9/mailstore/K9BackendStorageTest.kt b/app/core/src/test/java/com/fsck/k9/mailstore/K9BackendStorageTest.kt
index ed0009a78e..ccd2fee8cb 100644
--- a/app/core/src/test/java/com/fsck/k9/mailstore/K9BackendStorageTest.kt
+++ b/app/core/src/test/java/com/fsck/k9/mailstore/K9BackendStorageTest.kt
@@ -86,7 +86,7 @@ internal fun createFolderSettingsProvider(): FolderSettingsProvider {
notifyClass = FolderClass.INHERITED,
pushClass = FolderClass.SECOND_CLASS,
inTopGroup = false,
- integrate = false,
+ integrate = false
)
}
}
diff --git a/app/core/src/test/java/com/fsck/k9/mailstore/MessageListRepositoryTest.kt b/app/core/src/test/java/com/fsck/k9/mailstore/MessageListRepositoryTest.kt
index 300356f22f..f9284a768a 100644
--- a/app/core/src/test/java/com/fsck/k9/mailstore/MessageListRepositoryTest.kt
+++ b/app/core/src/test/java/com/fsck/k9/mailstore/MessageListRepositoryTest.kt
@@ -429,5 +429,5 @@ private data class MessageData(
val isRead: Boolean = false,
val isStarred: Boolean = false,
val isAnswered: Boolean = false,
- val isForwarded: Boolean = false,
+ val isForwarded: Boolean = false
)
diff --git a/app/core/src/test/java/com/fsck/k9/message/html/DisplayHtmlTest.kt b/app/core/src/test/java/com/fsck/k9/message/html/DisplayHtmlTest.kt
index eeca7b4477..080355a4db 100644
--- a/app/core/src/test/java/com/fsck/k9/message/html/DisplayHtmlTest.kt
+++ b/app/core/src/test/java/com/fsck/k9/message/html/DisplayHtmlTest.kt
@@ -51,7 +51,8 @@ class DisplayHtmlTest {
val numberOfFoundElements = document.select(cssQuery).size
assertEquals(
"Expected to find '$cssQuery' $numberOfExpectedOccurrences time(s) in:\n$html",
- numberOfExpectedOccurrences, numberOfFoundElements
+ numberOfExpectedOccurrences,
+ numberOfFoundElements
)
}
}
diff --git a/app/core/src/test/java/com/fsck/k9/notification/CertificateErrorNotificationControllerTest.kt b/app/core/src/test/java/com/fsck/k9/notification/CertificateErrorNotificationControllerTest.kt
index 74c18c892d..3681ff4a00 100644
--- a/app/core/src/test/java/com/fsck/k9/notification/CertificateErrorNotificationControllerTest.kt
+++ b/app/core/src/test/java/com/fsck/k9/notification/CertificateErrorNotificationControllerTest.kt
@@ -113,7 +113,9 @@ class CertificateErrorNotificationControllerTest : RobolectricTest() {
}
internal inner class TestCertificateErrorNotificationController : CertificateErrorNotificationController(
- notificationHelper, mock(), resourceProvider
+ notificationHelper,
+ mock(),
+ resourceProvider
) {
override fun createContentIntent(account: Account, incoming: Boolean): PendingIntent {
return contentIntent
diff --git a/app/core/src/test/java/com/fsck/k9/notification/NewMailNotificationManagerTest.kt b/app/core/src/test/java/com/fsck/k9/notification/NewMailNotificationManagerTest.kt
index 105f49649b..dda7ca6afc 100644
--- a/app/core/src/test/java/com/fsck/k9/notification/NewMailNotificationManagerTest.kt
+++ b/app/core/src/test/java/com/fsck/k9/notification/NewMailNotificationManagerTest.kt
@@ -382,7 +382,10 @@ class NewMailNotificationManagerTest {
on { createFromMessage(account, message) } doReturn
NotificationContent(
messageReference = createMessageReference(messageUid),
- sender, subject, preview, summary
+ sender,
+ subject,
+ preview,
+ summary
)
}
@@ -407,7 +410,10 @@ class NewMailNotificationManagerTest {
on { createFromMessage(account, message) } doReturn
NotificationContent(
messageReference = createMessageReference(messageUid),
- sender, subject, preview, summary
+ sender,
+ subject,
+ preview,
+ summary
)
}
}
diff --git a/app/core/src/test/java/com/fsck/k9/notification/NotificationIdsTest.kt b/app/core/src/test/java/com/fsck/k9/notification/NotificationIdsTest.kt
index 9c326bc522..dcc9a67c1a 100644
--- a/app/core/src/test/java/com/fsck/k9/notification/NotificationIdsTest.kt
+++ b/app/core/src/test/java/com/fsck/k9/notification/NotificationIdsTest.kt
@@ -41,9 +41,9 @@ class NotificationIdsTest {
}
@Test
- // We avoid gaps. So this test failing is an indication that getGeneralNotificationIds() and/or
- // getAccountNotificationIds() need to be updated.
fun `no gaps between general and account notification IDs`() {
+ // We avoid gaps. So this test failing is an indication that getGeneralNotificationIds() and/or
+ // getAccountNotificationIds() need to be updated.
val account = createAccount(0)
val generalNotificationIds = getGeneralNotificationIds()
@@ -55,8 +55,8 @@ class NotificationIdsTest {
}
@Test
- // We avoid gaps. So this test failing is an indication that getAccountNotificationIds() needs to be updated.
fun `no gaps in notification IDs of an account`() {
+ // We avoid gaps. So this test failing is an indication that getAccountNotificationIds() needs to be updated.
val account = createAccount(0)
val notificationIds = getAccountNotificationIds(account)
@@ -68,8 +68,8 @@ class NotificationIdsTest {
}
@Test
- // We avoid gaps. So this test failing is an indication that getAccountNotificationIds() needs to be updated.
fun `no gap between notification IDs of adjacent accounts`() {
+ // We avoid gaps. So this test failing is an indication that getAccountNotificationIds() needs to be updated.
val account1 = createAccount(1)
val account2 = createAccount(2)
@@ -104,7 +104,7 @@ class NotificationIdsTest {
NotificationIds.getAuthenticationErrorNotificationId(account, true),
NotificationIds.getAuthenticationErrorNotificationId(account, false),
NotificationIds.getFetchingMailNotificationId(account),
- NotificationIds.getNewMailSummaryNotificationId(account),
+ NotificationIds.getNewMailSummaryNotificationId(account)
) + getNewMessageNotificationIds(account)
}
diff --git a/app/html-cleaner/src/main/java/app/k9mail/html/cleaner/BodyCleaner.kt b/app/html-cleaner/src/main/java/app/k9mail/html/cleaner/BodyCleaner.kt
index 43a6d82738..0f0e5cd779 100644
--- a/app/html-cleaner/src/main/java/app/k9mail/html/cleaner/BodyCleaner.kt
+++ b/app/html-cleaner/src/main/java/app/k9mail/html/cleaner/BodyCleaner.kt
@@ -18,7 +18,13 @@ internal class BodyCleaner {
.addAttributes("a", "name")
.addAttributes("div", "align")
.addAttributes(
- "table", "align", "background", "bgcolor", "border", "cellpadding", "cellspacing",
+ "table",
+ "align",
+ "background",
+ "bgcolor",
+ "border",
+ "cellpadding",
+ "cellspacing",
"width"
)
.addAttributes("tr", "align", "background", "bgcolor", "valign")
diff --git a/app/k9mail/src/main/java/com/fsck/k9/App.kt b/app/k9mail/src/main/java/com/fsck/k9/App.kt
index 7f87dcfe2b..c48017178d 100644
--- a/app/k9mail/src/main/java/com/fsck/k9/App.kt
+++ b/app/k9mail/src/main/java/com/fsck/k9/App.kt
@@ -138,7 +138,7 @@ class App : Application(), WorkManagerConfiguration.Provider {
MessageCompose::class.java,
LauncherShortcuts::class.java,
UnreadWidgetProvider::class.java,
- MessageListWidgetProvider::class.java,
+ MessageListWidgetProvider::class.java
)
)
}
diff --git a/app/k9mail/src/main/java/com/fsck/k9/Dependencies.kt b/app/k9mail/src/main/java/com/fsck/k9/Dependencies.kt
index 8967c972a6..76936bbbc1 100644
--- a/app/k9mail/src/main/java/com/fsck/k9/Dependencies.kt
+++ b/app/k9mail/src/main/java/com/fsck/k9/Dependencies.kt
@@ -22,7 +22,7 @@ private val mainAppModule = module {
single {
MessagingListenerProvider(
listOf(
- get(),
+ get()
)
)
}
diff --git a/app/k9mail/src/main/java/com/fsck/k9/auth/OAuthConfigurations.kt b/app/k9mail/src/main/java/com/fsck/k9/auth/OAuthConfigurations.kt
index 639a1934aa..4f1b5f47b5 100644
--- a/app/k9mail/src/main/java/com/fsck/k9/auth/OAuthConfigurations.kt
+++ b/app/k9mail/src/main/java/com/fsck/k9/auth/OAuthConfigurations.kt
@@ -39,7 +39,7 @@ fun createOAuthConfigurationProvider(): OAuthConfigurationProvider {
authorizationEndpoint = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
tokenEndpoint = "https://login.microsoftonline.com/common/oauth2/v2.0/token",
redirectUri = BuildConfig.OAUTH_MICROSOFT_REDIRECT_URI
- ),
+ )
),
googleConfiguration = googleConfig
)
diff --git a/app/k9mail/src/main/java/com/fsck/k9/notification/K9NotificationResourceProvider.kt b/app/k9mail/src/main/java/com/fsck/k9/notification/K9NotificationResourceProvider.kt
index 917d492c3d..2c1eea2603 100644
--- a/app/k9mail/src/main/java/com/fsck/k9/notification/K9NotificationResourceProvider.kt
+++ b/app/k9mail/src/main/java/com/fsck/k9/notification/K9NotificationResourceProvider.kt
@@ -50,7 +50,8 @@ class K9NotificationResourceProvider(private val context: Context) : Notificatio
override fun newMessagesTitle(newMessagesCount: Int): String =
context.resources.getQuantityString(
R.plurals.notification_new_messages_title,
- newMessagesCount, newMessagesCount
+ newMessagesCount,
+ newMessagesCount
)
override fun additionalMessages(overflowMessagesCount: Int, accountName: String): String =
diff --git a/app/k9mail/src/main/java/com/fsck/k9/notification/K9NotificationStrategy.kt b/app/k9mail/src/main/java/com/fsck/k9/notification/K9NotificationStrategy.kt
index 222c54c65d..2221cd0e6a 100644
--- a/app/k9mail/src/main/java/com/fsck/k9/notification/K9NotificationStrategy.kt
+++ b/app/k9mail/src/main/java/com/fsck/k9/notification/K9NotificationStrategy.kt
@@ -19,7 +19,6 @@ class K9NotificationStrategy(private val contacts: Contacts) : NotificationStrat
message: LocalMessage,
isOldMessage: Boolean
): Boolean {
-
if (!K9.isNotificationDuringQuietTimeEnabled && K9.isQuietTime) {
Timber.v("No notification: Quiet time is active")
return false
diff --git a/app/k9mail/src/test/java/com/fsck/k9/widget/unread/UnreadWidgetDataProviderTest.kt b/app/k9mail/src/test/java/com/fsck/k9/widget/unread/UnreadWidgetDataProviderTest.kt
index 1af67b3dc4..42bda43286 100644
--- a/app/k9mail/src/test/java/com/fsck/k9/widget/unread/UnreadWidgetDataProviderTest.kt
+++ b/app/k9mail/src/test/java/com/fsck/k9/widget/unread/UnreadWidgetDataProviderTest.kt
@@ -29,14 +29,20 @@ class UnreadWidgetDataProviderTest : AppRobolectricTest() {
private val folderRepository = createFolderRepository()
private val folderNameFormatterFactory = createFolderNameFormatterFactory()
private val provider = UnreadWidgetDataProvider(
- context, preferences, messageCountsProvider, defaultFolderStrategy,
- folderRepository, folderNameFormatterFactory
+ context,
+ preferences,
+ messageCountsProvider,
+ defaultFolderStrategy,
+ folderRepository,
+ folderNameFormatterFactory
)
@Test
fun unifiedInbox() {
val configuration = UnreadWidgetConfiguration(
- appWidgetId = 1, accountUuid = SearchAccount.UNIFIED_INBOX, folderId = null
+ appWidgetId = 1,
+ accountUuid = SearchAccount.UNIFIED_INBOX,
+ folderId = null
)
val widgetData = provider.loadUnreadWidgetData(configuration)
@@ -50,7 +56,9 @@ class UnreadWidgetDataProviderTest : AppRobolectricTest() {
@Test
fun regularAccount() {
val configuration = UnreadWidgetConfiguration(
- appWidgetId = 3, accountUuid = ACCOUNT_UUID, folderId = null
+ appWidgetId = 3,
+ accountUuid = ACCOUNT_UUID,
+ folderId = null
)
val widgetData = provider.loadUnreadWidgetData(configuration)
diff --git a/app/storage/src/main/java/com/fsck/k9/storage/messages/CheckFolderOperations.kt b/app/storage/src/main/java/com/fsck/k9/storage/messages/CheckFolderOperations.kt
index c7975042d8..37e0a87452 100644
--- a/app/storage/src/main/java/com/fsck/k9/storage/messages/CheckFolderOperations.kt
+++ b/app/storage/src/main/java/com/fsck/k9/storage/messages/CheckFolderOperations.kt
@@ -13,7 +13,8 @@ internal class CheckFolderOperations(private val lockableDatabase: LockableDatab
) { selectionSet, selectionArguments ->
if (allIncludedInUnifiedInbox) {
database.rawQuery(
- "SELECT COUNT(id) FROM folders WHERE integrate = 1 AND id $selectionSet", selectionArguments
+ "SELECT COUNT(id) FROM folders WHERE integrate = 1 AND id $selectionSet",
+ selectionArguments
).use { cursor ->
if (cursor.moveToFirst()) {
val count = cursor.getInt(0)
diff --git a/app/storage/src/main/java/com/fsck/k9/storage/messages/CopyMessageOperations.kt b/app/storage/src/main/java/com/fsck/k9/storage/messages/CopyMessageOperations.kt
index 71afa9ae61..a01b2a3d4d 100644
--- a/app/storage/src/main/java/com/fsck/k9/storage/messages/CopyMessageOperations.kt
+++ b/app/storage/src/main/java/com/fsck/k9/storage/messages/CopyMessageOperations.kt
@@ -236,7 +236,9 @@ ORDER BY message_parts.seq
),
"id = ?",
arrayOf(messageId.toString()),
- null, null, null
+ null,
+ null,
+ null
).use { cursor ->
if (!cursor.moveToNext()) error("Message with ID $messageId not found")
diff --git a/app/storage/src/main/java/com/fsck/k9/storage/messages/KeyValueStoreOperations.kt b/app/storage/src/main/java/com/fsck/k9/storage/messages/KeyValueStoreOperations.kt
index 7d02438a8d..cb2e4e4fad 100644
--- a/app/storage/src/main/java/com/fsck/k9/storage/messages/KeyValueStoreOperations.kt
+++ b/app/storage/src/main/java/com/fsck/k9/storage/messages/KeyValueStoreOperations.kt
@@ -14,7 +14,9 @@ internal class KeyValueStoreOperations(private val lockableDatabase: LockableDat
arrayOf("value_text"),
"name = ?",
arrayOf(name),
- null, null, null
+ null,
+ null,
+ null
).use { cursor ->
if (cursor.moveToFirst()) {
cursor.getStringOrNull(0)
@@ -42,7 +44,9 @@ internal class KeyValueStoreOperations(private val lockableDatabase: LockableDat
arrayOf("value_integer"),
"name = ?",
arrayOf(name),
- null, null, null
+ null,
+ null,
+ null
).use { cursor ->
if (cursor.moveToFirst()) {
cursor.getLongOrNull(0)
@@ -70,7 +74,9 @@ internal class KeyValueStoreOperations(private val lockableDatabase: LockableDat
arrayOf("value_text"),
"name = ? AND folder_id = ?",
arrayOf(name, folderId.toString()),
- null, null, null
+ null,
+ null,
+ null
).use { cursor ->
if (cursor.moveToFirst()) {
cursor.getStringOrNull(0)
@@ -99,7 +105,9 @@ internal class KeyValueStoreOperations(private val lockableDatabase: LockableDat
arrayOf("value_integer"),
"name = ? AND folder_id = ?",
arrayOf(name, folderId.toString()),
- null, null, null
+ null,
+ null,
+ null
).use { cursor ->
if (cursor.moveToFirst()) {
cursor.getLongOrNull(0)
diff --git a/app/storage/src/main/java/com/fsck/k9/storage/messages/MoveMessageOperations.kt b/app/storage/src/main/java/com/fsck/k9/storage/messages/MoveMessageOperations.kt
index 62ae5124ed..10792153b6 100644
--- a/app/storage/src/main/java/com/fsck/k9/storage/messages/MoveMessageOperations.kt
+++ b/app/storage/src/main/java/com/fsck/k9/storage/messages/MoveMessageOperations.kt
@@ -55,7 +55,9 @@ internal class MoveMessageOperations(
),
"id = ?",
arrayOf(messageId.toString()),
- null, null, null
+ null,
+ null,
+ null
).use { cursor ->
if (!cursor.moveToFirst()) {
error("Couldn't find local message [ID: $messageId]")
diff --git a/app/storage/src/main/java/com/fsck/k9/storage/messages/RetrieveMessageListOperations.kt b/app/storage/src/main/java/com/fsck/k9/storage/messages/RetrieveMessageListOperations.kt
index d84480e44f..ddf0a397a9 100644
--- a/app/storage/src/main/java/com/fsck/k9/storage/messages/RetrieveMessageListOperations.kt
+++ b/app/storage/src/main/java/com/fsck/k9/storage/messages/RetrieveMessageListOperations.kt
@@ -46,7 +46,7 @@ WHERE
AND empty = 0 AND deleted = 0
ORDER BY $sortOrder
""",
- selectionArgs,
+ selectionArgs
).use { cursor ->
val cursorMessageAccessor = CursorMessageAccessor(cursor, includesThreadCount = false)
buildList {
@@ -171,7 +171,7 @@ WHERE
AND empty = 0 AND deleted = 0
ORDER BY $sortOrder
""",
- arrayOf(threadId.toString()),
+ arrayOf(threadId.toString())
).use { cursor ->
val cursorMessageAccessor = CursorMessageAccessor(cursor, includesThreadCount = false)
buildList {
diff --git a/app/storage/src/main/java/com/fsck/k9/storage/messages/RetrieveMessageOperations.kt b/app/storage/src/main/java/com/fsck/k9/storage/messages/RetrieveMessageOperations.kt
index 041dda7474..49e39e7ab8 100644
--- a/app/storage/src/main/java/com/fsck/k9/storage/messages/RetrieveMessageOperations.kt
+++ b/app/storage/src/main/java/com/fsck/k9/storage/messages/RetrieveMessageOperations.kt
@@ -20,7 +20,9 @@ internal class RetrieveMessageOperations(private val lockableDatabase: LockableD
arrayOf("uid"),
"id = ?",
arrayOf(messageId.toString()),
- null, null, null
+ null,
+ null,
+ null
).use { cursor ->
if (cursor.moveToFirst()) {
cursor.getString(0)
@@ -174,7 +176,7 @@ internal class RetrieveMessageOperations(private val lockableDatabase: LockableD
"SELECT message_parts.header FROM messages" +
" LEFT JOIN message_parts ON (messages.message_part_id = message_parts.id)" +
" WHERE messages.folder_id = ? AND messages.uid = ?",
- arrayOf(folderId.toString(), messageServerId),
+ arrayOf(folderId.toString(), messageServerId)
).use { cursor ->
if (!cursor.moveToFirst()) throw MessageNotFoundException(folderId, messageServerId)
diff --git a/app/storage/src/main/java/com/fsck/k9/storage/migrations/MigrationTo84.kt b/app/storage/src/main/java/com/fsck/k9/storage/migrations/MigrationTo84.kt
index 01db3ebd80..c1b2326a4d 100644
--- a/app/storage/src/main/java/com/fsck/k9/storage/migrations/MigrationTo84.kt
+++ b/app/storage/src/main/java/com/fsck/k9/storage/migrations/MigrationTo84.kt
@@ -17,7 +17,6 @@ internal class MigrationTo84(private val db: SQLiteDatabase) {
null
).use { cursor ->
cursor.map {
-
val messageId = it.getLong(0)
messageId to AddressSet(
diff --git a/app/storage/src/test/java/com/fsck/k9/storage/messages/FolderHelpers.kt b/app/storage/src/test/java/com/fsck/k9/storage/messages/FolderHelpers.kt
index b2ea71b55d..56d6165496 100644
--- a/app/storage/src/test/java/com/fsck/k9/storage/messages/FolderHelpers.kt
+++ b/app/storage/src/test/java/com/fsck/k9/storage/messages/FolderHelpers.kt
@@ -23,7 +23,7 @@ fun SQLiteDatabase.createFolder(
visibleLimit: Int = 25,
status: String? = null,
flaggedCount: Int = 0,
- moreMessages: String = "unknown",
+ moreMessages: String = "unknown"
): Long {
val values = ContentValues().apply {
put("name", name)
diff --git a/app/storage/src/test/java/com/fsck/k9/storage/messages/MessagePartDatabaseHelpers.kt b/app/storage/src/test/java/com/fsck/k9/storage/messages/MessagePartDatabaseHelpers.kt
index 6aadf98f39..d155a0b4e8 100644
--- a/app/storage/src/test/java/com/fsck/k9/storage/messages/MessagePartDatabaseHelpers.kt
+++ b/app/storage/src/test/java/com/fsck/k9/storage/messages/MessagePartDatabaseHelpers.kt
@@ -71,7 +71,7 @@ fun SQLiteDatabase.readMessageParts(): List {
epilogue = cursor.getStringOrNull("epilogue"),
boundary = cursor.getStringOrNull("boundary"),
contentId = cursor.getStringOrNull("content_id"),
- serverExtra = cursor.getStringOrNull("server_extra"),
+ serverExtra = cursor.getStringOrNull("server_extra")
)
}
}
diff --git a/app/storage/src/test/java/com/fsck/k9/storage/messages/RetrieveFolderOperationsTest.kt b/app/storage/src/test/java/com/fsck/k9/storage/messages/RetrieveFolderOperationsTest.kt
index 4b4c6ed8e7..41d1e9006a 100644
--- a/app/storage/src/test/java/com/fsck/k9/storage/messages/RetrieveFolderOperationsTest.kt
+++ b/app/storage/src/test/java/com/fsck/k9/storage/messages/RetrieveFolderOperationsTest.kt
@@ -197,7 +197,7 @@ class RetrieveFolderOperationsTest : RobolectricTest() {
val (folderId1, folderId2, _) = listOf(
sqliteDatabase.createFolder(name = "Folder 1", displayClass = "FIRST_CLASS"),
sqliteDatabase.createFolder(name = "Folder 2", displayClass = "SECOND_CLASS"),
- sqliteDatabase.createFolder(name = "Folder 3", displayClass = "NO_CLASS"),
+ sqliteDatabase.createFolder(name = "Folder 3", displayClass = "NO_CLASS")
)
val result = retrieveFolderOperations.getDisplayFolders(
@@ -215,7 +215,7 @@ class RetrieveFolderOperationsTest : RobolectricTest() {
val (folderId1, _, folderId3) = listOf(
sqliteDatabase.createFolder(name = "Folder 1", displayClass = "FIRST_CLASS"),
sqliteDatabase.createFolder(name = "Folder 2", displayClass = "SECOND_CLASS"),
- sqliteDatabase.createFolder(name = "Folder 3", displayClass = "NO_CLASS"),
+ sqliteDatabase.createFolder(name = "Folder 3", displayClass = "NO_CLASS")
)
val result = retrieveFolderOperations.getDisplayFolders(
@@ -238,7 +238,7 @@ class RetrieveFolderOperationsTest : RobolectricTest() {
val (folderId1, folderId2, _) = listOf(
sqliteDatabase.createFolder(name = "Folder 1", displayClass = "FIRST_CLASS"),
sqliteDatabase.createFolder(name = "Folder 2", displayClass = "SECOND_CLASS"),
- sqliteDatabase.createFolder(name = "Folder 3", displayClass = "NO_CLASS"),
+ sqliteDatabase.createFolder(name = "Folder 3", displayClass = "NO_CLASS")
)
val result = retrieveFolderOperations.getDisplayFolders(
@@ -292,7 +292,7 @@ class RetrieveFolderOperationsTest : RobolectricTest() {
fun `get folder id`() {
val (_, folderId2) = listOf(
sqliteDatabase.createFolder(serverId = "folder1"),
- sqliteDatabase.createFolder(serverId = "folder2"),
+ sqliteDatabase.createFolder(serverId = "folder2")
)
val result = retrieveFolderOperations.getFolderId(folderServerId = "folder2")
@@ -311,7 +311,7 @@ class RetrieveFolderOperationsTest : RobolectricTest() {
fun `get folder server id`() {
val (_, folderId2) = listOf(
sqliteDatabase.createFolder(serverId = "folder1"),
- sqliteDatabase.createFolder(serverId = "folder2"),
+ sqliteDatabase.createFolder(serverId = "folder2")
)
val result = retrieveFolderOperations.getFolderServerId(folderId2)
diff --git a/app/storage/src/test/java/com/fsck/k9/storage/notifications/NotificationsTableHelpers.kt b/app/storage/src/test/java/com/fsck/k9/storage/notifications/NotificationsTableHelpers.kt
index 80f0461e4d..d31b531980 100644
--- a/app/storage/src/test/java/com/fsck/k9/storage/notifications/NotificationsTableHelpers.kt
+++ b/app/storage/src/test/java/com/fsck/k9/storage/notifications/NotificationsTableHelpers.kt
@@ -36,5 +36,5 @@ fun SQLiteDatabase.readNotifications(): List {
data class NotificationEntry(
val messageId: Long?,
val notificationId: Int?,
- val timestamp: Long?,
+ val timestamp: Long?
)
diff --git a/app/ui/base/src/main/java/com/fsck/k9/ui/base/ThemeManager.kt b/app/ui/base/src/main/java/com/fsck/k9/ui/base/ThemeManager.kt
index 4eef05baf5..87d3a32229 100644
--- a/app/ui/base/src/main/java/com/fsck/k9/ui/base/ThemeManager.kt
+++ b/app/ui/base/src/main/java/com/fsck/k9/ui/base/ThemeManager.kt
@@ -21,7 +21,7 @@ class ThemeManager(
private val context: Context,
private val themeProvider: ThemeProvider,
private val generalSettingsManager: GeneralSettingsManager,
- private val appCoroutineScope: CoroutineScope,
+ private val appCoroutineScope: CoroutineScope
) {
private val generalSettings: GeneralSettings
diff --git a/app/ui/base/src/main/java/com/fsck/k9/ui/base/extensions/TextInputLayoutExtensions.kt b/app/ui/base/src/main/java/com/fsck/k9/ui/base/extensions/TextInputLayoutExtensions.kt
index ca4f4305b3..a5d6577c31 100644
--- a/app/ui/base/src/main/java/com/fsck/k9/ui/base/extensions/TextInputLayoutExtensions.kt
+++ b/app/ui/base/src/main/java/com/fsck/k9/ui/base/extensions/TextInputLayoutExtensions.kt
@@ -32,7 +32,7 @@ fun TextInputLayout.configureAuthenticatedPasswordToggle(
activity: FragmentActivity,
title: String,
subtitle: String,
- needScreenLockMessage: String,
+ needScreenLockMessage: String
) {
val viewModel = ViewModelProvider(activity).get()
viewModel.textInputLayout = this
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/FolderInfoHolder.kt b/app/ui/legacy/src/main/java/com/fsck/k9/activity/FolderInfoHolder.kt
index 1442065b80..4ccc496e7f 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/FolderInfoHolder.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/FolderInfoHolder.kt
@@ -12,8 +12,11 @@ class FolderInfoHolder(
account: Account
) {
@JvmField val databaseId = localFolder.databaseId
+
@JvmField val displayName = getDisplayName(account, localFolder)
+
@JvmField var loading = false
+
@JvmField var moreMessages = localFolder.hasMoreMessages()
private fun getDisplayName(account: Account, localFolder: LocalFolder): String {
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt
index f8a1b5b2af..a806a996b0 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageList.kt
@@ -274,7 +274,9 @@ open class MessageList :
if (!hasMessageListFragment) {
val fragmentTransaction = fragmentManager.beginTransaction()
val messageListFragment = MessageListFragment.newInstance(
- search!!, false, K9.isThreadedViewEnabled && !noThreading
+ search!!,
+ false,
+ K9.isThreadedViewEnabled && !noThreading
)
fragmentTransaction.add(R.id.message_list_container, messageListFragment)
fragmentTransaction.commitNow()
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageListActivityConfig.kt b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageListActivityConfig.kt
index ba099bca56..0e33ac5442 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageListActivityConfig.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageListActivityConfig.kt
@@ -32,7 +32,7 @@ data class MessageListActivityConfig(
val fontSizeMessageViewDate: Int,
val fontSizeMessageViewContentAsPercent: Int,
val swipeRightAction: SwipeAction,
- val swipeLeftAction: SwipeAction,
+ val swipeLeftAction: SwipeAction
) {
companion object {
@@ -64,7 +64,7 @@ data class MessageListActivityConfig(
fontSizeMessageViewDate = K9.fontSizes.messageViewDate,
fontSizeMessageViewContentAsPercent = K9.fontSizes.messageViewContentAsPercent,
swipeRightAction = K9.swipeRightAction,
- swipeLeftAction = K9.swipeLeftAction,
+ swipeLeftAction = K9.swipeLeftAction
)
}
}
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.kt b/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.kt
index f847caeac7..813337fdd7 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.kt
@@ -580,7 +580,8 @@ class RecipientPresenter(
if (currentCryptoMode == CryptoMode.NO_CHOICE) {
if (currentCryptoStatus.hasAutocryptPendingIntent()) {
recipientMvpView.launchUserInteractionPendingIntent(
- currentCryptoStatus.autocryptPendingIntent, REQUEST_CODE_AUTOCRYPT
+ currentCryptoStatus.autocryptPendingIntent,
+ REQUEST_CODE_AUTOCRYPT
)
} else if (isEncryptOnNoChoice) {
// TODO warning dialog if we override, especially from reply!
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/contacts/ContactLetterBitmapCreator.kt b/app/ui/legacy/src/main/java/com/fsck/k9/contacts/ContactLetterBitmapCreator.kt
index 935bdf01c9..eab56cc7fd 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/contacts/ContactLetterBitmapCreator.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/contacts/ContactLetterBitmapCreator.kt
@@ -35,7 +35,8 @@ class ContactLetterBitmapCreator(
canvas.drawText(
letter,
pictureSizeInPx / 2f - width / 2f,
- pictureSizeInPx / 2f + rect.height() / 2f, paint
+ pictureSizeInPx / 2f + rect.height() / 2f,
+ paint
)
return bitmap
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/K9Drawer.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/K9Drawer.kt
index 33ea62825a..f2a66eeee7 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/K9Drawer.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/K9Drawer.kt
@@ -313,7 +313,10 @@ class K9Drawer(private val parent: MessageList, savedInstanceState: Bundle?) : K
swipeRefreshLayout.setOnRefreshListener {
val accountToRefresh = if (headerView.selectionListShown) null else account
messagingController.checkMail(
- accountToRefresh, true, true, true,
+ accountToRefresh,
+ true,
+ true,
+ true,
object : SimpleMessagingListener() {
override fun checkMailFinished(context: Context?, account: Account?) {
swipeRefreshLayout.post {
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/account/AccountImageModelLoader.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/account/AccountImageModelLoader.kt
index 4bc81b4910..2b52817b19 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/account/AccountImageModelLoader.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/account/AccountImageModelLoader.kt
@@ -18,7 +18,7 @@ import java.security.MessageDigest
*/
internal class AccountImageModelLoader(
private val contactPhotoLoader: ContactPhotoLoader,
- private val accountFallbackImageProvider: AccountFallbackImageProvider,
+ private val accountFallbackImageProvider: AccountFallbackImageProvider
) : ModelLoader {
override fun buildLoadData(
accountImage: AccountImage,
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/helper/ContextExtensions.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/helper/ContextExtensions.kt
index 08b8115fe2..4d439fa656 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/helper/ContextExtensions.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/helper/ContextExtensions.kt
@@ -1,4 +1,5 @@
@file:JvmName("ContextHelper")
+
package com.fsck.k9.ui.helper
import android.app.Activity
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/messagelist/MessageListFragment.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/messagelist/MessageListFragment.kt
index efc851840c..4b6b914e91 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/messagelist/MessageListFragment.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/messagelist/MessageListFragment.kt
@@ -1156,7 +1156,8 @@ class MessageListFragment :
operation == FolderOperation.COPY && !messagingController.isCopyCapable(message)
) {
val toast = Toast.makeText(
- activity, R.string.move_copy_cannot_copy_unsynced_message,
+ activity,
+ R.string.move_copy_cannot_copy_unsynced_message,
Toast.LENGTH_LONG
)
toast.show()
@@ -2064,7 +2065,7 @@ class MessageListFragment :
arguments = bundleOf(
ARG_SEARCH to search,
ARG_IS_THREAD_DISPLAY to isThreadDisplay,
- ARG_THREADED_LIST to threadedList,
+ ARG_THREADED_LIST to threadedList
)
}
}
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.kt
index b1d70c222c..3600125e3d 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageViewFragment.kt
@@ -338,7 +338,9 @@ class MessageViewFragment :
hideKeyboard()
val handledByCryptoPresenter = messageCryptoPresenter.maybeHandleShowMessage(
- messageTopView, account, messageViewInfo
+ messageTopView,
+ account,
+ messageViewInfo
)
if (!handledByCryptoPresenter) {
@@ -673,8 +675,11 @@ class MessageViewFragment :
val confirmText = getString(R.string.dialog_confirm_delete_confirm_button)
val cancelText = getString(R.string.dialog_confirm_delete_cancel_button)
ConfirmationDialogFragment.newInstance(
- dialogId, title, message,
- confirmText, cancelText
+ dialogId,
+ title,
+ message,
+ confirmText,
+ cancelText
)
}
R.id.dialog_confirm_spam -> {
@@ -683,8 +688,11 @@ class MessageViewFragment :
val confirmText = getString(R.string.dialog_confirm_spam_confirm_button)
val cancelText = getString(R.string.dialog_confirm_spam_cancel_button)
ConfirmationDialogFragment.newInstance(
- dialogId, title, message,
- confirmText, cancelText
+ dialogId,
+ title,
+ message,
+ confirmText,
+ cancelText
)
}
R.id.dialog_attachment_progress -> {
@@ -827,7 +835,12 @@ class MessageViewFragment :
val maskedRequestCode = requestCode or REQUEST_MASK_CRYPTO_PRESENTER
requireActivity().startIntentSenderForResult(
- intentSender, maskedRequestCode, fillIntent, flagsMask, flagValues, extraFlags
+ intentSender,
+ maskedRequestCode,
+ fillIntent,
+ flagsMask,
+ flagValues,
+ extraFlags
)
}
@@ -917,7 +930,12 @@ class MessageViewFragment :
try {
val maskedRequestCode = requestCode or REQUEST_MASK_LOADER_HELPER
requireActivity().startIntentSenderForResult(
- intentSender, maskedRequestCode, fillIntent, flagsMask, flagValues, extraFlags
+ intentSender,
+ maskedRequestCode,
+ fillIntent,
+ flagsMask,
+ flagValues,
+ extraFlags
)
} catch (e: SendIntentException) {
Timber.e(e, "Irrecoverable error calling PendingIntent!")
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/RecipientNamesView.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/RecipientNamesView.kt
index c1c1c89a02..9c8eb53ccf 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/RecipientNamesView.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/RecipientNamesView.kt
@@ -75,7 +75,11 @@ class RecipientNamesView(context: Context, attrs: AttributeSet?) : ViewGroup(con
if (isInEditMode) {
recipientNames = listOf(
- "Grace Hopper", "Katherine Johnson", "Margaret Hamilton", "Adele Goldberg", "Steve Shirley"
+ "Grace Hopper",
+ "Katherine Johnson",
+ "Margaret Hamilton",
+ "Adele Goldberg",
+ "Steve Shirley"
)
numberOfRecipients = 8
}
@@ -116,7 +120,9 @@ class RecipientNamesView(context: Context, attrs: AttributeSet?) : ViewGroup(con
val availableWidth = width
val recipientLayoutData = recipientLayoutCreator.createRecipientLayout(
- recipientNames, numberOfRecipients, availableWidth
+ recipientNames,
+ numberOfRecipients,
+ availableWidth
)
recipientNameTextView.text = recipientLayoutData.recipientNames
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/SettingsViewModel.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/SettingsViewModel.kt
index 5036cd72a7..bd87290d6e 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/SettingsViewModel.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/SettingsViewModel.kt
@@ -14,7 +14,7 @@ import kotlinx.coroutines.launch
internal class SettingsViewModel(
private val accountManager: AccountManager,
private val coroutineScope: CoroutineScope = GlobalScope,
- private val coroutineDispatcher: CoroutineDispatcher = Dispatchers.IO,
+ private val coroutineDispatcher: CoroutineDispatcher = Dispatchers.IO
) : ViewModel() {
val accounts = accountManager.getAccountsFlow().asLiveData()
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsDataStore.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsDataStore.kt
index 9672c89366..31551ec120 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsDataStore.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsDataStore.kt
@@ -280,7 +280,7 @@ class AccountSettingsDataStore(
vibration = NotificationVibration(
isEnabled = isVibrationEnabled,
pattern = vibrationPattern,
- repeatCount = vibrationTimes,
+ repeatCount = vibrationTimes
)
)
}
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/AutocryptPreferEncryptPreference.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/AutocryptPreferEncryptPreference.kt
index ab7f345cf2..c14928dae4 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/AutocryptPreferEncryptPreference.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/AutocryptPreferEncryptPreference.kt
@@ -17,7 +17,8 @@ constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = TypedArrayUtils.getAttr(
- context, androidx.preference.R.attr.preferenceStyle,
+ context,
+ androidx.preference.R.attr.preferenceStyle,
android.R.attr.preferenceStyle
),
defStyleRes: Int = 0
@@ -48,7 +49,8 @@ constructor(
companion object {
init {
PreferenceFragmentCompat.registerPreferenceFragment(
- AutocryptPreferEncryptPreference::class.java, AutocryptPreferEncryptDialogFragment::class.java
+ AutocryptPreferEncryptPreference::class.java,
+ AutocryptPreferEncryptDialogFragment::class.java
)
}
}
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/FolderListPreference.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/FolderListPreference.kt
index 8f6677ac5c..24a3a70eb1 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/FolderListPreference.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/FolderListPreference.kt
@@ -25,7 +25,8 @@ constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = TypedArrayUtils.getAttr(
- context, androidx.preference.R.attr.dialogPreferenceStyle,
+ context,
+ androidx.preference.R.attr.dialogPreferenceStyle,
android.R.attr.dialogPreferenceStyle
),
defStyleRes: Int = 0
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/NotificationsPreference.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/NotificationsPreference.kt
index 4322a6051a..9361ab1f2e 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/NotificationsPreference.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/NotificationsPreference.kt
@@ -23,7 +23,8 @@ constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = TypedArrayUtils.getAttr(
- context, androidx.preference.R.attr.preferenceStyle,
+ context,
+ androidx.preference.R.attr.preferenceStyle,
android.R.attr.preferenceStyle
),
defStyleRes: Int = 0
@@ -49,7 +50,8 @@ constructor(
companion object {
init {
PreferenceFragmentCompat.registerPreferenceFragment(
- NotificationsPreference::class.java, DialogFragment::class.java
+ NotificationsPreference::class.java,
+ DialogFragment::class.java
)
}
}
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/VibrationPreference.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/VibrationPreference.kt
index d8ea240f18..8784906cfb 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/VibrationPreference.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/VibrationPreference.kt
@@ -75,7 +75,8 @@ constructor(
init {
PreferenceFragmentCompat.registerPreferenceFragment(
- VibrationPreference::class.java, VibrationDialogFragment::class.java
+ VibrationPreference::class.java,
+ VibrationDialogFragment::class.java
)
}
diff --git a/app/ui/legacy/src/test/java/com/fsck/k9/activity/compose/AttachmentPresenterTest.kt b/app/ui/legacy/src/test/java/com/fsck/k9/activity/compose/AttachmentPresenterTest.kt
index 6a1f04a0c5..e67ec906ce 100644
--- a/app/ui/legacy/src/test/java/com/fsck/k9/activity/compose/AttachmentPresenterTest.kt
+++ b/app/ui/legacy/src/test/java/com/fsck/k9/activity/compose/AttachmentPresenterTest.kt
@@ -47,7 +47,10 @@ class AttachmentPresenterTest : K9RobolectricTest() {
@Before
fun setUp() {
attachmentPresenter = AttachmentPresenter(
- ApplicationProvider.getApplicationContext(), attachmentMvpView, loaderManager, listener
+ ApplicationProvider.getApplicationContext(),
+ attachmentMvpView,
+ loaderManager,
+ listener
)
}
@@ -57,8 +60,13 @@ class AttachmentPresenterTest : K9RobolectricTest() {
val message = MimeMessage()
MimeMessageHelper.setBody(message, TextBody(TEXT))
val attachmentViewInfo = AttachmentViewInfo(
- MIME_TYPE, ATTACHMENT_NAME, size, URI, false,
- LocalBodyPart(ACCOUNT_UUID, mock(), MESSAGE_ID, size), true
+ MIME_TYPE,
+ ATTACHMENT_NAME,
+ size,
+ URI,
+ false,
+ LocalBodyPart(ACCOUNT_UUID, mock(), MESSAGE_ID, size),
+ true
)
val messageViewInfo = MessageViewInfo(
message, false, message, SUBJECT, false, TEXT, listOf(attachmentViewInfo), null, attachmentResolver,
@@ -85,8 +93,13 @@ class AttachmentPresenterTest : K9RobolectricTest() {
val message = MimeMessage()
MimeMessageHelper.setBody(message, TextBody(TEXT))
val attachmentViewInfo = AttachmentViewInfo(
- MIME_TYPE, ATTACHMENT_NAME, size, URI, false,
- LocalBodyPart(ACCOUNT_UUID, mock(), MESSAGE_ID, size), false
+ MIME_TYPE,
+ ATTACHMENT_NAME,
+ size,
+ URI,
+ false,
+ LocalBodyPart(ACCOUNT_UUID, mock(), MESSAGE_ID, size),
+ false
)
val messageViewInfo = MessageViewInfo(
message, false, message, SUBJECT, false, TEXT, listOf(attachmentViewInfo), null, attachmentResolver,
diff --git a/app/ui/legacy/src/test/java/com/fsck/k9/activity/compose/RecipientPresenterTest.kt b/app/ui/legacy/src/test/java/com/fsck/k9/activity/compose/RecipientPresenterTest.kt
index 853170cba7..6d15ffb5dd 100644
--- a/app/ui/legacy/src/test/java/com/fsck/k9/activity/compose/RecipientPresenterTest.kt
+++ b/app/ui/legacy/src/test/java/com/fsck/k9/activity/compose/RecipientPresenterTest.kt
@@ -155,7 +155,8 @@ class RecipientPresenterTest : K9RobolectricTest() {
@Test
fun getCurrentCryptoStatus_withOpportunistic() {
val recipientAutocryptStatus = RecipientAutocryptStatus(
- RecipientAutocryptStatusType.AVAILABLE_UNCONFIRMED, null
+ RecipientAutocryptStatusType.AVAILABLE_UNCONFIRMED,
+ null
)
setupCryptoProvider(recipientAutocryptStatus)
@@ -170,7 +171,8 @@ class RecipientPresenterTest : K9RobolectricTest() {
@Test
fun getCurrentCryptoStatus_withOpportunistic__confirmed() {
val recipientAutocryptStatus = RecipientAutocryptStatus(
- RecipientAutocryptStatusType.AVAILABLE_CONFIRMED, null
+ RecipientAutocryptStatusType.AVAILABLE_CONFIRMED,
+ null
)
setupCryptoProvider(recipientAutocryptStatus)
@@ -185,7 +187,8 @@ class RecipientPresenterTest : K9RobolectricTest() {
@Test
fun getCurrentCryptoStatus_withOpportunistic__missingKeys() {
val recipientAutocryptStatus = RecipientAutocryptStatus(
- RecipientAutocryptStatusType.UNAVAILABLE, null
+ RecipientAutocryptStatusType.UNAVAILABLE,
+ null
)
setupCryptoProvider(recipientAutocryptStatus)
@@ -200,7 +203,8 @@ class RecipientPresenterTest : K9RobolectricTest() {
@Test
fun getCurrentCryptoStatus_withOpportunistic__privateMissingKeys() {
val recipientAutocryptStatus = RecipientAutocryptStatus(
- RecipientAutocryptStatusType.UNAVAILABLE, null
+ RecipientAutocryptStatusType.UNAVAILABLE,
+ null
)
setupCryptoProvider(recipientAutocryptStatus)
@@ -217,7 +221,8 @@ class RecipientPresenterTest : K9RobolectricTest() {
@Test
fun getCurrentCryptoStatus_withModeDisabled() {
val recipientAutocryptStatus = RecipientAutocryptStatus(
- RecipientAutocryptStatusType.AVAILABLE_UNCONFIRMED, null
+ RecipientAutocryptStatusType.AVAILABLE_UNCONFIRMED,
+ null
)
setupCryptoProvider(recipientAutocryptStatus)
@@ -234,7 +239,8 @@ class RecipientPresenterTest : K9RobolectricTest() {
@Test
fun getCurrentCryptoStatus_withModePrivate() {
val recipientAutocryptStatus = RecipientAutocryptStatus(
- RecipientAutocryptStatusType.AVAILABLE_UNCONFIRMED, null
+ RecipientAutocryptStatusType.AVAILABLE_UNCONFIRMED,
+ null
)
setupCryptoProvider(recipientAutocryptStatus)
diff --git a/app/ui/legacy/src/test/java/com/fsck/k9/message/PgpMessageBuilderTest.kt b/app/ui/legacy/src/test/java/com/fsck/k9/message/PgpMessageBuilderTest.kt
index a2c91597ee..a37f1db7ff 100644
--- a/app/ui/legacy/src/test/java/com/fsck/k9/message/PgpMessageBuilderTest.kt
+++ b/app/ui/legacy/src/test/java/com/fsck/k9/message/PgpMessageBuilderTest.kt
@@ -192,7 +192,8 @@ class PgpMessageBuilderTest : K9RobolectricTest() {
`when`(
openPgpApi.executeApi(
capturedApiIntent.capture(),
- any(), anyOrNull()
+ any(),
+ anyOrNull()
)
).thenReturn(returnIntent)
@@ -217,7 +218,8 @@ class PgpMessageBuilderTest : K9RobolectricTest() {
val contentBodyPart = multipart.getBodyPart(0)
Assert.assertEquals(
"first part must have content type text/plain",
- "text/plain", MimeUtility.getHeaderParameter(contentBodyPart.contentType, null)
+ "text/plain",
+ MimeUtility.getHeaderParameter(contentBodyPart.contentType, null)
)
assertTrue("signed message body must be TextBody", contentBodyPart.body is TextBody)
Assert.assertEquals(MimeUtil.ENC_QUOTED_PRINTABLE, (contentBodyPart.body as TextBody).encoding)
@@ -226,16 +228,19 @@ class PgpMessageBuilderTest : K9RobolectricTest() {
val signatureBodyPart = multipart.getBodyPart(1)
val contentType = signatureBodyPart.contentType
Assert.assertEquals(
- "second part must be pgp signature", "application/pgp-signature",
+ "second part must be pgp signature",
+ "application/pgp-signature",
MimeUtility.getHeaderParameter(contentType, null)
)
Assert.assertEquals(
- "second part must be called signature.asc", "signature.asc",
+ "second part must be called signature.asc",
+ "signature.asc",
MimeUtility.getHeaderParameter(contentType, "name")
)
assertContentOfBodyPartEquals(
"content must match the supplied detached signature",
- signatureBodyPart, byteArrayOf(1, 2, 3)
+ signatureBodyPart,
+ byteArrayOf(1, 2, 3)
)
assertMessageHasAutocryptHeader(message, SENDER_EMAIL, false, AUTOCRYPT_KEY_MATERIAL)
@@ -483,7 +488,8 @@ class PgpMessageBuilderTest : K9RobolectricTest() {
`when`(
openPgpApi.executeApi(
- capturedApiIntent.capture(), any(OpenPgpDataSource::class.java),
+ capturedApiIntent.capture(),
+ any(OpenPgpDataSource::class.java),
any(OutputStream::class.java)
)
).thenReturn(returnIntent)
@@ -512,17 +518,20 @@ class PgpMessageBuilderTest : K9RobolectricTest() {
val dummyBodyPart = multipart.getBodyPart(0)
Assert.assertEquals(
"first part must be pgp encrypted dummy part",
- "application/pgp-encrypted", dummyBodyPart.contentType
+ "application/pgp-encrypted",
+ dummyBodyPart.contentType
)
assertContentOfBodyPartEquals(
"content must match the supplied detached signature",
- dummyBodyPart, "Version: 1"
+ dummyBodyPart,
+ "Version: 1"
)
val encryptedBodyPart = multipart.getBodyPart(1)
Assert.assertEquals(
"second part must be octet-stream of encrypted data",
- "application/octet-stream; name=\"encrypted.asc\"", encryptedBodyPart.contentType
+ "application/octet-stream; name=\"encrypted.asc\"",
+ encryptedBodyPart.contentType
)
assertTrue(
"message body must be BinaryTempFileBody",
@@ -550,7 +559,8 @@ class PgpMessageBuilderTest : K9RobolectricTest() {
`when`(
openPgpApi.executeApi(
- capturedApiIntent.capture(), any(OpenPgpDataSource::class.java),
+ capturedApiIntent.capture(),
+ any(OpenPgpDataSource::class.java),
any(OutputStream::class.java)
)
).thenReturn(returnIntent)
@@ -595,7 +605,8 @@ class PgpMessageBuilderTest : K9RobolectricTest() {
`when`(
openPgpApi.executeApi(
- capturedApiIntent.capture(), any(OpenPgpDataSource::class.java),
+ capturedApiIntent.capture(),
+ any(OpenPgpDataSource::class.java),
any(OutputStream::class.java)
)
).thenReturn(returnIntent)
@@ -707,8 +718,11 @@ class PgpMessageBuilderTest : K9RobolectricTest() {
resourceProvider: CoreResourceProvider
): PgpMessageBuilder {
val builder = PgpMessageBuilder(
- MessageIdGenerator.getInstance(), BoundaryGenerator.getInstance(),
- AutocryptOperations.getInstance(), autocryptOpenPgpApiInteractor, resourceProvider
+ MessageIdGenerator.getInstance(),
+ BoundaryGenerator.getInstance(),
+ AutocryptOperations.getInstance(),
+ autocryptOpenPgpApiInteractor,
+ resourceProvider
)
builder.setOpenPgpApi(openPgpApi)
diff --git a/app/ui/message-list-widget/src/main/java/app/k9mail/ui/widget/list/MessageListItem.kt b/app/ui/message-list-widget/src/main/java/app/k9mail/ui/widget/list/MessageListItem.kt
index 19c266df10..230fe6cf07 100644
--- a/app/ui/message-list-widget/src/main/java/app/k9mail/ui/widget/list/MessageListItem.kt
+++ b/app/ui/message-list-widget/src/main/java/app/k9mail/ui/widget/list/MessageListItem.kt
@@ -18,5 +18,5 @@ internal data class MessageListItem(
val sortMessageDate: Long,
val sortInternalDate: Long,
val sortIsStarred: Boolean,
- val sortDatabaseId: Long,
+ val sortDatabaseId: Long
)
diff --git a/app/ui/message-list-widget/src/main/java/app/k9mail/ui/widget/list/MessageListItemMapper.kt b/app/ui/message-list-widget/src/main/java/app/k9mail/ui/widget/list/MessageListItemMapper.kt
index e0f7653590..bac2745fbd 100644
--- a/app/ui/message-list-widget/src/main/java/app/k9mail/ui/widget/list/MessageListItemMapper.kt
+++ b/app/ui/message-list-widget/src/main/java/app/k9mail/ui/widget/list/MessageListItemMapper.kt
@@ -44,7 +44,7 @@ internal class MessageListItemMapper(
sortMessageDate = message.messageDate,
sortInternalDate = message.internalDate,
sortIsStarred = message.isStarred,
- sortDatabaseId = message.id,
+ sortDatabaseId = message.id
)
}
diff --git a/app/ui/message-list-widget/src/main/java/app/k9mail/ui/widget/list/MessageListWidgetManager.kt b/app/ui/message-list-widget/src/main/java/app/k9mail/ui/widget/list/MessageListWidgetManager.kt
index 6eab9f1d38..e503d1ce58 100644
--- a/app/ui/message-list-widget/src/main/java/app/k9mail/ui/widget/list/MessageListWidgetManager.kt
+++ b/app/ui/message-list-widget/src/main/java/app/k9mail/ui/widget/list/MessageListWidgetManager.kt
@@ -12,7 +12,7 @@ import timber.log.Timber
class MessageListWidgetManager(
private val context: Context,
private val messageListRepository: MessageListRepository,
- private val config: MessageListWidgetConfig,
+ private val config: MessageListWidgetConfig
) {
private lateinit var appWidgetManager: AppWidgetManager
diff --git a/backend/imap/src/main/java/com/fsck/k9/backend/imap/CommandMoveOrCopyMessages.kt b/backend/imap/src/main/java/com/fsck/k9/backend/imap/CommandMoveOrCopyMessages.kt
index c3b92903aa..b834f9a3b3 100644
--- a/backend/imap/src/main/java/com/fsck/k9/backend/imap/CommandMoveOrCopyMessages.kt
+++ b/backend/imap/src/main/java/com/fsck/k9/backend/imap/CommandMoveOrCopyMessages.kt
@@ -48,7 +48,8 @@ internal class CommandMoveOrCopyMessages(private val imapStore: ImapStore) {
remoteSrcFolder.open(OpenMode.READ_WRITE)
if (remoteSrcFolder.mode != OpenMode.READ_WRITE) {
throw MessagingException(
- "moveOrCopyMessages: could not open remoteSrcFolder $srcFolder read/write", true
+ "moveOrCopyMessages: could not open remoteSrcFolder $srcFolder read/write",
+ true
)
}
@@ -56,7 +57,10 @@ internal class CommandMoveOrCopyMessages(private val imapStore: ImapStore) {
Timber.d(
"moveOrCopyMessages: source folder = %s, %d messages, destination folder = %s, isCopy = %s",
- srcFolder, messages.size, destFolder, isCopy
+ srcFolder,
+ messages.size,
+ destFolder,
+ isCopy
)
remoteDestFolder = imapStore.getFolder(destFolder)
diff --git a/backend/imap/src/main/java/com/fsck/k9/backend/imap/ImapSync.kt b/backend/imap/src/main/java/com/fsck/k9/backend/imap/ImapSync.kt
index 66d703092f..f5276a9006 100644
--- a/backend/imap/src/main/java/com/fsck/k9/backend/imap/ImapSync.kt
+++ b/backend/imap/src/main/java/com/fsck/k9/backend/imap/ImapSync.kt
@@ -131,7 +131,9 @@ internal class ImapSync(
Timber.v(
"SYNC: About to get messages %d through %d for folder %s",
- remoteStart, remoteMessageCount, folder
+ remoteStart,
+ remoteMessageCount,
+ folder
)
val headerProgress = AtomicInteger(0)
@@ -235,7 +237,9 @@ internal class ImapSync(
listener.syncFailed(folder, rootMessage, e)
Timber.e(
- "Failed synchronizing folder %s:%s @ %tc", accountName, folder,
+ "Failed synchronizing folder %s:%s @ %tc",
+ accountName,
+ folder,
System.currentTimeMillis()
)
} finally {
@@ -337,7 +341,9 @@ internal class ImapSync(
Timber.d(
"SYNC: Have %d large messages and %d small messages out of %d unsynced messages",
- largeMessages.size, smallMessages.size, unsyncedMessages.size
+ largeMessages.size,
+ smallMessages.size,
+ unsyncedMessages.size
)
unsyncedMessages.clear()
@@ -458,7 +464,9 @@ internal class ImapSync(
if (message.isSet(Flag.DELETED)) {
Timber.v(
"Newly downloaded message %s:%s:%s was marked deleted on server, skipping",
- accountName, folder, message.uid
+ accountName,
+ folder,
+ message.uid
)
if (isFirstResponse) {
@@ -521,7 +529,9 @@ internal class ImapSync(
val messageServerId = message.uid
Timber.v(
"About to notify listeners that we got a new small message %s:%s:%s",
- accountName, folder, messageServerId
+ accountName,
+ folder,
+ messageServerId
)
// Update the listener with what we've found
@@ -569,7 +579,9 @@ internal class ImapSync(
val messageServerId = message.uid
Timber.v(
"About to notify listeners that we got a new large message %s:%s:%s",
- accountName, folder, messageServerId
+ accountName,
+ folder,
+ messageServerId
)
// Update the listener with what we've found
diff --git a/mail/common/src/main/java/com/fsck/k9/mail/internet/MimeParameterDecoder.kt b/mail/common/src/main/java/com/fsck/k9/mail/internet/MimeParameterDecoder.kt
index 5f4fc4d446..ebe89d3b9d 100644
--- a/mail/common/src/main/java/com/fsck/k9/mail/internet/MimeParameterDecoder.kt
+++ b/mail/common/src/main/java/com/fsck/k9/mail/internet/MimeParameterDecoder.kt
@@ -218,7 +218,12 @@ object MimeParameterDecoder {
parser.readExtendedParameterValueInto(data)
InitialExtendedValueParameterSection(
- newParameterName, parameterName, section, charsetName, language, data
+ newParameterName,
+ parameterName,
+ section,
+ charsetName,
+ language,
+ data
)
} else {
val encodedParameterText = parameterText.substring(parser.position())
diff --git a/mail/common/src/main/java/com/fsck/k9/mail/internet/PartExtensions.kt b/mail/common/src/main/java/com/fsck/k9/mail/internet/PartExtensions.kt
index a91d7db833..dbae2e262e 100644
--- a/mail/common/src/main/java/com/fsck/k9/mail/internet/PartExtensions.kt
+++ b/mail/common/src/main/java/com/fsck/k9/mail/internet/PartExtensions.kt
@@ -1,4 +1,5 @@
@file:JvmName("PartExtensions")
+
package com.fsck.k9.mail.internet
import com.fsck.k9.mail.Part
diff --git a/mail/common/src/main/java/com/fsck/k9/sasl/OAuthBearer.kt b/mail/common/src/main/java/com/fsck/k9/sasl/OAuthBearer.kt
index 7ad04e03c4..531e5b683d 100644
--- a/mail/common/src/main/java/com/fsck/k9/sasl/OAuthBearer.kt
+++ b/mail/common/src/main/java/com/fsck/k9/sasl/OAuthBearer.kt
@@ -1,4 +1,5 @@
@file:JvmName("OAuthBearer")
+
package com.fsck.k9.sasl
import okio.ByteString.Companion.encodeUtf8
diff --git a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/RealImapConnection.kt b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/RealImapConnection.kt
index b27bc038a9..b4d28facc5 100644
--- a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/RealImapConnection.kt
+++ b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/RealImapConnection.kt
@@ -710,7 +710,10 @@ internal class RealImapConnection(
): List {
val groupedIds = IdGrouper.groupIds(ids)
val splitCommands = ImapCommandSplitter.splitCommand(
- commandPrefix, commandSuffix, groupedIds, lineLengthLimit
+ commandPrefix,
+ commandSuffix,
+ groupedIds,
+ lineLengthLimit
)
return splitCommands.flatMap { splitCommand ->
@@ -831,7 +834,9 @@ internal class RealImapConnection(
} else {
Timber.w(
"After sending tag %s, got tag response from previous command %s for %s",
- tag, response, logId
+ tag,
+ response,
+ logId
)
}
}
diff --git a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/RealImapFolder.kt b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/RealImapFolder.kt
index 472c054a1b..46e132efb5 100644
--- a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/RealImapFolder.kt
+++ b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/RealImapFolder.kt
@@ -292,7 +292,8 @@ internal class RealImapFolder(
if (K9MailLib.isDebug()) {
Timber.i(
"ImapFolder.copyMessages: couldn't find remote folder '%s' for %s",
- escapedDestinationFolderName, logId
+ escapedDestinationFolderName,
+ logId
)
}
@@ -399,7 +400,8 @@ internal class RealImapFolder(
val dateSearchString = getDateSearchString(earliestDate)
val command = String.format(
- Locale.US, "UID SEARCH %d:%d%s%s",
+ Locale.US,
+ "UID SEARCH %d:%d%s%s",
start,
end,
dateSearchString,
@@ -448,8 +450,11 @@ internal class RealImapFolder(
@Throws(MessagingException::class, IOException::class)
private fun existsNonDeletedMessageInRange(startIndex: Int, endIndex: Int, dateSearchString: String): Boolean {
val command = String.format(
- Locale.US, "SEARCH %d:%d%s NOT DELETED",
- startIndex, endIndex, dateSearchString
+ Locale.US,
+ "SEARCH %d:%d%s NOT DELETED",
+ startIndex,
+ endIndex,
+ dateSearchString
)
val imapResponses = executeSimpleCommand(command)
@@ -969,8 +974,11 @@ internal class RealImapFolder(
canCreateKeywords || internalImapStore.getPermanentFlagsIndex().contains(Flag.FORWARDED)
)
val command = String.format(
- Locale.US, "APPEND %s (%s) {%d}",
- escapedFolderName, combinedFlags, messageSize
+ Locale.US,
+ "APPEND %s (%s) {%d}",
+ escapedFolderName,
+ combinedFlags,
+ messageSize
)
connection!!.sendCommand(command, false)
diff --git a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/UidValidityResponse.kt b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/UidValidityResponse.kt
index 9652b5ba60..5a84abda0e 100644
--- a/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/UidValidityResponse.kt
+++ b/mail/protocols/imap/src/main/java/com/fsck/k9/mail/store/imap/UidValidityResponse.kt
@@ -11,7 +11,9 @@ internal class UidValidityResponse private constructor(val uidValidity: Long) {
val responseTextList = response.getList(1)
if (responseTextList.size < 2 || !equalsIgnoreCase(responseTextList[0], Responses.UIDVALIDITY) ||
!responseTextList.isLong(1)
- ) return null
+ ) {
+ return null
+ }
val uidValidity = responseTextList.getLong(1)
if (uidValidity !in 0L..0xFFFFFFFFL) return null
diff --git a/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapConnectionTest.kt b/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapConnectionTest.kt
index 570e3f2990..d6a6eb2931 100644
--- a/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapConnectionTest.kt
+++ b/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapConnectionTest.kt
@@ -697,7 +697,7 @@ class RealImapConnectionTest {
}
val imapConnection = startServerAndCreateImapConnection(
server,
- connectionSecurity = ConnectionSecurity.STARTTLS_REQUIRED,
+ connectionSecurity = ConnectionSecurity.STARTTLS_REQUIRED
)
try {
diff --git a/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapFolderTest.kt b/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapFolderTest.kt
index ff3e5b6dfd..9289e7e706 100644
--- a/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapFolderTest.kt
+++ b/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapFolderTest.kt
@@ -1171,7 +1171,9 @@ class RealImapFolderTest {
val commandSuffixCaptor = argumentCaptor()
val commandUidsCaptor = argumentCaptor>()
verify(imapConnection, atLeastOnce()).executeCommandWithIdSet(
- commandPrefixCaptor.capture(), commandSuffixCaptor.capture(), commandUidsCaptor.capture()
+ commandPrefixCaptor.capture(),
+ commandSuffixCaptor.capture(),
+ commandUidsCaptor.capture()
)
val commandPrefixes = commandPrefixCaptor.allValues
diff --git a/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapStoreTest.kt b/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapStoreTest.kt
index 113b42f209..e03414d513 100644
--- a/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapStoreTest.kt
+++ b/mail/protocols/imap/src/test/java/com/fsck/k9/mail/store/imap/RealImapStoreTest.kt
@@ -413,7 +413,10 @@ class RealImapStoreTest {
trustedSocketFactory: TrustedSocketFactory,
oauth2TokenProvider: OAuth2TokenProvider?
) : RealImapStore(
- serverSettings, config, trustedSocketFactory, oauth2TokenProvider
+ serverSettings,
+ config,
+ trustedSocketFactory,
+ oauth2TokenProvider
) {
private val imapConnections: Deque = ArrayDeque()
private var testCombinedPrefix: String? = null
diff --git a/mail/protocols/smtp/src/main/java/com/fsck/k9/mail/transport/smtp/SmtpTransport.kt b/mail/protocols/smtp/src/main/java/com/fsck/k9/mail/transport/smtp/SmtpTransport.kt
index 773e515e30..790fb569cc 100644
--- a/mail/protocols/smtp/src/main/java/com/fsck/k9/mail/transport/smtp/SmtpTransport.kt
+++ b/mail/protocols/smtp/src/main/java/com/fsck/k9/mail/transport/smtp/SmtpTransport.kt
@@ -414,7 +414,8 @@ class SmtpTransport(
val msgOut = EOLConvertingOutputStream(
LineWrapOutputStream(
- SmtpDataStuffing(outputStream), 1000
+ SmtpDataStuffing(outputStream),
+ 1000
)
)
--
GitLab
From 71ba065d765fda280a9570284aa9acf6754a7551 Mon Sep 17 00:00:00 2001
From: Wolf Montwe
Date: Fri, 3 Feb 2023 17:25:07 +0100
Subject: [PATCH 005/317] Add Markdown format rules
---
build.gradle | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/build.gradle b/build.gradle
index 23eeb67bd4..136a83eacc 100644
--- a/build.gradle
+++ b/build.gradle
@@ -105,6 +105,12 @@ spotless {
trimTrailingWhitespace()
endWithNewline()
}
+ format("markdown") {
+ prettier()
+ target("**/*.md")
+ trimTrailingWhitespace()
+ endWithNewline()
+ }
}
tasks.register('testsOnCi') {
--
GitLab
From 0bf2b31d8553c2d6748461ed48e07bc538e66f69 Mon Sep 17 00:00:00 2001
From: Wolf Montwe
Date: Fri, 3 Feb 2023 17:28:34 +0100
Subject: [PATCH 006/317] Change format of Markdown files
---
.github/CONTRIBUTING.md | 16 +++---
.github/pull_request_template.md | 16 +++---
README.md | 11 +---
cli/html-cleaner-cli/README.md | 2 +-
docs/DESIGN.md | 2 +-
plugins/openpgp-api-lib/CHANGELOG.md | 70 +++++++++++++-----------
plugins/openpgp-api-lib/README.md | 79 ++++++++++++++++------------
7 files changed, 102 insertions(+), 94 deletions(-)
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 143e5414ce..130810bbd9 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -3,23 +3,21 @@
If the app is not behaving like it should, it's not necessarily a bug. Please consult the following resources before
submitting a new issue.
-* [User Manual](https://docs.k9mail.app/)
-* [Frequently Asked Questions](https://forum.k9mail.app/c/faq)
-* [Support Forum](https://forum.k9mail.app/)
+- [User Manual](https://docs.k9mail.app/)
+- [Frequently Asked Questions](https://forum.k9mail.app/c/faq)
+- [Support Forum](https://forum.k9mail.app/)
### Bug report guidelines
-* The issue tracker is solely for bug reports and feature/enhancement requests. If you have a question of any kind,
-please use the [support forum](https://forum.k9mail.app/c/support) instead.
-* Search the [existing issues](https://github.com/thundernest/k-9/issues?q=) first to make sure your issue hasn't been
-reported before.
-
+- The issue tracker is solely for bug reports and feature/enhancement requests. If you have a question of any kind,
+ please use the [support forum](https://forum.k9mail.app/c/support) instead.
+- Search the [existing issues](https://github.com/thundernest/k-9/issues?q=) first to make sure your issue hasn't been
+ reported before.
## Translations
We're using [Transifex](https://www.transifex.com/k-9/k9mail/) to manage translations.
-
## Contributing code
We love [pull requests](https://github.com/thundernest/k-9/pulls) from everyone!
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 4bd7a7ac85..6b2d7e0587 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,12 +1,12 @@
Please ensure that your pull request meets the following requirements - thanks!
-* Does not contain merge commits. Rebase instead.
-* Contains commits with descriptive titles.
-* New code is written in Kotlin whenever possible.
-* Follows our existing codestyle (`gradlew ktlintCheck`; will be checked by CI).
-* Does not break any unit tests (`gradlew testDebugUnitTest`; will be checked by CI).
-* Uses a descriptive title; don't put issue numbers in there.
-* Contains a reference to the issue that it fixes (e.g. *Closes #XXX* or *Fixes #XXX*) in the body text.
-* For cosmetic changes add one or multiple images, if possible.
+- Does not contain merge commits. Rebase instead.
+- Contains commits with descriptive titles.
+- New code is written in Kotlin whenever possible.
+- Follows our existing codestyle (`gradlew ktlintCheck`; will be checked by CI).
+- Does not break any unit tests (`gradlew testDebugUnitTest`; will be checked by CI).
+- Uses a descriptive title; don't put issue numbers in there.
+- Contains a reference to the issue that it fixes (e.g. _Closes #XXX_ or _Fixes #XXX_) in the body text.
+- For cosmetic changes add one or multiple images, if possible.
Finally, please replace this template text with a description of the change and additional context if necessary.
diff --git a/README.md b/README.md
index 707cd6501f..9e6532e527 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,10 @@
# K-9 Mail
+
[![Latest release](https://img.shields.io/github/release/thundernest/k-9.svg?style=flat-square)](https://github.com/thundernest/k-9/releases/latest)
[![Latest beta release](https://img.shields.io/github/v/release/thundernest/k-9.svg?include_prereleases&style=flat-square)](https://github.com/thundernest/k-9/releases)
K-9 Mail is an open-source email client for Android.
-
## Download
K-9 Mail can be downloaded from a couple of sources:
@@ -15,13 +15,11 @@ K-9 Mail can be downloaded from a couple of sources:
You might also be interested in becoming a [tester](https://forum.k9mail.app/t/how-do-i-become-a-beta-tester/68) to get an early look at new versions.
-
## Release Notes
Check out the [Release Notes](https://github.com/thundernest/k-9/wiki/ReleaseNotes) to find out what changed
in each version of K-9 Mail.
-
## Need Help?
If the app is not behaving like it should, you might find these resources helpful:
@@ -30,18 +28,15 @@ If the app is not behaving like it should, you might find these resources helpfu
- [Frequently Asked Questions](https://forum.k9mail.app/c/faq)
- [Support Forum](https://forum.k9mail.app/)
-
## Translations
Interested in helping to translate K-9 Mail? Contribute here:
https://www.transifex.com/projects/p/k9mail/
-
## Contributing
-Thank you for contributing! If you're unfamiliar with the code,
-start by reading the [developer documentation](docs/DESIGN.md)
+Thank you for contributing! If you're unfamiliar with the code, start by reading the [developer documentation](docs/DESIGN.md)
Please fork this repository and contribute back using [pull requests](https://github.com/thundernest/k-9/pulls).
@@ -49,7 +44,6 @@ Any contributions, large or small, major features, bug fixes, unit/integration t
but will be thoroughly reviewed and discussed.
Please make sure you read the [Code Style Guidelines](https://github.com/thundernest/k-9/wiki/CodeStyle).
-
## Communication
Aside from discussing changes in [pull requests](https://github.com/thundernest/k-9/pulls) and
@@ -59,7 +53,6 @@ Aside from discussing changes in [pull requests](https://github.com/thundernest/
- IRC: [#k9mail on Libera Chat](https://web.libera.chat/#k9mail)
- [Developer mailing list](https://groups.google.com/forum/#!forum/k-9-dev)
-
## License
Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/cli/html-cleaner-cli/README.md b/cli/html-cleaner-cli/README.md
index 9bf6ab1b78..2b10cb31e8 100644
--- a/cli/html-cleaner-cli/README.md
+++ b/cli/html-cleaner-cli/README.md
@@ -12,6 +12,6 @@ Arguments:
OUTPUT Output file
```
-You can run this tool using the [html-cleaner](../../html-cleaner) script in the root directory of this repository.
+You can run this tool using the [html-cleaner](../../html-cleaner) script in the root directory of this repository.
It will compile the application and then run it using the given arguments. This allows you to make modifications to the
[HTML cleaning code](../../app/html-cleaner/src/main/java/app/k9mail/html/cleaner) and test the changes right away.
diff --git a/docs/DESIGN.md b/docs/DESIGN.md
index 6b44c2db4c..f5445dc267 100644
--- a/docs/DESIGN.md
+++ b/docs/DESIGN.md
@@ -23,7 +23,7 @@ Additional, standalone, libraries used by K-9
# Walkthrough
To help you understand the design, the following sequence diagrams show typical flows through the
-classes. Each class is colour-coded by its top-level project.
+classes. Each class is colour-coded by its top-level project.
## Reading email
diff --git a/plugins/openpgp-api-lib/CHANGELOG.md b/plugins/openpgp-api-lib/CHANGELOG.md
index 93b6824eac..24d48b88a6 100644
--- a/plugins/openpgp-api-lib/CHANGELOG.md
+++ b/plugins/openpgp-api-lib/CHANGELOG.md
@@ -1,48 +1,56 @@
# Version history
## Version 10
- * Retrieve whole public key via ACTION_GET_KEY
+
+- Retrieve whole public key via ACTION_GET_KEY
## Version 9
- * AIDL Service has been changed from IOpenPgpService.aidl to IOpenPgpService2.aidl
- This fixes truncated data streams (thanks to 'mgeier63').
- * Fix for OpenPgpKeyPreference: Properly execute pending user interactions
- * Charset moved to OpenPgpMetadata
+
+- AIDL Service has been changed from IOpenPgpService.aidl to IOpenPgpService2.aidl
+ This fixes truncated data streams (thanks to 'mgeier63').
+- Fix for OpenPgpKeyPreference: Properly execute pending user interactions
+- Charset moved to OpenPgpMetadata
## Version 8
- * OpenPgpSignatureResult:
- method getStatus() renamed to getResult()
- constants have been renamed for clarity
- new constants: RESULT_NO_SIGNATURE, RESULT_INVALID_INSECURE
- isSignatureOnly() has been deprecated
- * RESULT_TYPES have been removed
- * new OpenPgpDecryptionResult returned via RESULT_DECRYPTION
- * OpenPgpSignatureResult and OpenPgpDecryptionResult are never null, they are always returned.
+
+- OpenPgpSignatureResult:
+ method getStatus() renamed to getResult()
+ constants have been renamed for clarity
+ new constants: RESULT_NO_SIGNATURE, RESULT_INVALID_INSECURE
+ isSignatureOnly() has been deprecated
+- RESULT_TYPES have been removed
+- new OpenPgpDecryptionResult returned via RESULT_DECRYPTION
+- OpenPgpSignatureResult and OpenPgpDecryptionResult are never null, they are always returned.
## Version 7
- * Deprecation of ACCOUNT_NAME, please use ACTION_GET_SIGN_KEY_ID to get key id
- * Introduce EXTRA_SIGN_KEY_ID
- * New extra for ACTION_ENCRYPT and ACTION_SIGN_AND_ENCRYPT: EXTRA_ENABLE_COMPRESSION (default to true)
- * Return PendingIntent to view key for signatures
- * New result for ACTION_DECRYPT_VERIFY: RESULT_TYPE
- * New ACTION_GET_SIGN_KEY_ID
- * EXTRA_PASSPHRASE changed from String to char[]
+
+- Deprecation of ACCOUNT_NAME, please use ACTION_GET_SIGN_KEY_ID to get key id
+- Introduce EXTRA_SIGN_KEY_ID
+- New extra for ACTION_ENCRYPT and ACTION_SIGN_AND_ENCRYPT: EXTRA_ENABLE_COMPRESSION (default to true)
+- Return PendingIntent to view key for signatures
+- New result for ACTION_DECRYPT_VERIFY: RESULT_TYPE
+- New ACTION_GET_SIGN_KEY_ID
+- EXTRA_PASSPHRASE changed from String to char[]
## Version 6
- * Deprecate ACTION_SIGN
- * Introduce ACTION_CLEARTEXT_SIGN and ACTION_DETACHED_SIGN
- * New extra for ACTION_DETACHED_SIGN: EXTRA_DETACHED_SIGNATURE
- * New result for ACTION_DECRYPT_VERIFY: RESULT_DETACHED_SIGNATURE
- * New result for ACTION_DECRYPT_VERIFY: RESULT_CHARSET
+
+- Deprecate ACTION_SIGN
+- Introduce ACTION_CLEARTEXT_SIGN and ACTION_DETACHED_SIGN
+- New extra for ACTION_DETACHED_SIGN: EXTRA_DETACHED_SIGNATURE
+- New result for ACTION_DECRYPT_VERIFY: RESULT_DETACHED_SIGNATURE
+- New result for ACTION_DECRYPT_VERIFY: RESULT_CHARSET
## Version 5
- * OpenPgpSignatureResult: new consts RESULT_INVALID_KEY_REVOKED and RESULT_INVALID_KEY_EXPIRED
- * OpenPgpSignatureResult: ArrayList userIds
+
+- OpenPgpSignatureResult: new consts RESULT_INVALID_KEY_REVOKED and RESULT_INVALID_KEY_EXPIRED
+- OpenPgpSignatureResult: ArrayList userIds
## Version 4
- * No changes to existing methods -> backward compatible
- * Introduction of ACTION_DECRYPT_METADATA, RESULT_METADATA, EXTRA_ORIGINAL_FILENAME, and OpenPgpMetadata parcel
- * Introduction of internal NFC extras: EXTRA_NFC_SIGNED_HASH, EXTRA_NFC_SIG_CREATION_TIMESTAMP
+
+- No changes to existing methods -> backward compatible
+- Introduction of ACTION_DECRYPT_METADATA, RESULT_METADATA, EXTRA_ORIGINAL_FILENAME, and OpenPgpMetadata parcel
+- Introduction of internal NFC extras: EXTRA_NFC_SIGNED_HASH, EXTRA_NFC_SIG_CREATION_TIMESTAMP
## Version 3
- * First public stable version
\ No newline at end of file
+
+- First public stable version
diff --git a/plugins/openpgp-api-lib/README.md b/plugins/openpgp-api-lib/README.md
index 8cb6e5e6d0..5aee294d51 100644
--- a/plugins/openpgp-api-lib/README.md
+++ b/plugins/openpgp-api-lib/README.md
@@ -5,11 +5,13 @@ The OpenPGP API provides methods to execute OpenPGP operations, such as sign, en
### News
#### Version 10
- * Retrieve whole public key via ACTION_GET_KEY
+
+- Retrieve whole public key via ACTION_GET_KEY
[Full changelog here…](https://github.com/open-keychain/openpgp-api/blob/master/CHANGELOG.md)
### License
+
While OpenKeychain itself is GPLv3+, the API library is licensed under Apache License v2.
Thus, you are allowed to also use it in closed source applications as long as you respect the [Apache License v2](https://github.com/open-keychain/openpgp-api/blob/master/LICENSE).
@@ -28,7 +30,8 @@ dependencies {
```
### Full example
-A full working example is available in the [example project](https://github.com/open-keychain/openpgp-api/blob/master/example). The [``OpenPgpApiActivity.java``](https://github.com/open-keychain/openpgp-api/blob/master/example/src/main/java/org/openintents/openpgp/example/OpenPgpApiActivity.java) contains most relevant sourcecode.
+
+A full working example is available in the [example project](https://github.com/open-keychain/openpgp-api/blob/master/example). The [`OpenPgpApiActivity.java`](https://github.com/open-keychain/openpgp-api/blob/master/example/src/main/java/org/openintents/openpgp/example/OpenPgpApiActivity.java) contains most relevant sourcecode.
### API
@@ -38,21 +41,24 @@ A full working example is available in the [example project](https://github.com/
**This tutorial only covers the basics, please consult the full example for a complete overview over all methods**
-The API is **not** designed around ``Intents`` which are started via ``startActivityForResult``. These Intent actions typically start an activity for user interaction, so they are not suitable for background tasks. Most API design decisions are explained at [the bottom of this wiki page](https://github.com/open-keychain/open-keychain/wiki/OpenPGP-API#internal-design-decisions).
+The API is **not** designed around `Intents` which are started via `startActivityForResult`. These Intent actions typically start an activity for user interaction, so they are not suitable for background tasks. Most API design decisions are explained at [the bottom of this wiki page](https://github.com/open-keychain/open-keychain/wiki/OpenPGP-API#internal-design-decisions).
We will go through the basic steps to understand how this API works, following this (greatly simplified) sequence diagram:
![](https://github.com/open-keychain/open-keychain/raw/master/Resources/docs/openpgp_api_1.jpg)
In this diagram the client app is depicted on the left side, the OpenPGP provider (in this case OpenKeychain) is depicted on the right.
-The remote service is defined via the [AIDL](http://developer.android.com/guide/components/aidl.html) file [``IOpenPgpService``](https://github.com/open-keychain/openpgp-api/blob/master/openpgp-api/src/main/aidl/org/openintents/openpgp/IOpenPgpService.aidl).
+The remote service is defined via the [AIDL](http://developer.android.com/guide/components/aidl.html) file [`IOpenPgpService`](https://github.com/open-keychain/openpgp-api/blob/master/openpgp-api/src/main/aidl/org/openintents/openpgp/IOpenPgpService.aidl).
It contains only one exposed method which can be invoked remotely:
+
```java
interface IOpenPgpService {
Intent execute(in Intent data, in ParcelFileDescriptor input, in ParcelFileDescriptor output);
}
```
+
The interaction between the apps is done by binding from your client app to the remote service of OpenKeychain.
-``OpenPgpServiceConnection`` is a helper class from the library to ease this step:
+`OpenPgpServiceConnection` is a helper class from the library to ease this step:
+
```java
OpenPgpServiceConnection mServiceConnection;
@@ -72,36 +78,38 @@ public void onDestroy() {
Following the sequence diagram, these steps are executed:
-1. Define an ``Intent`` containing the actual PGP instructions which should be done, e.g.
- ```java
+1. Define an `Intent` containing the actual PGP instructions which should be done, e.g.
+ `java
Intent data = new Intent();
data.setAction(OpenPgpApi.ACTION_ENCRYPT);
data.putExtra(OpenPgpApi.EXTRA_USER_IDS, new String[]{"dominik@dominikschuermann.de"});
data.putExtra(OpenPgpApi.EXTRA_REQUEST_ASCII_ARMOR, true);
- ```
- Define an ``InputStream`` currently holding the plaintext, and an ``OutputStream`` where you want the ciphertext to be written by OpenKeychain's remote service:
- ```java
+ `
+ Define an `InputStream` currently holding the plaintext, and an `OutputStream` where you want the ciphertext to be written by OpenKeychain's remote service:
+ `java
InputStream is = new ByteArrayInputStream("Hello world!".getBytes("UTF-8"));
ByteArrayOutputStream os = new ByteArrayOutputStream();
- ```
- Using a helper class from the library, ``is`` and ``os`` are passed via ``ParcelFileDescriptors`` as ``input`` and ``output`` together with ``Intent data``, as depicted in the sequence diagram, from the client to the remote service.
+ `
+ Using a helper class from the library, `is` and `os` are passed via `ParcelFileDescriptors` as `input` and `output` together with `Intent data`, as depicted in the sequence diagram, from the client to the remote service.
Programmatically, this can be done with:
- ```java
+ `java
OpenPgpApi api = new OpenPgpApi(this, mServiceConnection.getService());
Intent result = api.executeApi(data, is, os);
- ```
+ `
-2. The PGP operation is executed by OpenKeychain and the produced ciphertext is written into ``os`` which can then be accessed by the client app.
+2. The PGP operation is executed by OpenKeychain and the produced ciphertext is written into `os` which can then be accessed by the client app.
3. A result Intent is returned containing one of these result codes:
- * ``OpenPgpApi.RESULT_CODE_ERROR``
- * ``OpenPgpApi.RESULT_CODE_SUCCESS``
- * ``OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED``
- If ``RESULT_CODE_USER_INTERACTION_REQUIRED`` is returned, an additional ``PendingIntent`` is returned to the client, which must be used to get user input required to process the request.
- A ``PendingIntent`` is executed with ``startIntentSenderForResult``, which starts an activity, originally belonging to OpenKeychain, on the [task stack](http://developer.android.com/guide/components/tasks-and-back-stack.html) of the client.
- Only if ``RESULT_CODE_SUCCESS`` is returned, ``os`` actually contains data.
+ - `OpenPgpApi.RESULT_CODE_ERROR`
+ - `OpenPgpApi.RESULT_CODE_SUCCESS`
+ - `OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED`
+
+ If `RESULT_CODE_USER_INTERACTION_REQUIRED` is returned, an additional `PendingIntent` is returned to the client, which must be used to get user input required to process the request.
+ A `PendingIntent` is executed with `startIntentSenderForResult`, which starts an activity, originally belonging to OpenKeychain, on the [task stack](http://developer.android.com/guide/components/tasks-and-back-stack.html) of the client.
+ Only if `RESULT_CODE_SUCCESS` is returned, `os` actually contains data.
A nearly complete example looks like this:
+
```java
switch (result.getIntExtra(OpenPgpApi.RESULT_CODE, OpenPgpApi.RESULT_CODE_ERROR)) {
case OpenPgpApi.RESULT_CODE_SUCCESS: {
@@ -135,10 +143,10 @@ Intent result = api.executeApi(data, is, os);
}
```
-4. Results from a ``PendingIntent`` are returned in ``onActivityResult`` of the activity, which executed ``startIntentSenderForResult``.
- The returned ``Intent data`` in ``onActivityResult`` contains the original PGP operation definition and new values acquired from the user interaction.
- Thus, you can now execute the ``Intent`` again, like done in step 1.
- This time it should return with ``RESULT_CODE_SUCCESS`` because all required information has been obtained by the previous user interaction stored in this ``Intent``.
+4. Results from a `PendingIntent` are returned in `onActivityResult` of the activity, which executed `startIntentSenderForResult`.
+ The returned `Intent data` in `onActivityResult` contains the original PGP operation definition and new values acquired from the user interaction.
+ Thus, you can now execute the `Intent` again, like done in step 1.
+ This time it should return with `RESULT_CODE_SUCCESS` because all required information has been obtained by the previous user interaction stored in this `Intent`.
```java
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
[...]
@@ -154,16 +162,17 @@ Intent result = api.executeApi(data, is, os);
}
```
-
### Tipps
-* ``api.executeApi(data, is, os);`` is a blocking call. If you want a convenient asynchronous call, use ``api.executeApiAsync(data, is, os, new MyCallback([... ]));``, where ``MyCallback`` is an private class implementing ``OpenPgpApi.IOpenPgpCallback``.
- See [``OpenPgpApiActivity.java``](https://github.com/open-keychain/openpgp-api/blob/master/example/src/main/java/org/openintents/openpgp/example/OpenPgpApiActivity.java) for an example.
-* Using
- ```java
- mServiceConnection = new OpenPgpServiceConnection(this, "org.sufficientlysecure.keychain");
- ```
- connects to OpenKeychain directly.
- If you want to let the user choose between OpenPGP providers, you can implement the [``OpenPgpAppPreference.java``](https://github.com/open-keychain/openpgp-api/tree/master/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpAppPreference.java) like done in the example app.
+- `api.executeApi(data, is, os);` is a blocking call. If you want a convenient asynchronous call, use `api.executeApiAsync(data, is, os, new MyCallback([... ]));`, where `MyCallback` is an private class implementing `OpenPgpApi.IOpenPgpCallback`.
+ See [`OpenPgpApiActivity.java`](https://github.com/open-keychain/openpgp-api/blob/master/example/src/main/java/org/openintents/openpgp/example/OpenPgpApiActivity.java) for an example.
+- Using
+
+ ```java
+ mServiceConnection = new OpenPgpServiceConnection(this, "org.sufficientlysecure.keychain");
+ ```
+
+ connects to OpenKeychain directly.
+ If you want to let the user choose between OpenPGP providers, you can implement the [`OpenPgpAppPreference.java`](https://github.com/open-keychain/openpgp-api/tree/master/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpAppPreference.java) like done in the example app.
-* To enable installing a debug and release version at the same time, the `debug` build of OpenKeychain uses `org.sufficientlysecure.keychain.debug` as a package name. Make sure you connect to the right one during development!
+- To enable installing a debug and release version at the same time, the `debug` build of OpenKeychain uses `org.sufficientlysecure.keychain.debug` as a package name. Make sure you connect to the right one during development!
--
GitLab
From 43213136bebd1d6ab25ed44a2865f9851a2768c9 Mon Sep 17 00:00:00 2001
From: Wolf Montwe
Date: Mon, 6 Feb 2023 10:27:42 +0100
Subject: [PATCH 007/317] Add exception for 'plugins/openpgp-api-lib' and
revert changes
---
build.gradle | 3 +-
plugins/openpgp-api-lib/CHANGELOG.md | 70 +++++++++++-------------
plugins/openpgp-api-lib/README.md | 79 ++++++++++++----------------
3 files changed, 68 insertions(+), 84 deletions(-)
diff --git a/build.gradle b/build.gradle
index 136a83eacc..c5fd81a399 100644
--- a/build.gradle
+++ b/build.gradle
@@ -101,13 +101,14 @@ spotless {
ktlint(libs.versions.ktlint.get())
.setEditorConfigPath("$projectDir/.editorconfig")
target("**/*.kt")
- targetExclude("**/build/", "**/resources/")
+ targetExclude("**/build/", "**/resources/", "plugins/openpgp-api-lib/")
trimTrailingWhitespace()
endWithNewline()
}
format("markdown") {
prettier()
target("**/*.md")
+ targetExclude("plugins/openpgp-api-lib/")
trimTrailingWhitespace()
endWithNewline()
}
diff --git a/plugins/openpgp-api-lib/CHANGELOG.md b/plugins/openpgp-api-lib/CHANGELOG.md
index 24d48b88a6..93b6824eac 100644
--- a/plugins/openpgp-api-lib/CHANGELOG.md
+++ b/plugins/openpgp-api-lib/CHANGELOG.md
@@ -1,56 +1,48 @@
# Version history
## Version 10
-
-- Retrieve whole public key via ACTION_GET_KEY
+ * Retrieve whole public key via ACTION_GET_KEY
## Version 9
-
-- AIDL Service has been changed from IOpenPgpService.aidl to IOpenPgpService2.aidl
- This fixes truncated data streams (thanks to 'mgeier63').
-- Fix for OpenPgpKeyPreference: Properly execute pending user interactions
-- Charset moved to OpenPgpMetadata
+ * AIDL Service has been changed from IOpenPgpService.aidl to IOpenPgpService2.aidl
+ This fixes truncated data streams (thanks to 'mgeier63').
+ * Fix for OpenPgpKeyPreference: Properly execute pending user interactions
+ * Charset moved to OpenPgpMetadata
## Version 8
-
-- OpenPgpSignatureResult:
- method getStatus() renamed to getResult()
- constants have been renamed for clarity
- new constants: RESULT_NO_SIGNATURE, RESULT_INVALID_INSECURE
- isSignatureOnly() has been deprecated
-- RESULT_TYPES have been removed
-- new OpenPgpDecryptionResult returned via RESULT_DECRYPTION
-- OpenPgpSignatureResult and OpenPgpDecryptionResult are never null, they are always returned.
+ * OpenPgpSignatureResult:
+ method getStatus() renamed to getResult()
+ constants have been renamed for clarity
+ new constants: RESULT_NO_SIGNATURE, RESULT_INVALID_INSECURE
+ isSignatureOnly() has been deprecated
+ * RESULT_TYPES have been removed
+ * new OpenPgpDecryptionResult returned via RESULT_DECRYPTION
+ * OpenPgpSignatureResult and OpenPgpDecryptionResult are never null, they are always returned.
## Version 7
-
-- Deprecation of ACCOUNT_NAME, please use ACTION_GET_SIGN_KEY_ID to get key id
-- Introduce EXTRA_SIGN_KEY_ID
-- New extra for ACTION_ENCRYPT and ACTION_SIGN_AND_ENCRYPT: EXTRA_ENABLE_COMPRESSION (default to true)
-- Return PendingIntent to view key for signatures
-- New result for ACTION_DECRYPT_VERIFY: RESULT_TYPE
-- New ACTION_GET_SIGN_KEY_ID
-- EXTRA_PASSPHRASE changed from String to char[]
+ * Deprecation of ACCOUNT_NAME, please use ACTION_GET_SIGN_KEY_ID to get key id
+ * Introduce EXTRA_SIGN_KEY_ID
+ * New extra for ACTION_ENCRYPT and ACTION_SIGN_AND_ENCRYPT: EXTRA_ENABLE_COMPRESSION (default to true)
+ * Return PendingIntent to view key for signatures
+ * New result for ACTION_DECRYPT_VERIFY: RESULT_TYPE
+ * New ACTION_GET_SIGN_KEY_ID
+ * EXTRA_PASSPHRASE changed from String to char[]
## Version 6
-
-- Deprecate ACTION_SIGN
-- Introduce ACTION_CLEARTEXT_SIGN and ACTION_DETACHED_SIGN
-- New extra for ACTION_DETACHED_SIGN: EXTRA_DETACHED_SIGNATURE
-- New result for ACTION_DECRYPT_VERIFY: RESULT_DETACHED_SIGNATURE
-- New result for ACTION_DECRYPT_VERIFY: RESULT_CHARSET
+ * Deprecate ACTION_SIGN
+ * Introduce ACTION_CLEARTEXT_SIGN and ACTION_DETACHED_SIGN
+ * New extra for ACTION_DETACHED_SIGN: EXTRA_DETACHED_SIGNATURE
+ * New result for ACTION_DECRYPT_VERIFY: RESULT_DETACHED_SIGNATURE
+ * New result for ACTION_DECRYPT_VERIFY: RESULT_CHARSET
## Version 5
-
-- OpenPgpSignatureResult: new consts RESULT_INVALID_KEY_REVOKED and RESULT_INVALID_KEY_EXPIRED
-- OpenPgpSignatureResult: ArrayList userIds
+ * OpenPgpSignatureResult: new consts RESULT_INVALID_KEY_REVOKED and RESULT_INVALID_KEY_EXPIRED
+ * OpenPgpSignatureResult: ArrayList userIds
## Version 4
-
-- No changes to existing methods -> backward compatible
-- Introduction of ACTION_DECRYPT_METADATA, RESULT_METADATA, EXTRA_ORIGINAL_FILENAME, and OpenPgpMetadata parcel
-- Introduction of internal NFC extras: EXTRA_NFC_SIGNED_HASH, EXTRA_NFC_SIG_CREATION_TIMESTAMP
+ * No changes to existing methods -> backward compatible
+ * Introduction of ACTION_DECRYPT_METADATA, RESULT_METADATA, EXTRA_ORIGINAL_FILENAME, and OpenPgpMetadata parcel
+ * Introduction of internal NFC extras: EXTRA_NFC_SIGNED_HASH, EXTRA_NFC_SIG_CREATION_TIMESTAMP
## Version 3
-
-- First public stable version
+ * First public stable version
\ No newline at end of file
diff --git a/plugins/openpgp-api-lib/README.md b/plugins/openpgp-api-lib/README.md
index 5aee294d51..8cb6e5e6d0 100644
--- a/plugins/openpgp-api-lib/README.md
+++ b/plugins/openpgp-api-lib/README.md
@@ -5,13 +5,11 @@ The OpenPGP API provides methods to execute OpenPGP operations, such as sign, en
### News
#### Version 10
-
-- Retrieve whole public key via ACTION_GET_KEY
+ * Retrieve whole public key via ACTION_GET_KEY
[Full changelog here…](https://github.com/open-keychain/openpgp-api/blob/master/CHANGELOG.md)
### License
-
While OpenKeychain itself is GPLv3+, the API library is licensed under Apache License v2.
Thus, you are allowed to also use it in closed source applications as long as you respect the [Apache License v2](https://github.com/open-keychain/openpgp-api/blob/master/LICENSE).
@@ -30,8 +28,7 @@ dependencies {
```
### Full example
-
-A full working example is available in the [example project](https://github.com/open-keychain/openpgp-api/blob/master/example). The [`OpenPgpApiActivity.java`](https://github.com/open-keychain/openpgp-api/blob/master/example/src/main/java/org/openintents/openpgp/example/OpenPgpApiActivity.java) contains most relevant sourcecode.
+A full working example is available in the [example project](https://github.com/open-keychain/openpgp-api/blob/master/example). The [``OpenPgpApiActivity.java``](https://github.com/open-keychain/openpgp-api/blob/master/example/src/main/java/org/openintents/openpgp/example/OpenPgpApiActivity.java) contains most relevant sourcecode.
### API
@@ -41,24 +38,21 @@ A full working example is available in the [example project](https://github.com/
**This tutorial only covers the basics, please consult the full example for a complete overview over all methods**
-The API is **not** designed around `Intents` which are started via `startActivityForResult`. These Intent actions typically start an activity for user interaction, so they are not suitable for background tasks. Most API design decisions are explained at [the bottom of this wiki page](https://github.com/open-keychain/open-keychain/wiki/OpenPGP-API#internal-design-decisions).
+The API is **not** designed around ``Intents`` which are started via ``startActivityForResult``. These Intent actions typically start an activity for user interaction, so they are not suitable for background tasks. Most API design decisions are explained at [the bottom of this wiki page](https://github.com/open-keychain/open-keychain/wiki/OpenPGP-API#internal-design-decisions).
We will go through the basic steps to understand how this API works, following this (greatly simplified) sequence diagram:
![](https://github.com/open-keychain/open-keychain/raw/master/Resources/docs/openpgp_api_1.jpg)
In this diagram the client app is depicted on the left side, the OpenPGP provider (in this case OpenKeychain) is depicted on the right.
-The remote service is defined via the [AIDL](http://developer.android.com/guide/components/aidl.html) file [`IOpenPgpService`](https://github.com/open-keychain/openpgp-api/blob/master/openpgp-api/src/main/aidl/org/openintents/openpgp/IOpenPgpService.aidl).
+The remote service is defined via the [AIDL](http://developer.android.com/guide/components/aidl.html) file [``IOpenPgpService``](https://github.com/open-keychain/openpgp-api/blob/master/openpgp-api/src/main/aidl/org/openintents/openpgp/IOpenPgpService.aidl).
It contains only one exposed method which can be invoked remotely:
-
```java
interface IOpenPgpService {
Intent execute(in Intent data, in ParcelFileDescriptor input, in ParcelFileDescriptor output);
}
```
-
The interaction between the apps is done by binding from your client app to the remote service of OpenKeychain.
-`OpenPgpServiceConnection` is a helper class from the library to ease this step:
-
+``OpenPgpServiceConnection`` is a helper class from the library to ease this step:
```java
OpenPgpServiceConnection mServiceConnection;
@@ -78,38 +72,36 @@ public void onDestroy() {
Following the sequence diagram, these steps are executed:
-1. Define an `Intent` containing the actual PGP instructions which should be done, e.g.
- `java
+1. Define an ``Intent`` containing the actual PGP instructions which should be done, e.g.
+ ```java
Intent data = new Intent();
data.setAction(OpenPgpApi.ACTION_ENCRYPT);
data.putExtra(OpenPgpApi.EXTRA_USER_IDS, new String[]{"dominik@dominikschuermann.de"});
data.putExtra(OpenPgpApi.EXTRA_REQUEST_ASCII_ARMOR, true);
- `
- Define an `InputStream` currently holding the plaintext, and an `OutputStream` where you want the ciphertext to be written by OpenKeychain's remote service:
- `java
+ ```
+ Define an ``InputStream`` currently holding the plaintext, and an ``OutputStream`` where you want the ciphertext to be written by OpenKeychain's remote service:
+ ```java
InputStream is = new ByteArrayInputStream("Hello world!".getBytes("UTF-8"));
ByteArrayOutputStream os = new ByteArrayOutputStream();
- `
- Using a helper class from the library, `is` and `os` are passed via `ParcelFileDescriptors` as `input` and `output` together with `Intent data`, as depicted in the sequence diagram, from the client to the remote service.
+ ```
+ Using a helper class from the library, ``is`` and ``os`` are passed via ``ParcelFileDescriptors`` as ``input`` and ``output`` together with ``Intent data``, as depicted in the sequence diagram, from the client to the remote service.
Programmatically, this can be done with:
- `java
+ ```java
OpenPgpApi api = new OpenPgpApi(this, mServiceConnection.getService());
Intent result = api.executeApi(data, is, os);
- `
+ ```
-2. The PGP operation is executed by OpenKeychain and the produced ciphertext is written into `os` which can then be accessed by the client app.
+2. The PGP operation is executed by OpenKeychain and the produced ciphertext is written into ``os`` which can then be accessed by the client app.
3. A result Intent is returned containing one of these result codes:
+ * ``OpenPgpApi.RESULT_CODE_ERROR``
+ * ``OpenPgpApi.RESULT_CODE_SUCCESS``
+ * ``OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED``
- - `OpenPgpApi.RESULT_CODE_ERROR`
- - `OpenPgpApi.RESULT_CODE_SUCCESS`
- - `OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED`
-
- If `RESULT_CODE_USER_INTERACTION_REQUIRED` is returned, an additional `PendingIntent` is returned to the client, which must be used to get user input required to process the request.
- A `PendingIntent` is executed with `startIntentSenderForResult`, which starts an activity, originally belonging to OpenKeychain, on the [task stack](http://developer.android.com/guide/components/tasks-and-back-stack.html) of the client.
- Only if `RESULT_CODE_SUCCESS` is returned, `os` actually contains data.
+ If ``RESULT_CODE_USER_INTERACTION_REQUIRED`` is returned, an additional ``PendingIntent`` is returned to the client, which must be used to get user input required to process the request.
+ A ``PendingIntent`` is executed with ``startIntentSenderForResult``, which starts an activity, originally belonging to OpenKeychain, on the [task stack](http://developer.android.com/guide/components/tasks-and-back-stack.html) of the client.
+ Only if ``RESULT_CODE_SUCCESS`` is returned, ``os`` actually contains data.
A nearly complete example looks like this:
-
```java
switch (result.getIntExtra(OpenPgpApi.RESULT_CODE, OpenPgpApi.RESULT_CODE_ERROR)) {
case OpenPgpApi.RESULT_CODE_SUCCESS: {
@@ -143,10 +135,10 @@ Intent result = api.executeApi(data, is, os);
}
```
-4. Results from a `PendingIntent` are returned in `onActivityResult` of the activity, which executed `startIntentSenderForResult`.
- The returned `Intent data` in `onActivityResult` contains the original PGP operation definition and new values acquired from the user interaction.
- Thus, you can now execute the `Intent` again, like done in step 1.
- This time it should return with `RESULT_CODE_SUCCESS` because all required information has been obtained by the previous user interaction stored in this `Intent`.
+4. Results from a ``PendingIntent`` are returned in ``onActivityResult`` of the activity, which executed ``startIntentSenderForResult``.
+ The returned ``Intent data`` in ``onActivityResult`` contains the original PGP operation definition and new values acquired from the user interaction.
+ Thus, you can now execute the ``Intent`` again, like done in step 1.
+ This time it should return with ``RESULT_CODE_SUCCESS`` because all required information has been obtained by the previous user interaction stored in this ``Intent``.
```java
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
[...]
@@ -162,17 +154,16 @@ Intent result = api.executeApi(data, is, os);
}
```
-### Tipps
-
-- `api.executeApi(data, is, os);` is a blocking call. If you want a convenient asynchronous call, use `api.executeApiAsync(data, is, os, new MyCallback([... ]));`, where `MyCallback` is an private class implementing `OpenPgpApi.IOpenPgpCallback`.
- See [`OpenPgpApiActivity.java`](https://github.com/open-keychain/openpgp-api/blob/master/example/src/main/java/org/openintents/openpgp/example/OpenPgpApiActivity.java) for an example.
-- Using
- ```java
- mServiceConnection = new OpenPgpServiceConnection(this, "org.sufficientlysecure.keychain");
- ```
+### Tipps
+* ``api.executeApi(data, is, os);`` is a blocking call. If you want a convenient asynchronous call, use ``api.executeApiAsync(data, is, os, new MyCallback([... ]));``, where ``MyCallback`` is an private class implementing ``OpenPgpApi.IOpenPgpCallback``.
+ See [``OpenPgpApiActivity.java``](https://github.com/open-keychain/openpgp-api/blob/master/example/src/main/java/org/openintents/openpgp/example/OpenPgpApiActivity.java) for an example.
+* Using
- connects to OpenKeychain directly.
- If you want to let the user choose between OpenPGP providers, you can implement the [`OpenPgpAppPreference.java`](https://github.com/open-keychain/openpgp-api/tree/master/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpAppPreference.java) like done in the example app.
+ ```java
+ mServiceConnection = new OpenPgpServiceConnection(this, "org.sufficientlysecure.keychain");
+ ```
+ connects to OpenKeychain directly.
+ If you want to let the user choose between OpenPGP providers, you can implement the [``OpenPgpAppPreference.java``](https://github.com/open-keychain/openpgp-api/tree/master/openpgp-api/src/main/java/org/openintents/openpgp/util/OpenPgpAppPreference.java) like done in the example app.
-- To enable installing a debug and release version at the same time, the `debug` build of OpenKeychain uses `org.sufficientlysecure.keychain.debug` as a package name. Make sure you connect to the right one during development!
+* To enable installing a debug and release version at the same time, the `debug` build of OpenKeychain uses `org.sufficientlysecure.keychain.debug` as a package name. Make sure you connect to the right one during development!
--
GitLab
From 0d030aab6dc8eab6fe0081c95244b5af0af56738 Mon Sep 17 00:00:00 2001
From: Wolf Montwe
Date: Mon, 6 Feb 2023 10:49:21 +0100
Subject: [PATCH 008/317] Remove trimTrailingWhitespace as not needed for
ktlint
---
.../fsck/k9/storage/messages/RetrieveMessageListOperations.kt | 2 +-
.../com/fsck/k9/storage/messages/ThreadMessageOperations.kt | 2 +-
build.gradle | 1 -
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/app/storage/src/main/java/com/fsck/k9/storage/messages/RetrieveMessageListOperations.kt b/app/storage/src/main/java/com/fsck/k9/storage/messages/RetrieveMessageListOperations.kt
index ddf0a397a9..01b0d93e53 100644
--- a/app/storage/src/main/java/com/fsck/k9/storage/messages/RetrieveMessageListOperations.kt
+++ b/app/storage/src/main/java/com/fsck/k9/storage/messages/RetrieveMessageListOperations.kt
@@ -126,7 +126,7 @@ JOIN folders ON (folders.id = messages.folder_id)
GROUP BY threads.root
ORDER BY $orderBy
""",
- selectionArgs,
+ selectionArgs
).use { cursor ->
val cursorMessageAccessor = CursorMessageAccessor(cursor, includesThreadCount = true)
buildList {
diff --git a/app/storage/src/main/java/com/fsck/k9/storage/messages/ThreadMessageOperations.kt b/app/storage/src/main/java/com/fsck/k9/storage/messages/ThreadMessageOperations.kt
index 21491c98fe..e032756abc 100644
--- a/app/storage/src/main/java/com/fsck/k9/storage/messages/ThreadMessageOperations.kt
+++ b/app/storage/src/main/java/com/fsck/k9/storage/messages/ThreadMessageOperations.kt
@@ -25,7 +25,7 @@ FROM messages
LEFT JOIN message_parts ON (messages.message_part_id = message_parts.id)
WHERE messages.id = ?
""",
- arrayOf(messageId.toString()),
+ arrayOf(messageId.toString())
).use { cursor ->
if (!cursor.moveToFirst()) error("Message not found: $messageId")
diff --git a/build.gradle b/build.gradle
index c5fd81a399..6cb56a34f4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -102,7 +102,6 @@ spotless {
.setEditorConfigPath("$projectDir/.editorconfig")
target("**/*.kt")
targetExclude("**/build/", "**/resources/", "plugins/openpgp-api-lib/")
- trimTrailingWhitespace()
endWithNewline()
}
format("markdown") {
--
GitLab
From 11819232ea84b6c2cf93c1eab0078baccef9231b Mon Sep 17 00:00:00 2001
From: Wolf Montwe
Date: Mon, 6 Feb 2023 11:35:18 +0100
Subject: [PATCH 009/317] Add formatter rules for kts and misc files
---
build.gradle | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/build.gradle b/build.gradle
index 6cb56a34f4..1f70bad190 100644
--- a/build.gradle
+++ b/build.gradle
@@ -104,6 +104,13 @@ spotless {
targetExclude("**/build/", "**/resources/", "plugins/openpgp-api-lib/")
endWithNewline()
}
+ kotlinGradle {
+ ktlint(libs.versions.ktlint.get())
+ .setEditorConfigPath("$projectDir/.editorconfig")
+ target("**/*.gradle.kts")
+ targetExclude("**/build/")
+ endWithNewline()
+ }
format("markdown") {
prettier()
target("**/*.md")
@@ -111,6 +118,12 @@ spotless {
trimTrailingWhitespace()
endWithNewline()
}
+ format("misc") {
+ target("**/*.gradle", "**/.gitignore")
+ trimTrailingWhitespace()
+ indentWithSpaces(4)
+ endWithNewline()
+ }
}
tasks.register('testsOnCi') {
--
GitLab
From 80b35d6fa7683e8896ed27c8825643c8a72dc425 Mon Sep 17 00:00:00 2001
From: Wolf Montwe
Date: Mon, 6 Feb 2023 11:54:56 +0100
Subject: [PATCH 010/317] Change Android CI workflow to use spotlessCheck
---
.github/workflows/android.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml
index 9121b5b7c6..8fc1ce8b3a 100644
--- a/.github/workflows/android.yml
+++ b/.github/workflows/android.yml
@@ -28,4 +28,4 @@ jobs:
distribution: 'zulu'
java-version: 17
- uses: gradle/gradle-build-action@v2
- - run: ./gradlew assembleDebug ktlintCheck testsOnCi
+ - run: ./gradlew assembleDebug spotlessCheck testsOnCi
--
GitLab
From 64c4bbe8247ece112ad0775a68a834673ebdb171 Mon Sep 17 00:00:00 2001
From: Wolf Montwe
Date: Mon, 6 Feb 2023 12:16:15 +0100
Subject: [PATCH 011/317] Change pull_request_template to include spotless
formatter instructions
---
.github/pull_request_template.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 6b2d7e0587..2a7da388ea 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -3,7 +3,7 @@ Please ensure that your pull request meets the following requirements - thanks!
- Does not contain merge commits. Rebase instead.
- Contains commits with descriptive titles.
- New code is written in Kotlin whenever possible.
-- Follows our existing codestyle (`gradlew ktlintCheck`; will be checked by CI).
+- Follows our existing codestyle (`gradlew spotlessCheck` to check and `gradlew spotlessFormat` to format your source code; will be checked by CI).
- Does not break any unit tests (`gradlew testDebugUnitTest`; will be checked by CI).
- Uses a descriptive title; don't put issue numbers in there.
- Contains a reference to the issue that it fixes (e.g. _Closes #XXX_ or _Fixes #XXX_) in the body text.
--
GitLab
From f91f3e268b7763614b27fabe06928315ae915110 Mon Sep 17 00:00:00 2001
From: cketti
Date: Mon, 6 Feb 2023 19:43:02 +0100
Subject: [PATCH 012/317] Add abstraction for Android's vibrator service
---
.../com/fsck/k9/ui/settings/KoinModule.kt | 2 ++
.../account/AccountSettingsFragment.kt | 6 ++--
.../account/VibrationDialogFragment.kt | 14 ++------
.../fsck/k9/ui/settings/account/Vibrator.kt | 32 +++++++++++++++++++
4 files changed, 39 insertions(+), 15 deletions(-)
create mode 100644 app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/Vibrator.kt
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/KoinModule.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/KoinModule.kt
index 01df8c35ea..52498229f5 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/KoinModule.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/KoinModule.kt
@@ -3,6 +3,7 @@ package com.fsck.k9.ui.settings
import com.fsck.k9.helper.NamedThreadFactory
import com.fsck.k9.ui.settings.account.AccountSettingsDataStoreFactory
import com.fsck.k9.ui.settings.account.AccountSettingsViewModel
+import com.fsck.k9.ui.settings.account.getSystemVibrator
import com.fsck.k9.ui.settings.export.SettingsExportViewModel
import com.fsck.k9.ui.settings.general.GeneralSettingsDataStore
import com.fsck.k9.ui.settings.general.GeneralSettingsViewModel
@@ -33,6 +34,7 @@ val settingsUiModule = module {
notificationController = get()
)
}
+ factory { getSystemVibrator(context = get()) }
viewModel { SettingsExportViewModel(context = get(), preferences = get(), settingsExporter = get()) }
viewModel { SettingsImportViewModel(get(), get()) }
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsFragment.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsFragment.kt
index 8ae3d7cabe..50050a97f6 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsFragment.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/AccountSettingsFragment.kt
@@ -4,12 +4,10 @@ import android.annotation.SuppressLint
import android.content.Intent
import android.os.Build
import android.os.Bundle
-import android.os.Vibrator
import android.view.Menu
import android.view.MenuInflater
import android.view.MenuItem
import android.widget.Toast
-import androidx.core.content.getSystemService
import androidx.core.net.toUri
import androidx.preference.ListPreference
import androidx.preference.Preference
@@ -53,8 +51,8 @@ class AccountSettingsFragment : PreferenceFragmentCompat(), ConfirmationDialogFr
private val accountRemover: BackgroundAccountRemover by inject()
private val notificationChannelManager: NotificationChannelManager by inject()
private val notificationSettingsUpdater: NotificationSettingsUpdater by inject()
+ private val vibrator: Vibrator by inject()
- private val vibrator by lazy { requireContext().getSystemService() }
private lateinit var dataStore: AccountSettingsDataStore
private var notificationSoundPreference: NotificationSoundPreference? = null
@@ -203,7 +201,7 @@ class AccountSettingsFragment : PreferenceFragmentCompat(), ConfirmationDialogFr
}
private fun initializeNotifications(account: Account) {
- if (vibrator?.hasVibrator() != true) {
+ if (!vibrator.hasVibrator) {
findPreference(PREFERENCE_NOTIFICATION_VIBRATION)?.remove()
}
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/VibrationDialogFragment.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/VibrationDialogFragment.kt
index 4ecedb8baa..00f43bfd53 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/VibrationDialogFragment.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/VibrationDialogFragment.kt
@@ -3,8 +3,6 @@ package com.fsck.k9.ui.settings.account
import android.app.Dialog
import android.os.Build
import android.os.Bundle
-import android.os.VibrationEffect
-import android.os.Vibrator
import android.view.View
import android.view.ViewGroup
import android.widget.BaseAdapter
@@ -14,16 +12,16 @@ import android.widget.SeekBar.OnSeekBarChangeListener
import android.widget.TextView
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.widget.SwitchCompat
-import androidx.core.content.getSystemService
import androidx.preference.PreferenceDialogFragmentCompat
import com.fsck.k9.NotificationVibration
import com.fsck.k9.VibratePattern
import com.fsck.k9.ui.R
import com.fsck.k9.ui.getEnum
import com.fsck.k9.ui.putEnum
+import org.koin.android.ext.android.inject
class VibrationDialogFragment : PreferenceDialogFragmentCompat() {
- private val vibrator by lazy { requireContext().getSystemService() ?: error("Vibrator service missing") }
+ private val vibrator: Vibrator by inject()
private val vibrationPreference: VibrationPreference
get() = preference as VibrationPreference
@@ -83,13 +81,7 @@ class VibrationDialogFragment : PreferenceDialogFragmentCompat() {
val vibrationTimes = adapter.vibrationTimes
val vibrationPattern = NotificationVibration.getSystemPattern(vibratePattern, vibrationTimes)
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
- val vibrationEffect = VibrationEffect.createWaveform(vibrationPattern, -1)
- vibrator.vibrate(vibrationEffect)
- } else {
- @Suppress("DEPRECATION")
- vibrator.vibrate(vibrationPattern, -1)
- }
+ vibrator.vibrate(vibrationPattern)
}
private inner class VibrationPatternAdapter(
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/Vibrator.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/Vibrator.kt
new file mode 100644
index 0000000000..544b71f05e
--- /dev/null
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/Vibrator.kt
@@ -0,0 +1,32 @@
+package com.fsck.k9.ui.settings.account
+
+import android.content.Context
+import android.os.Build
+import android.os.VibrationEffect
+import androidx.core.content.getSystemService
+import android.os.Vibrator as VibratorService
+
+interface Vibrator {
+ val hasVibrator: Boolean
+ fun vibrate(vibrationPattern: LongArray)
+}
+
+internal class AndroidVibrator(private val vibrator: VibratorService) : Vibrator {
+ override val hasVibrator: Boolean
+ get() = vibrator.hasVibrator()
+
+ override fun vibrate(vibrationPattern: LongArray) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ val vibrationEffect = VibrationEffect.createWaveform(vibrationPattern, -1)
+ vibrator.vibrate(vibrationEffect)
+ } else {
+ @Suppress("DEPRECATION")
+ vibrator.vibrate(vibrationPattern, -1)
+ }
+ }
+}
+
+internal fun getSystemVibrator(context: Context): Vibrator {
+ val vibratorService = context.getSystemService() ?: error("Vibrator service missing")
+ return AndroidVibrator(vibratorService)
+}
--
GitLab
From 125e1af9d6f35ebbc563a3775fbb464120790de7 Mon Sep 17 00:00:00 2001
From: cketti
Date: Mon, 6 Feb 2023 19:45:09 +0100
Subject: [PATCH 013/317] Use Koin instead of custom `by lazy` code
---
.../src/test/java/com/fsck/k9/DependencyInjectionTest.kt | 6 ++++++
app/ui/legacy/src/main/java/com/fsck/k9/ui/KoinModule.kt | 2 ++
.../com/fsck/k9/ui/choosefolder/ChooseFolderActivity.kt | 2 +-
.../src/main/java/com/fsck/k9/ui/folders/KoinModule.kt | 2 ++
.../com/fsck/k9/ui/managefolders/ManageFoldersFragment.kt | 2 +-
.../com/fsck/k9/ui/messagelist/MessageListFragment.kt | 5 ++---
.../com/fsck/k9/ui/messageview/MessageContainerView.kt | 8 +++-----
7 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/app/k9mail/src/test/java/com/fsck/k9/DependencyInjectionTest.kt b/app/k9mail/src/test/java/com/fsck/k9/DependencyInjectionTest.kt
index 09f3508db3..1c73b1dd3e 100644
--- a/app/k9mail/src/test/java/com/fsck/k9/DependencyInjectionTest.kt
+++ b/app/k9mail/src/test/java/com/fsck/k9/DependencyInjectionTest.kt
@@ -1,12 +1,15 @@
package com.fsck.k9
+import android.view.ContextThemeWrapper
import androidx.lifecycle.LifecycleOwner
import androidx.work.WorkerParameters
import com.fsck.k9.job.MailSyncWorker
+import com.fsck.k9.ui.R
import com.fsck.k9.ui.changelog.ChangeLogMode
import com.fsck.k9.ui.changelog.ChangelogViewModel
import com.fsck.k9.ui.endtoend.AutocryptKeyTransferActivity
import com.fsck.k9.ui.endtoend.AutocryptKeyTransferPresenter
+import com.fsck.k9.ui.folders.FolderIconProvider
import com.fsck.k9.ui.folders.FolderNameFormatter
import com.fsck.k9.ui.helper.SizeFormatter
import org.junit.Test
@@ -44,6 +47,9 @@ class DependencyInjectionTest : AutoCloseKoinTest() {
withParameter { RuntimeEnvironment.getApplication() }
withParameter { ChangeLogMode.CHANGE_LOG }
withParameter { mock() }
+ withParameter {
+ ContextThemeWrapper(RuntimeEnvironment.getApplication(), R.style.Theme_K9_DayNight).theme
+ }
}
}
}
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/KoinModule.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/KoinModule.kt
index 5e3b83ef47..fa9746bff4 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/KoinModule.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/KoinModule.kt
@@ -8,6 +8,7 @@ import com.fsck.k9.ui.helper.HtmlToSpanned
import com.fsck.k9.ui.helper.SizeFormatter
import com.fsck.k9.ui.messageview.LinkTextHandler
import com.fsck.k9.ui.share.ShareIntentBuilder
+import org.koin.core.qualifier.named
import org.koin.dsl.module
val uiModule = module {
@@ -15,6 +16,7 @@ val uiModule = module {
single { K9ThemeProvider() }
single { HtmlSettingsProvider(get()) }
single { DisplayHtmlUiFactory(get()) }
+ factory(named("MessageView")) { get().createForMessageView() }
factory { (context: Context) -> SizeFormatter(context.resources) }
factory { ShareIntentBuilder(resourceProvider = get(), textPartFinder = get(), quoteDateFormatter = get()) }
factory { LinkTextHandler(context = get(), clipboardManager = get()) }
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/choosefolder/ChooseFolderActivity.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/choosefolder/ChooseFolderActivity.kt
index 5ec07b4ac4..713dfca9fa 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/choosefolder/ChooseFolderActivity.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/choosefolder/ChooseFolderActivity.kt
@@ -31,7 +31,7 @@ class ChooseFolderActivity : K9Activity() {
private val preferences: Preferences by inject()
private val messagingController: MessagingController by inject()
private val folderNameFormatter: FolderNameFormatter by inject { parametersOf(this) }
- private val folderIconProvider by lazy { FolderIconProvider(theme) }
+ private val folderIconProvider: FolderIconProvider by inject { parametersOf(theme) }
private lateinit var recyclerView: RecyclerView
private lateinit var itemAdapter: ItemAdapter
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/folders/KoinModule.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/folders/KoinModule.kt
index 083b6c8274..d493ca8aba 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/folders/KoinModule.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/folders/KoinModule.kt
@@ -1,6 +1,7 @@
package com.fsck.k9.ui.folders
import android.content.Context
+import android.content.res.Resources.Theme
import org.koin.androidx.viewmodel.dsl.viewModel
import org.koin.dsl.module
@@ -8,4 +9,5 @@ val foldersUiModule = module {
single { FolderNameFormatterFactory() }
factory { (context: Context) -> FolderNameFormatter(context.resources) }
viewModel { FoldersViewModel(folderRepository = get(), messageCountsProvider = get()) }
+ factory { (theme: Theme) -> FolderIconProvider(theme) }
}
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/managefolders/ManageFoldersFragment.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/managefolders/ManageFoldersFragment.kt
index 2607a868df..6f8f0dc15a 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/managefolders/ManageFoldersFragment.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/managefolders/ManageFoldersFragment.kt
@@ -32,7 +32,7 @@ class ManageFoldersFragment : Fragment() {
private val folderNameFormatter: FolderNameFormatter by inject { parametersOf(requireActivity()) }
private val messagingController: MessagingController by inject()
private val preferences: Preferences by inject()
- private val folderIconProvider by lazy { FolderIconProvider(requireActivity().theme) }
+ private val folderIconProvider: FolderIconProvider by inject { parametersOf(requireActivity().theme) }
private lateinit var account: Account
private lateinit var itemAdapter: ItemAdapter
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/messagelist/MessageListFragment.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/messagelist/MessageListFragment.kt
index 4b6b914e91..bc6c8a7849 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/messagelist/MessageListFragment.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/messagelist/MessageListFragment.kt
@@ -53,7 +53,6 @@ import com.fsck.k9.ui.changelog.RecentChangesViewModel
import com.fsck.k9.ui.choosefolder.ChooseFolderActivity
import com.fsck.k9.ui.fab.ShrinkFabOnScrollListener
import com.fsck.k9.ui.folders.FolderNameFormatter
-import com.fsck.k9.ui.folders.FolderNameFormatterFactory
import com.fsck.k9.ui.helper.RelativeDateTimeFormatter
import com.fsck.k9.ui.messagelist.MessageListFragment.MessageListFragmentListener.Companion.MAX_PROGRESS
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
@@ -63,6 +62,7 @@ import java.util.concurrent.Future
import net.jcip.annotations.GuardedBy
import org.koin.android.ext.android.inject
import org.koin.androidx.viewmodel.ext.android.viewModel
+import org.koin.core.parameter.parametersOf
import timber.log.Timber
private const val MAXIMUM_MESSAGE_SORT_OVERRIDES = 3
@@ -77,8 +77,7 @@ class MessageListFragment :
private val recentChangesViewModel: RecentChangesViewModel by viewModel()
private val sortTypeToastProvider: SortTypeToastProvider by inject()
- private val folderNameFormatterFactory: FolderNameFormatterFactory by inject()
- private val folderNameFormatter: FolderNameFormatter by lazy { folderNameFormatterFactory.create(requireContext()) }
+ private val folderNameFormatter: FolderNameFormatter by inject { parametersOf(requireContext()) }
private val messagingController: MessagingController by inject()
private val preferences: Preferences by inject()
private val clock: Clock by inject()
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.kt
index 0d3534f269..0915160e4d 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.kt
@@ -31,23 +31,21 @@ import com.fsck.k9.mail.Address
import com.fsck.k9.mailstore.AttachmentResolver
import com.fsck.k9.mailstore.AttachmentViewInfo
import com.fsck.k9.mailstore.MessageViewInfo
+import com.fsck.k9.message.html.DisplayHtml
import com.fsck.k9.ui.R
-import com.fsck.k9.ui.helper.DisplayHtmlUiFactory
import com.fsck.k9.view.MessageWebView
import com.fsck.k9.view.MessageWebView.OnPageFinishedListener
import com.fsck.k9.view.WebViewConfigProvider
import org.koin.core.component.KoinComponent
-import org.koin.core.component.get
import org.koin.core.component.inject
+import org.koin.core.qualifier.named
class MessageContainerView(context: Context, attrs: AttributeSet?) :
LinearLayout(context, attrs),
OnCreateContextMenuListener,
KoinComponent {
- private val displayHtml by lazy(mode = LazyThreadSafetyMode.NONE) {
- get().createForMessageView()
- }
+ private val displayHtml: DisplayHtml by inject(named("MessageView"))
private val webViewConfigProvider: WebViewConfigProvider by inject()
private val clipboardManager: ClipboardManager by inject()
private val linkTextHandler: LinkTextHandler by inject()
--
GitLab
From cea4a514942d5dd3ca168f82ccaeec64705604f9 Mon Sep 17 00:00:00 2001
From: cketti
Date: Tue, 7 Feb 2023 12:24:21 +0100
Subject: [PATCH 014/317] Tweak appearance of "Download complete message"
button
---
app/ui/legacy/src/main/res/layout/message.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/ui/legacy/src/main/res/layout/message.xml b/app/ui/legacy/src/main/res/layout/message.xml
index 1ac80286db..b3b9d049e9 100644
--- a/app/ui/legacy/src/main/res/layout/message.xml
+++ b/app/ui/legacy/src/main/res/layout/message.xml
@@ -103,6 +103,8 @@
%.1f Гб%.1f Мб%.1f Кб%d Б
- Новая пошта
- %d новыя ліст
+ %d новы ліст%d новыя лісты%d новых лістоў
- %d новых лістоў
+ %d новыя лісты
- %1$d новых (%2$s)
- + %1$d яшчэ ў %2$s
+ + %1$d яшчэ %2$sАдказацьПазначыць прачытанымПазначыць усё прачытаным
@@ -155,17 +163,22 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
АрхіўУсе ў архіўСпам
+ Памылка сертыфікатаЗбой сертыфіката %sПраверце налады сервераАўтэнтыфікацыя схібілаНяўдалая аўтарызацыя для %s. Змяніце налады сервера.
+ Памылка апавяшчэння
- Праверка пошты: %1$s:%2$s
- Праверка пошты
- Адпраўка пошты: %s
+ Падчас стварэння сістэмнага апавяшчэння пра новы ліст адбылася памылка. Хутчэй за ўсё, прычына ў адсутнасці гуку апавяшчэння.\n\nНацісніце, каб адкрыць налады апавяшчэнняў.
+ Правяранне пошты: %s:%s
+ Правяранне пошты
+ Адпраўленне пошты: %sАдпраўленне пошты:
+ Сінхранізаваць (прымусовае правяранне)
+ Паказваецца падчас чакання новых лістоўПаведамленніАпавяшчэнні пра лістыРознае
@@ -175,12 +188,15 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
ЧарнавікіСметніцаАдпраўлена
- Не атрымалася адправіць лісты
+ Не ўдалося адправіць лістыВерсія
- Уключыць журнал адладкі
+ Уключыць журнал адладжванняЗапіс звестак дыягностыкіЗапіс асабістых звестакДазволіць запіс пароляў у журнал.
+ Экспартаванне журналаў
+ Экспартаванне паспяхова выканана. Журналы могуць змяшчаць канфідэнцыйную інфармацыю. Будзьце ўважлівыя пры выбары адрасатаў.
+ Не ўдалося экспартаваць.Загрузіць больш лістоўКаму:%sТэма
@@ -193,7 +209,7 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Каму:Копія:%s піша:
- %1$s, %2$s піша:
+ On %1$s, %2$s піша:Вы мусіце дадаць прынамсі аднаго адрасата.Поле адрасата запоўнена не поўнасцю!У кантакта няма звестак пра адрас электроннай пошты.
@@ -203,16 +219,19 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Выдаліць цытатуРэдагаваць цытатуВыдаліць далучаныя файлы
- Ад: %1$s <%2$s>
+ Ад: %s <%s>Каму:Копія:Схаваная копія:Немагчыма захаваць далучаныя файлы.
+
+
+
+
Няма праграмы для прагляду %s.Спампаваць ліст цалкамад %1$sУсё ліставанне
- Ад %sЛіст скасаваныЛіст захаваны як чарнавікПаказваць адзнакі
@@ -226,6 +245,7 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Выкарыстоўваць імёны адпраўнікоў з кантактаўКолер кантактаўАфарбоўваць імёны з кантактаў
+ Колер кантактуШрыфты з фіксаванай шырынёйВыкарыстоўваць шрыфты з фіксаванай шырынёй для адлюстравання лістоў з простым тэкстамАўтазапаўненне лістоў
@@ -243,13 +263,19 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Пазначыць усе лісты прачытаныміВыдаліць (у апавяшчэнні)
+ Дзеянні вядзення пальцам
+ Вядзенне ўправа
+ Вядзенне ўлеваНяма
+ Абраць або адкінуць выбар
+ Пазначыць прачытаным або непрачытаным
+ Дадаць або выдаліць адзнакуАрхіў
@@ -269,6 +295,7 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Апавяшчэнні на экране блакаванняПрыбраць з экрана блакаванняНазва праграмы
+ Колькасць новых лістоўЛічыльнік лістоў і адпраўнікіЯк без блакаванняПерыяд цішыні
@@ -280,14 +307,20 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Новы акаўнтАдрас электроннай поштыПароль
+ Каб выкарыстоўваць гэты акаўнт электроннай пошты ў K-9 Mail, вам трэба ўвайсці і даць праграме доступ да вашай электроннай пошты.
+ Увайсці
+ Увайсці з дапамогай Google
+ Каб бачыць тут свой пароль, уключыце блакаванне экрана на гэтай прыладзе.
+ Праверце свае ўліковыя даныя
+ Разблакаваць, каб паглядзець парольУласнаручнаАтрыманне звестак\u2026
- Праверка налад сервера ўваходнай пошты\u2026
- Праверка налад сервера выходнай пошты\u2026
+ Правяранне налад сервера ўваходнай пошты\u2026
+ Правяранне налад сервера выходнай пошты\u2026Аўтэнтыфікацыя\u2026Атрыманне налад акаўнта\u2026Скасаванне\u2026
@@ -302,6 +335,7 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Пароль, перададзены небяспечнаЗашыфраваны парольСертыфікат кліента
+ OAuth 2.0Сервер уваходнай поштыІмя карыстальнікаПароль
@@ -320,9 +354,10 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Пакінуць на серверыВыдаліць з сервераПазначыць на серверы як прачытанае
+ Выкарыстоўваць сцісканнеСціранне выдаленых лістоў з сервераНеадкладна
- Падчас праверкі
+ Падчас апытанняУласнаручнаАўтавызначэнне вобласці назваў IMAPПрэфікс шляху IMAP
@@ -345,9 +380,9 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
ПарольАўтэнтыфікацыя\"%1$s = %2$s\" непрыдатны для \"%3$s = %4$s\"
- Хібная наладка: %s
+ Хібнае наладжванне: %sПараметры акаўнта
- Чашчыня праверкі
+ Частата апытанняНіколіКожныя 15 хвілінКожныя 30 хвілін
@@ -380,10 +415,14 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
10000 лістоўусе лістыНемагчыма скапіяваць ці перамясціць паведамленне, якое не сінхранізавана з серверам
- Наладка не завершаная
+ Наладжванне не завершанаХібныя лагін ці пароль.\n(%s)Сервер падае хібны сертыфікат SSL. Гэта можа адбывацца праз няправільныя налады. Таксама праз тое, што нехта спрабуе атакаваць ваш паштовы сервер альбо камп’ютар. Калі вы не ведаеце канкрэтнай прычыны, то адхіліце і звяжыцеся з тым, хто абслугоўвае сервер.\n\n(%s)
- Не атрымалася злучыцца з серверам.\n(%s)
+ Не ўдалося злучыцца з серверам.\n(%s)
+ Аўтарызацыя скасаваная
+ Не ўдалося выканаць аўтарызацыю праз наступную памылку: %s
+ На дадзены момант OAuth 2.0 не падтрымліваецца гэтай службай.
+ Праграме не ўдалося знайсці браўзер, каб даць доступ да вашага акаўнта.Рэдагаваць падрабязнасціПрацягнуцьДадаткова
@@ -398,15 +437,20 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Апавяшчэнне пра сінхранізацыюВаш адрас электроннай поштыПаказваць на панэлі стану апавяшчэнні пра новую пошту
- Паказваць на панэлі стану апавяшчэнні пра праверку пошты
+ Паказваць на панэлі стану апавяшчэнні пра правяранне поштыУключаючы адпраўленую поштуПаказваць апавяшчэнні пры атрыманні поштыТолькі кантактыАпавяшчаць толькі пра лісты ад кантактаў
+ Не зважаць на лісты ў чаце
+ Не паказваць апавяшчэнні пра лісты паштовага чатаПазначаць прачытаным пры адкрыцціПазначаць ліст прачытаным пасля праглядуПазначаць як прачытанае пры выдаленніПазначаць ліст як прачытаны пасля яго выдалення
+ Катэгорыі апавяшчэнняў
+ Наладжванне апавяшчэнняў пра новыя лісты
+ Наладжванне апавяшчэнняў пра памылкі і станЗаўсёды паказваць выявыНеАд кантактаў
@@ -438,14 +482,14 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Скразное шыфраваннеУключыць падтрымку OpenPGPПраграма OpenPGP
- Наладка ключа шыфравання
+ Наладжванне ключа шыфраванняНяма наладжанай праграмы OpenPGPПадлучана да %s
- Наладка…
+ Наладжванне…Захоўваць чарнавікі зашыфраваныміУсе чарнавікі будуць захоўвацца зашыфраваныміШыфраваць чарнавікі, калі шыфраванне ўключана
- Чашчыня праверкі
+ Частата апытанняКолер акаўнтаКолер гэтага акаўнта для каталогаў і спіса акаўнтаўПамер лакальнага каталога
@@ -483,13 +527,13 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
1 клас1 і 2 класыАпроч 1 і 2 класаў
- Праверка каталогаў
+ Апытанне каталогаўУсе1 клас1 і 2 класыАпроч 1 і 2 класаўНяма
- Push
+ Каталогі прымусовага правяранняУсе1 клас1 і 2 класы
@@ -510,33 +554,52 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Без класа1 клас2 клас
- Праверка каталогаў
+ Клас апытання каталогаўНяма1 клас2 класЯк клас бачнасці
- Push
+ Клас прымусовага правярання каталогаБез класа1 клас2 клас
+ Тое самае, што і клас апытанняАпавяшчэнне пра каталогБез класа1 клас2 клас
- Як push
+ Тое самае, што і клас прымусовага правяранняВыдаліць лакальныя лістыСервер уваходных лістоў
- Наладка сервера ўваходнай пошты
+ Наладжванне сервера ўваходнай поштыСервер выходных лістоў
- Наладка сервера выходнай пошты (SMTP)
+ Наладжванне сервера выходнай пошты (SMTP)Назва акаўнтаВаша імяАпавяшчэнні
+ ВібрацыяВібрацыя
- Прадвызначана
+ Шаблон вібрацыі
+ Прадвызначаная
+ Шаблон 1
+ Шаблон 2
+ Шаблон 3
+ Шаблон 4
+ Шаблон 5Паўтор вібрацыі
+ АдключанаМелодыя атрымання новай пошты
+ Светлавы індыкатар
+ АдключанаКолер акаўнта
+ Прадвызначаны сістэмны колер
+ Белы
+ Чырвоны
+ Зялёны
+ Сіні
+ Жоўты
+ Марской хвалі
+ ПурпуровыПараметры стварэння лістаНовы лістПрадвызначаныя адпраўнік, копія, схаваная копія
@@ -581,15 +644,15 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Спачатку непрачытаныя лістыСпачатку прачытаныя лістыСпачатку лісты з далучанымі файламі
- Спачатку лісты без укладзеных файлаў
- Сартаваць па…
+ Спачатку лісты без далучаных файлаў
+ Сартаванне…ДатаАтрыманаТэмаАдпраўнікАдзнакаПрачытана / Не чытана
- Укладзеныя файлы
+ Далучаныя файлыВыдаліць акаўнтНераспазнаны сертыфікатУхваліць
@@ -609,7 +672,7 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Выкарыстоўваць прадвызначаныя сістэмныя параметрыВыглядАгульныя
- Адладка
+ АдладжваннеПрыватнасцьСеткаІнтэрфейс
@@ -630,7 +693,7 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
ЗаўсёдыКалі аўтасінхранізацыя ўключанаяАбраць усё
- Максімальная колькасць каталогаў для push-праверкі
+ Максімальная колькасць каталогаў для прымусовага правярання5 каталогаў10 каталогаў25 каталогаў
@@ -641,7 +704,9 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
1000 каталогаўАнімацыяАнімацыя інтэрфейсу
+ Навігацыя клавішамі гучнасціАгульная скрыня ўваходных лістоў для ўсіх акаўнтаў
+ Паказваць колькасць адзначаныхУсе атрыманыяУсе лісты са ўсіх каталогаўУсе атрыманыя
@@ -653,7 +718,7 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
НямаАўтаматычна (%s)Памер шрыфту
- Наладка памеру шрыфтоў
+ Наладжванне памеру шрыфтоўСпіс лістоўТэмаАдпраўнік
@@ -675,10 +740,10 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
БуйныВельмі вялікіПатрэбнай праграмы не знойдзена.
- Не атрымалася адправіць: %s
+ Не ўдалося адправіць: %sЗахаваць чарнавік?Захаваць ці скасаваць ліст?
- Захаваць альбо адкінуць змены?
+ Захаваць або адкінуць змены?Скасаваць ліст?Сапраўды хочаце скасаваць ліст?Выдаліць лакальныя лісты?
@@ -719,7 +784,7 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
ПадзяліццаЭкспарт налад…Налады паспяхова экспартаваныя
- Не атрымалася экспартаваць налады
+ Не ўдалося экспартаваць наладыІмпартаваць наладыАбраць файлІмпарт
@@ -727,23 +792,26 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Калі ласка, увядзіце пароль
+ Увайдзіце
- Не атрымалася імпартаваць налады
- Не атрымалася прачытаць файл налад
- Не атрымалася імпартаваць некаторыя налады
+ Увайдзіце і ўвядзіце пароль
+ Не ўдалося імпартаваць налады
+ Не ўдалося прачытаць файл налад
+ Не ўдалося імпартаваць некаторыя наладыПаспяхова імпартаванаПатрабуецца пароль
+ Неабходна ўвайсціНе імпартавана
- Не атрымалася імпартаваць
+ Не ўдалося імпартавацьПазнейІмпартаваць наладыІмпарт налад…
- Каб мець магчымасць выкарыстоўваць аказалі \"%s\", вам неабходна ўвесці пароль для сервера.
- Каб мець магчымасць выкарыстоўваць аказалі \"%s\", вам неабходна ўвесці паролі для сервера.
- Каб мець магчымасць выкарыстоўваць аказалі \"%s\", вам неабходна ўвесці паролі для сервера.
- Каб мець магчымасць выкарыстоўваць аказалі \"%s\", вам неабходна ўвесці паролі для сервера.
+ Каб мець магчымасць выкарыстоўваць акаўнт \"%s\", вам неабходна ўвесці пароль для сервера.
+ Каб мець магчымасць выкарыстоўваць акаўнт \"%s\", вам неабходна ўвесці паролі для сервера.
+ Каб мець магчымасць выкарыстоўваць акаўнт \"%s\", вам неабходна ўвесці паролі для сервера.
+ Каб мець магчымасць выкарыстоўваць акаўнт \"%s\", вам неабходна ўвесці паролі для сервера.Пароль для сервера ўваходнай поштыПароль для сервера выходнай пошты
@@ -791,7 +859,7 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
5001000Ліміт пошуку на серверы
- Адпраўка запытаў на сервер
+ Адпраўленне запытаў на серверАтрыманне %d вынікуАтрыманне %d вынікаў
@@ -804,7 +872,7 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Атрыманне %1$d з %2$d вынікаўАтрыманне %1$d з %2$d вынікаў
- Не атрымалася выканаць адлеглы пошук
+ Не ўдалося выканаць адлеглы пошукПошукПошук лістоў на серверыДля пошуку на серверы патрабуецца злучэнне з сеткай.
@@ -828,17 +896,17 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Дзеянні для лістоўПаказваць абраныя дзеянні ў меню лістаЗагрузка ўкладзеных файлаў…
- Адпраўка ліста
+ Адпраўленне лістаЗахаванне чарнавікаАтрыманне ўкладзеных файлаў…
- Не атрымалася выканаць аўтэнтыфікацыю. Сервер не паведамляе пра сумяшчальнасць з SASL EXTERNAL. Прычынай можа быць хібны сертыфікат кліента (пратэрмінаваны, ад невядомага) альбо праблема канфігурацыі.
+ Не ўдалося выканаць аўтэнтыфікацыю. Сервер не паведамляе пра сумяшчальнасць з SASL EXTERNAL. Прычынай можа быць хібны сертыфікат кліента (пратэрмінаваны, ад невядомага) альбо праблема канфігурацыі.Выкарыстоўваць сертыфікат кліентаНе выкарыстоўваць сертыфікатАдключыць выбар сертыфіката кліентаНе ўдалося атрымаць сертыфікат кліента для \"%s\"Дадатковыя параметры
- Тэрмін дзеяння сертыфіката кліента \"%1$s\" сыйшоў альбо яшчэ не надышоў (%2$s)
+ Тэрмін дзеяння сертыфіката кліента \"%1$s\" скончыўся альбо яшчэ не надышоў (%2$s)*Зашыфравана*Дадаць з кантактаў
@@ -846,6 +914,7 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Схаваная копіяКамуАд
+ Адказаць<Невядомы атрымальнік><Невядомы адпраўнік>Хатні
@@ -855,8 +924,8 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Для гэтага акаўнта не наладжаны каталог чарнавікоў!Для гэтага акаўнта ключоў не наладжана! Праверце свае налады.Крыптапастаўшчык выкарыстоўвае несумяшчальную версію. Калі ласка, праверце налады!
- Не атрымалася злучыцца з крыптапастаўшчыком. Праверце налады альбо зноў націсніце на значок шыфравання!
- Не атрымалася ініцыялізаваць скразное шыфраванне. Калі ласка, праверце налады
+ Не ўдалося злучыцца з крыптапастаўшчыком. Праверце налады альбо зноў націсніце на значок шыфравання!
+ Не ўдалося ініцыялізаваць скразное шыфраванне. Калі ласка, праверце наладыРэжым PGP/INLINE не падтрымлівае ўкладзеных файлаў!Уключыць PGP/INLINEАдключыць PGP/INLINE
@@ -866,7 +935,7 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Ліст адпраўлены ў фармаце PGP/INLINE.\nВыкарыстоўвайце толькі для сумяшчальнасці:Некаторыя кліенты падтрымліваюць толькі гэты фарматПадчас перадачы подпісы могуць пашкодзіцца
- Укладзеныя файлы не падтрымліваюцца
+ Далучэнне файлаў не падтрымліваеццаЗразумела!АдключыцьНе адключаць
@@ -877,11 +946,11 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
У гэтым рэжыме ваш ключ PGP будзе выкарыстоўвацца для стварэння крыптаграфічнага подпісу да незашыфраванага ліста.Адрасат зможа пераканацца, што ліст сапраўдны і падпісаны вашым ключом.Подпісы могуць пашкодзіцца пры адпраўцы некалькім адрасатам.
- Подпісы могуць паказвацца як укладзеныя файлы \"signature.asc\".
+ Подпісы могуць паказвацца як далучаныя файлы \"signature.asc\".Зашыфраваныя лісты заўсёды змяшчаюць подпіс.Просты тэкстподпіс скразнога шыфравання змяшчае памылку
- для праверкі подпісу патрэбна поўнасцю спампаваць ліст
+ для правярання подпісу патрэбна поўнасцю спампаваць лістзмяшчае непадтрымліваемы подпіс скразнога шыфраванняЛіст зашыфраваны ў непадтрымліваемым фармаце.Ліст зашыфраваны, расшыфроўка скасаваная.
@@ -917,13 +986,13 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
РазблакавацьГэтая частка незашыфраваная, таму небяспечная.Неабароненыя ўкладзеныя файлы
- Загрузка…
+ Загрузка...Расшыфроўка скасаваная.ПаўтарыцьДля расшыфроўкі зашыфраваны ліст патрэбна спампаваць.
- Не атрымалася расшыфраваць пошту
+ Не ўдалося расшыфраваць поштуАдмысловыя сімвалы зараз не падтрымліваюцца!
- Не атрымалася разабраць адрас!
+ Не ўдалося разабраць адрас!Схаваць незашыфраваныя подпісыПаказваюцца толькі зашыфраваныя подпісыПаказваюцца ўсе подпісы
@@ -952,7 +1021,7 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Узаемнае аўташыфраваннеЛісты шыфруюцца па жаданні ці пры адказе на зашыфраваны ліст.Калі адпраўнік і адрасат уключылі ўзаемнае шыфраванне, шыфраванне будзе ўключацца прадвызначана.
- Націсніце сюды, каб даведацца больш.
+ Вы можаце пстрыкнуць сюды, каб даведацца падрабязней.Асноўныя наладыНяма ўсталяванай праграмы OpenPGPУсталяваць
@@ -961,37 +1030,50 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Шыфраваць тэмы лістоўМожа падтрымлівацца не ўсімі адрасатаміУнутраная памылка: хібны акаўнт!
- Не атрымалася злучыцца з %s!
+ Не ўдалося злучыцца з %s!Адправіць налады аўташыфраванняПерадаць налады скразнога шыфравання на іншыя прылады
- Наладка аўташыфравання
+ Наладжванне аўтаматычнага шыфраванняЛіст з наладамі аўтаматычнага ўзаемнага шыфравання дае магчымасць бяспечна адправіць гэтыя налады на іншую прыладу.Адправіць наладыЛіст будзе адпраўлены на ваш адрас:Стварэнне ліста з наладамі…
- Адпраўка ліста для:
+ Адпраўленне ліста для:Каб скончыць, адкрыйце ліст на іншай прыладзе і ўвядзіце код усталёўкі.Паказаць код усталёўкі
- Наладка аўташыфравання
- Гэты ліст змяшчае ўсе звесткі, якія неабходныя для пераносу налад узаемнага аўташыфравання разам з сакрэтным ключом з зыходнай прылады.
+ Наладжванне аўтаматычнага шыфравання
+ Гэты ліст змяшчае ўсе звесткі, якія неабходныя для пераносу налад узаемнага аўтаматычнага шыфравання разам з сакрэтным ключом з зыходнай прылады.
-Для наладкі ўзаемнага аўташыфравання на новай прыладзе выконвайце інструкцыі, якія паказваюцца на новай прыладзе.
+Для наладжвання ўзаемнага аўтаматычнага шыфравання на новай прыладзе выконвайце інструкцыі, якія паказваюцца на новай прыладзе.
Вы можаце пакінуць гэты ліст як рэзервовую копію вашага сакрэтнага ключа. Запішыце і надзейна захавайце пароль.
- Падчас адпраўкі ліста адбылася памылка. Калі ласка, праверце злучэнне і канфігурацыю сервера выходнай пошты.
+ Падчас адпраўлення ліста адбылася памылка. Калі ласка, праверце злучэнне і канфігурацыю сервера выходнай пошты.УклВыклДазволіць доступ да кантактаўДля вываду прапаноў імёнаў і фота праграме неабходна мець доступ да кантактаў.Падчас загрузкі даных адбылася памылка
+ Ініцыялізацыя…
+ Чаканне новых лістоў
+ Знаходзіцца ў рэжыме сну, пакуль фонавая сінхранізацыя не будзе дазволеная
+ Знаходзіцца ў рэжыме сну, пакуль не стане даступная сетка
+ Націсніце, каб даведацца больш.
+ Звесткі пра прымусовае правяранне
+ Пры выкарыстанні прымусовага правярання K-9 Mail падтрымлівае злучэнне з паштовым серверам. Android патрабуе паказу бягучага апавяшчэння, пакуль праграма актыўная ў фонавым рэжыме. %s
+ Аднак Android таксама дазваляе схаваць апавяшчэнне.
+ Даведацца больш
+ Наладжванне апавяшчэння
+ Калі вам не патрэбныя імгненныя апавяшчэнні пра новыя лісты, вам варта адключыць прымусовае правяранне і выкарыстоўваць апытанне сервера. Апытанне правярае наяўнасць новай пошты праз пэўныя інтэрвалы.
+ Адключыць прымусовае правяраннеАбрацьЗняць выбар
+ Пазначыць прачытанымПазначыць як нечытанае
@@ -1005,4 +1087,31 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к
Спам
+ Перамясціць…
+
+
+ Памылка
+
+ Каталог не знойдзены
+
+
+
+ Ад
+
+ Адпраўнік
+
+ Адказаць
+
+ Каму
+
+ Копія
+
+ Схаваная копія
+
+
+
+
+
+ Адрас электроннай пошты
+
diff --git a/app/ui/legacy/src/main/res/values-bg/strings.xml b/app/ui/legacy/src/main/res/values-bg/strings.xml
index 8b62dddf92..28ec94ff99 100644
--- a/app/ui/legacy/src/main/res/values-bg/strings.xml
+++ b/app/ui/legacy/src/main/res/values-bg/strings.xml
@@ -73,7 +73,6 @@ K-9 Mail е мощен, безплатен имейл клиент за Андр
Копирай в…%d избраниСледващ
- ПредишенОКОткажи
@@ -143,12 +142,10 @@ K-9 Mail е мощен, безплатен имейл клиент за Андр
%.1f МБ%.1f КБ%d Б
- Ново Писмо%d ново съобщение%d нови съобщения
- %1$d Непрочетени (%2$s)+ %1$d в %2$sОтговориМаркирай като прочетено
@@ -214,11 +211,14 @@ K-9 Mail е мощен, безплатен имейл клиент за Андр
Копие:Bcc:Не може да запази прикачения файл.
+
+
+
+
Не може да намери програма за %s.Свали цялото съобщениепрез %1$sОще от този подател
- From %sСъобщението е изтритоСъобщението записано като черноваПокажи звездичките
@@ -1003,4 +1003,27 @@ K-9 Mail е мощен, безплатен имейл клиент за Андр
Спам
+
+
+
+
+
+
+ От
+
+ Изпращач
+
+
+ До
+
+ Cc
+
+ Bcc
+
+
+
+
+
+ Имейл адрес
+
diff --git a/app/ui/legacy/src/main/res/values-br/strings.xml b/app/ui/legacy/src/main/res/values-br/strings.xml
index 588a1878e7..93bf71247d 100644
--- a/app/ui/legacy/src/main/res/values-br/strings.xml
+++ b/app/ui/legacy/src/main/res/values-br/strings.xml
@@ -60,7 +60,6 @@ Danevellit beugoù, kenlabourit war keweriusterioù nevez ha savit goulennoù wa
Dibab an teuliad%d diuzetKenderc’hel
- KentOKNullañ
@@ -125,7 +124,6 @@ Danevellit beugoù, kenlabourit war keweriusterioù nevez ha savit goulennoù wa
Fazi kargañ ar gemennadennKargañ
%d ouzhpenn
- Postel nevez%d gemennadenn nevez%d a gemennadennoù nevez
@@ -133,7 +131,6 @@ Danevellit beugoù, kenlabourit war keweriusterioù nevez ha savit goulennoù wa
%d a gemennadennoù nevez%d a gemennadennoù nevez
- %1$d Anlennet (%2$s)+ %1$d ouzhpenn war %2$sRespontMerkañ evel lennet
@@ -195,11 +192,14 @@ Danevellit beugoù, kenlabourit war keweriusterioù nevez ha savit goulennoù wa
Cc:Bcc:N\'haller ket enrollañ ar stagadenn.
+
+
+
+
N’haller ket kavout ur gwelerez evit %s.Pellgargañ ar gemennadenn glokdre %1$sMuioc’h a-berzh ar c’haser-mañ
- A-berzh %sKemennadenn dilezetKemennadenn enrollet evel brouilhedDiskouez ar steredennoù
@@ -943,4 +943,27 @@ Gallout a rit mirout ar gemennadenn-mañ hag implij anezhi evel un enrolladenn e
Lastez
+
+
+
+
+
+
+ A-berzh
+
+ Kaser
+
+
+ Da
+
+ Cc
+
+ Bcc
+
+
+
+
+
+ Chomlec’h postel
+
diff --git a/app/ui/legacy/src/main/res/values-ca/strings.xml b/app/ui/legacy/src/main/res/values-ca/strings.xml
index 6aa690c0eb..8f488560c0 100644
--- a/app/ui/legacy/src/main/res/values-ca/strings.xml
+++ b/app/ui/legacy/src/main/res/values-ca/strings.xml
@@ -76,7 +76,6 @@ Si us plau, envieu informes d\'errors, contribuïu-hi amb noves millores i feu p
Copia a…%d seleccionatsSegüent
- AnteriorD\'acordCancel·la
@@ -148,12 +147,10 @@ Si us plau, envieu informes d\'errors, contribuïu-hi amb noves millores i feu p
%.1f MB%.1f kB%d B
- Correu nou%d nous missatges%d nous missatges
- %1$d no llegit(s) (%2$s)+ %1$d més sobre %2$sResponMarca com a llegit
@@ -224,11 +221,18 @@ Si us plau, envieu informes d\'errors, contribuïu-hi amb noves millores i feu p
A/c:Bcc:No s\'ha pogut desar l\'adjunt.
+
+ a
+
+ +
+
+ mi
+
+ Mostra les imatges remotesNo s\'ha pogut trobar un visualitzador per %s.Baixa el missatge completmitjançant %1$sMés d\'aquest remitent
- De %sS\'ha descartat el missatgeS\'ha desat el missatge com a esborranyMostra els estels
@@ -285,7 +289,7 @@ Si us plau, envieu informes d\'errors, contribuïu-hi amb noves millores i feu p
Elimina el nom K-9 User-Agent de les capçaleres del missatgeAmaga el fus horariFes servir UTC en comptes de l\'hora local a les capçaleres dels missatges i a la capçalera de resposta
- Mostra el botó \"Elimina\"
+ Mostra el botó de suprimir.MaiPer a notificacions d\'un sol missatgeSempre
@@ -723,6 +727,7 @@ Si us plau, envieu informes d\'errors, contribuïu-hi amb noves millores i feu p
Vista prèviaMissatgesRemitent
+ DestinatarisAssumpteData i horaCos del missatge
@@ -1074,4 +1079,38 @@ Podeu desar aquest missatge i fer-lo servir com a còpia de seguretat per a la v
Correu brossaMou…
+
+ Mostra el botó d\'escriptura flotant
+
+ Error
+
+ Carpeta no trobada
+
+ Detalls del missatge
+
+ Falta la capçalera «Data»
+
+ De:
+
+ Remitent
+
+ Respon a
+
+ A
+
+ A/c
+
+ C/o
+
+ S\'ha produït un error en carregar els detalls del missatge.
+
+ Afegeix als contactes
+
+ Copia l\'adreça de correu
+
+ Copia el nom i l\'adreça de correu
+
+ Envia un correu electrònic a aquesta adreça
+
+ Nom i adreça de correu
diff --git a/app/ui/legacy/src/main/res/values-cs/strings.xml b/app/ui/legacy/src/main/res/values-cs/strings.xml
index 97f6462335..b6437ecda9 100644
--- a/app/ui/legacy/src/main/res/values-cs/strings.xml
+++ b/app/ui/legacy/src/main/res/values-cs/strings.xml
@@ -76,7 +76,6 @@ Hlášení o chyb, úpravy pro nové funkce a dotazy zadávejte prostřednictví
Zkopírovat do…%d vybranýchDalší
- PředchozíOKZrušit
@@ -150,14 +149,12 @@ Hlášení o chyb, úpravy pro nové funkce a dotazy zadávejte prostřednictví
%.1f MB%.1f kB%d B
- Nová zpráva%d nová zpráva%d nové zprávy%d nových zpráv%d nové zprávy
- %1$d Nepřečteno (%2$s)+ %1$d více na %2$sOdpovědětPřečteno
@@ -228,11 +225,14 @@ Hlášení o chyb, úpravy pro nové funkce a dotazy zadávejte prostřednictví
Kopie:Skrytá kopie (Bcc):Přílohu se nedaří uložit.
+
+
+
+
Nelze nalézt prohlížeč pro %s.Stáhnout úplnou zprávupřes %1$sVíce od tohoto odesílatele
- Od %sZpráva byla zrušenaZpráva byla uložena jako konceptZprávy s \u2605
@@ -264,13 +264,19 @@ Hlášení o chyb, úpravy pro nové funkce a dotazy zadávejte prostřednictví
Označit všechny zprávy jako přečtenéSmazat (z oznámení)
+ Nastavení gest
+ Swipe doprava
+ Swipe dolevaŽádné
+ Změnit vybrané
+ Označit jako přečtené/nepřečtené
+ Přidat/odebrat hvězdičkuArchivovat
@@ -699,6 +705,7 @@ Hlášení o chyb, úpravy pro nové funkce a dotazy zadávejte prostřednictví
1000 složekAnimacePoužívat okázalé vizuální efekty
+ Navigace v zobrazení mailů pomocí tlačítek hlasitostiUkázat sjednocený pohled na doručenou poštuZobrazit počet označených hvězdičkouIntegrovaná doručená pošta
@@ -1065,6 +1072,7 @@ Tuto zprávu si můžete ponechat a použít jí jako zálohu svého tajného kl
Zrušit výběr
+ Označit jako přečtenéOznačit jako nepřečtené
@@ -1078,4 +1086,29 @@ Tuto zprávu si můžete ponechat a použít jí jako zálohu svého tajného kl
Nevyžádaná
+ Přesunout…
+
+
+
+
+
+
+ Odesílatel
+
+ Odesílatel
+
+ Odpovědět komu
+
+ Komu
+
+ Kopie
+
+ Skrytá kopie
+
+
+
+
+
+ E-mailová adresa
+
diff --git a/app/ui/legacy/src/main/res/values-cy/strings.xml b/app/ui/legacy/src/main/res/values-cy/strings.xml
index 27957d4821..46e4d05c08 100644
--- a/app/ui/legacy/src/main/res/values-cy/strings.xml
+++ b/app/ui/legacy/src/main/res/values-cy/strings.xml
@@ -77,7 +77,6 @@ Plîs rho wybod am unrhyw wallau, syniadau am nodweddion newydd, neu ofyn cwesti
Copïo i…%d wedi\'i dewisNesaf
- BlaenorolIawnDiddymu
@@ -151,14 +150,12 @@ Plîs rho wybod am unrhyw wallau, syniadau am nodweddion newydd, neu ofyn cwesti
%.1f MB%.1f kB%d B
- Neges newydd%d neges newydd%d neges newydd%d neges newydd%d neges newydd
- %1$d Heb eu darllen (%2$s)+ %1$d yn rhagor ar %2$sAtebNodi wedi ei Darllen
@@ -229,11 +226,14 @@ Plîs rho wybod am unrhyw wallau, syniadau am nodweddion newydd, neu ofyn cwesti
Cc:Bcc:Methu â chadw\'r atodiad.
+
+
+
+
Methwyd cael hyd i ap er mwyn darllen %s.Lawrlwytho\'r neges gyfantrwy %1$sRhagor gan yr anfonwr hwn
- Oddi wrth %sDileuwyd y negesNeges wedi ei chadw fel drafftDangos sêr
@@ -1081,4 +1081,28 @@ Mae\'n bosib i ti gadw\'r neges hon a\'i ddefnyddio wrth gefn fel dy allwedd gyf
Sbam
+
+
+
+
+
+
+ Oddi wrth
+
+ Anfonwr
+
+ Ateb at
+
+ At
+
+ Cc
+
+ Bcc
+
+
+
+
+
+ Cyfeiriad e-bost
+
diff --git a/app/ui/legacy/src/main/res/values-da/strings.xml b/app/ui/legacy/src/main/res/values-da/strings.xml
index ebc212b680..468aea0cc0 100644
--- a/app/ui/legacy/src/main/res/values-da/strings.xml
+++ b/app/ui/legacy/src/main/res/values-da/strings.xml
@@ -12,6 +12,8 @@
Apache licens, version 2.0Opensource ProjektWebsted
+ Bruger manual
+ Få hjælpBruger forumFediverseTwitter
@@ -63,7 +65,7 @@ Rapporter venligst fejl, forslag til nye funktioner eller stil spørgsmål på:
Om K-9 MailKontiAvanceret
- Skrive
+ SkrivSvarSvar alleVideresend
@@ -74,7 +76,6 @@ Rapporter venligst fejl, forslag til nye funktioner eller stil spørgsmål på:
Kopier til...%d valgtNæste
- ForrigeO.k.Annullér
@@ -97,7 +98,7 @@ Rapporter venligst fejl, forslag til nye funktioner eller stil spørgsmål på:
Gem som kladdeSynkroniser mailsSend mails
- Genindlæse mappe liste
+ Genindlæs mappelisteFind mappeTilføj kontoSkriv
@@ -109,7 +110,7 @@ Rapporter venligst fejl, forslag til nye funktioner eller stil spørgsmål på:
Håndtér mapperKontoindstillingerSlet konto
- Marker som læst
+ Markér som læstDelVælg afsenderTilføj stjernemarkering
@@ -123,7 +124,7 @@ Rapporter venligst fejl, forslag til nye funktioner eller stil spørgsmål på:
Emne kopieret til udklipsholderSkift til mørkt temaSkift til lyst tema
- Marker som ulæst
+ Markér som ulæstKvittering for modtagelseDer vil blive anmodet om kvittering for modtagelseDer vil ikke blive anmodet om kvittering for modtagelse
@@ -145,19 +146,17 @@ Rapporter venligst fejl, forslag til nye funktioner eller stil spørgsmål på:
%.1f MB%.1f kB%d B
- Ny mail%dnyt brev%d nye meddelelser
- %1$d ulæst(e) (%2$s)+ %1$d mere på %2$sSvarMarkér som læstMarkér alle som læstSletSlet alle
- Arkivere
+ ArkivérArkivér alleSpamCertifikat fejl
@@ -218,11 +217,14 @@ Rapporter venligst fejl, forslag til nye funktioner eller stil spørgsmål på:
Cc:Bcc:Kunne ikke gemme vedhæftning.
+
+
+
+
Kan ikke finde program som kan vise %s.Hent hele meddelelsenvia %1$sFlere fra denne afsender
- Fra %sMail kasseretMail gemt som kladdeVis stjerner
@@ -259,9 +261,11 @@ Rapporter venligst fejl, forslag til nye funktioner eller stil spørgsmål på:
Ingen
+ Markér som læst/ulæst
+ Tilføj/Fjern stjerne
- Arkivere
+ ArkivérSlet
@@ -279,6 +283,7 @@ Rapporter venligst fejl, forslag til nye funktioner eller stil spørgsmål på:
Besked på låseskærmenIngen besked på låseskærmen Programnavn
+ Antal af nye beskederAntal mails og afsendereSamme som når skærmen er ulåstTidsrum med stilhed
@@ -330,7 +335,8 @@ Rapporter venligst fejl, forslag til nye funktioner eller stil spørgsmål på:
Når jeg sletter en mailUndlad at slette på serverSlet på server
- Marker som læst på server
+ Markér som læst på server
+ Brug komprimeringRyd slettede mailsUmiddelbart efter sletningI forbindelse med hentning af mails
@@ -500,12 +506,12 @@ Rapporter venligst fejl, forslag til nye funktioner eller stil spørgsmål på:
Primære og sekundære mapperAlle undtaget sekundære mapperIngen
- Hent/send mail fra mapper(Push)
+ Hent/send mail fra mapper (Push)AlleKun primære mapperPrimære og sekundære mapperAlle undtaget sekundære mapper
- None
+ IngenFlyt/kopier destinations mapperAlleKun primære mapper
@@ -554,7 +560,9 @@ Rapporter venligst fejl, forslag til nye funktioner eller stil spørgsmål på:
Mønster 4Mønster 5Gentag vibration
+ DeaktiveretRingetone ved ny mail
+ DeaktiveretKontofarveHvidRød
@@ -838,7 +846,7 @@ Rapporter venligst fejl, forslag til nye funktioner eller stil spørgsmål på:
Vær venlig og vælg en meddelelse fra venstre sideVis kontaktbillederVis kontaktbilleder i meddelelsesliste
- Marker alle som læst
+ Markér alle som læstFarvelægning af kontakterBenyt farver hvis der ikke findes billede af kontakterVisning af handlinger for valgte meddelelser
@@ -862,6 +870,7 @@ Rapporter venligst fejl, forslag til nye funktioner eller stil spørgsmål på:
BccTilFra
+ Svar til<Ukendt modtager><Ukendt afsender>Hjem
@@ -1019,17 +1028,43 @@ Beskeden kan beholdes og bruges som sikkerhedskopi til den hemmelige nøgle. Hvi
Fravælg
+ Markér som læst
- Marker som ulæst
+ Markér som ulæstTilføj stjernemarkeringFjern stjernemarkering
- Arkivere
+ ArkivérSletSpam
+ Flyt...
+
+
+
+
+
+
+ Fra
+
+ Afsender
+
+ Svar til
+
+ Til
+
+ Cc
+
+ Bcc
+
+
+
+
+
+ Mail addresse
+
diff --git a/app/ui/legacy/src/main/res/values-de/strings.xml b/app/ui/legacy/src/main/res/values-de/strings.xml
index 6f16137731..d67ed3e8c3 100644
--- a/app/ui/legacy/src/main/res/values-de/strings.xml
+++ b/app/ui/legacy/src/main/res/values-de/strings.xml
@@ -23,7 +23,7 @@
Changelog konnte nicht geladen werden.Version %sWas gibt es Neues
- Zeige die neuesten Änderungen nach einem App-Update
+ Neueste Änderungen nach einem App-Update anzeigenFinde heraus, was es Neues in diesem Release gibtWillkommen bei K-9 Mail
@@ -38,7 +38,7 @@ Seine verbesserten Funktionen beinhalten:
@@ -46,11 +46,11 @@ K-9 Mail — почтовый клиент для Android.
улучшенная поддержка IMAP,
сохранение вложений,
очистка корзины,
-
сортировка сообщений,
-
…и многое другое!
+
упорядочивание сообщений,
+
…и многие другие!
-Пожалуйста, обратите внимание, что K-9 Mail не поддерживает большинство бесплатных учетных записей Hotmail также, как и большинство почтовых клиентов, и имеет некоторые ограничения при работе с MS Exchange .
+Пожалуйста, обратите внимание, что K-9 Mail не поддерживает большинство бесплатных учётных записей Hotmail также, как и большинство почтовиков, и имеет некоторые ограничения при работе с MS Exchange .
Вопросы, сообщения об ошибках и участие в разработке:
https://github.com/k9mail/k-9/.
@@ -59,7 +59,7 @@ K-9 Mail — почтовый клиент для Android.
-- \nПростите за краткость, создано в K-9 Mail.
- Учётная запись \"%s\" будет удалена из приложения K-9 Mail.
+ Учётная запись «%s» будет удалена из приложения K-9 Mail.АвторыО приложении K-9 Mail
@@ -76,7 +76,6 @@ K-9 Mail — почтовый клиент для Android.
Копировать в…%d выбраноДалее
- НазадОКОтмена
@@ -149,14 +148,12 @@ K-9 Mail — почтовый клиент для Android.
%.1f МБ%.1f кБ%d Б
- Новая почта%d новое сообщение%d новых сообщения%d новых сообщений%d новых сообщений
- %1$d новых (%2$s)+ ещё %1$d в %2$sОтветитьПрочитано
@@ -215,7 +212,7 @@ K-9 Mail — почтовый клиент для Android.
%1$s, %2$s пишет:Вы должны добавить хотя бы одного адресата.Поле адресата заполнено неполностью!
- Контакт не содержит сведений о email.
+ Контакт не содержит сведений об эл. почте.Некоторые вложения не были загружены и не могут быть отправлены.Сообщение не может быть переслано, так как не загружены вложения.Включить цитируемое сообщение
@@ -227,11 +224,17 @@ K-9 Mail — почтовый клиент для Android.
Копия:Скрытая копия:Не получается сохранить вложение.
+
+ для
+
+
+ мне
+
+ Загрузить изображенияОтсутствует просмотрщик %s.Загрузить полностьюот %1$sВся переписка
- От %sСообщение отмененоЧерновик сохранёнПоказать важное
@@ -247,7 +250,7 @@ K-9 Mail — почтовый клиент для Android.
Выделять цветом имена из контактовЦвет контактаМоноширинный шрифт
- Показать сообщения в формате \"Только текст\" моноширинным шрифтом
+ Показать сообщения в формате «Только текст» моноширинным шрифтомВписать по ширинеПодогнать текст сообщения по ширине экранаВ список после удаления
@@ -275,7 +278,7 @@ K-9 Mail — почтовый клиент для Android.
Отметить как прочитанное/непрочитанное
- Добавить/удалить звездочку
+ Добавить/удалить звёздочкуАрхив
@@ -284,24 +287,24 @@ K-9 Mail — почтовый клиент для Android.
Переместить в спамПеренести
- Скрыть почтовый клиент
- Убрать K-9 User-Agent из заголовков сообщений
+ Скрыть почтовик
+ Убрать «K-9 User-Agent» из заголовков сообщенийСкрыть временную зонуИспользовать UTC вместо местного времени в заголовках сообщений
- Кнопка \"Удалить\"
+ Кнопка «Удалить»НикогдаДля одиночногоВсегдаВстроить в экран блокировкиУбрать с экрана блокировкиИмя приложения
- Счетчик новых
+ Счётчик новыхСчётчик сообщений и отправителиКак без блокировки
- Период тишины
+ Промежуток тишиныОтключить мелодию, вибрацию и индикатор на ночьОтключить уведомления
- Полностью, в период тишины
+ Полностью, в промежуток тишиныНачалоКонецСоздание учётной записи
@@ -349,7 +352,7 @@ K-9 Mail — почтовый клиент для Android.
НетSSL/TLSSTARTTLS
- \"%1$s = %2$s\" недействителен для \"%3$s = %4$s\"
+ «%1$s = %2$s» недействителен для «%3$s = %4$s»Удалённое, на сервереОставитьУдалить
@@ -379,10 +382,10 @@ K-9 Mail — почтовый клиент для Android.
Имя пользователяПарольАутентификация
- \"%1$s = %2$s\" недействителен для \"%3$s = %4$s\"
+ «%1$s = %2$s» недействителен для «%3$s = %4$s»Неверная настройка: %sНастройки учётной записи
- Интервал проверки
+ Промежуток проверкиВручную15 минут30 минут
@@ -392,7 +395,7 @@ K-9 Mail — почтовый клиент для Android.
6 часов12 часов1 сутки
- Интервал обновления IDLE
+ Промежуток обновления IDLE2 минуты3 минуты6 минут
@@ -442,8 +445,8 @@ K-9 Mail — почтовый клиент для Android.
Показать уведомление при отправке почтыДля контактовУведомлять только о сообщениях от контактов
- Игнорировать сообщения чата
- Не показывать уведомления для сообщений, принадлежащих email чату
+ Не учитывать сообщения чата
+ Не показывать уведомления для сообщений, принадлежащих чату эл. почтыОткрытое прочитаноОтметить сообщение прочитанным после просмотраОтметить как прочитанное при удалении
@@ -473,7 +476,7 @@ K-9 Mail — почтовый клиент для Android.
Префикс (Gmail)Заголовок (Outlook)Выгрузить отправленные
- Помещать сообщения в папку \"Отправленные\" после отправки
+ Помещать сообщения в папку «Отправленные» после отправкиОсновныеЧтениеПолучение
@@ -489,7 +492,7 @@ K-9 Mail — почтовый клиент для Android.
Хранить все черновики в зашифрованном видеВсе черновики будут храниться в зашифрованном видеЗашифровать черновики, если включено шифрование
- Интервал проверки
+ Промежуток проверкиЦвет для учётной записиАкцентный цвет текущей учётной записи, используемый среди учётных записей и папокОтображать сообщений
@@ -595,9 +598,9 @@ K-9 Mail — почтовый клиент для Android.
Системный цветБелыйКрасный
- Зеленый
+ ЗелёныйСиний
- Желтый
+ ЖёлтыйГолубойПурпурныйНовое сообщение
@@ -645,7 +648,7 @@ K-9 Mail — почтовый клиент для Android.
Прочитано – не прочитаноС вложениями – без вложенийБез вложений – с вложениями
- Сортировка
+ УпорядочиваниеДатаПолученоТема
@@ -706,11 +709,11 @@ K-9 Mail — почтовый клиент для Android.
Анимация интерфейсаУправление клавишами громкости для перехода между письмамиПоказывать общий ящик для входящих
- Cчетчик важных
+ Cчётчик важныхВходящиеиз всех ящиков
- Общие \"Входящие\"
- Показать почту в общих \"Входящих\"
+ Общие «Входящие»
+ Показать почту в общих «Входящих»Папки для поискаВсеВидимые
@@ -726,6 +729,7 @@ K-9 Mail — почтовый клиент для Android.
ПросмотрСообщениеОтправитель
+ ПолучателиТемаДата и времяТело сообщения
@@ -738,7 +742,7 @@ K-9 Mail — почтовый клиент для Android.
СреднийБольшойОгромный
- Гигантский
+ ГромадныйПодходящее приложение не найденоСбой отправки: %sВыберите действие
@@ -747,7 +751,7 @@ K-9 Mail — почтовый клиент для Android.
УдалениеОтменить сообщение?Стереть локальные сообщения?
- Это удалит все локальные сообщения из папки.Сообщения не будут удалены с сервера.
+ Это удалит все локальные сообщения из папки. Сообщения не будут удалены с сервера.Стереть сообщенияПодтвердите удалениеВы хотите удалить это сообщение?
@@ -779,13 +783,13 @@ K-9 Mail — почтовый клиент для Android.
›Резервная копияРазное
- Экспортировать настройки
+ Экспорт настроекЭкспортПередатьЭкспорт настроек…Настройки успешно экспортированыСбой экспорта настроек
- Импортировать настройки
+ Импорт настроекВыбрать файлИмпортНастройки успешно импортированы
@@ -808,10 +812,10 @@ K-9 Mail — почтовый клиент для Android.
ИмпортИмпорт настроек…
- Чтобы использовать ящик \"%s\" необходимо ввести пароль.
- Чтобы использовать ящик \"%s\" необходимо ввести пароли.
- Чтобы использовать ящик \"%s\" необходимо ввести пароли.
- Чтобы использовать учётную запись \"%s\" необходимо ввести пароли.
+ Чтобы использовать ящик «%s» необходимо ввести пароль.
+ Чтобы использовать ящик «%s» необходимо ввести пароли.
+ Чтобы использовать ящик «%s» необходимо ввести пароли.
+ Чтобы использовать учётную запись «%s» необходимо ввести пароли.Входящий пароль сервераИсходящий пароль сервера
@@ -820,7 +824,7 @@ K-9 Mail — почтовый клиент для Android.
Счётчик непрочитанныхУчётная записьУчётная запись для отображения счётчика непрочитанных
- Общие \"Входящие\"
+ Общие «Входящие»Счётчик папокПоказывать счётчик непрочитанных только для одной папкиПапка
@@ -840,8 +844,8 @@ K-9 Mail — почтовый клиент для Android.
ОткрытьСохранитьЗагрузить
- URL в буфер
- URL изображения
+ Скопировать изображение в буфер обмена
+ Адрес изображенияВызватьВ контактыВ буфер
@@ -858,7 +862,7 @@ K-9 Mail — почтовый клиент для Android.
2505001000
- Лимит поиска на сервере
+ Ограничение поиска на сервереОтправка запроса на серверПолучение %d результата
@@ -882,7 +886,7 @@ K-9 Mail — почтовый клиент для Android.
Объединить сообщения, показав счётчикОбновление данныхОбновление данных…
- Обновление учётной записи \"%s\"
+ Обновление учётной записи «%s»Разделить экранВсегдаНикогда
@@ -904,7 +908,7 @@ K-9 Mail — почтовый клиент для Android.
Использовать сертификат клиентаНе использовать сертификат клиентаОтключить выбор сертификата клиента
- Не найден сертификат клиента для алиаса \"%s\"
+ Не найден сертификат клиента для алиаса «%s»ДополнительноСрок действия сертификата клиента \"%1$s\" истёк или ещё не наступил (%2$s)
@@ -929,8 +933,8 @@ K-9 Mail — почтовый клиент для Android.
Режим PGP/INLINE не поддерживает вложения!Включить PGP/INLINEОтключить PGP/INLINE
- Включить PGP \"Только подпись\"
- Отключить PGP \"Только подпись\"
+ Включить PGP «Только подпись»
+ Отключить PGP «Только подпись»Режим PGP/INLINEСообщение отправлено в формате PGP/INLINE.\nИспользуйте только для совместимостиНекоторые клиенты поддерживают только этот формат
@@ -942,11 +946,11 @@ K-9 Mail — почтовый клиент для Android.
Понятно!ОтключитьНе отключать
- Режим PGP \"Только подпись\"
+ Режим PGP «Только подпись»В этом режиме, ключ PGP будет использоваться для создания криптографической подписи к незашифрованному сообщениюАдресат сможет убедиться, что сообщение подлинное и подписано Вашим ключомПодписи могут повредиться при отправке нескольким адресатам
- Подписи могут отображаться как вложенные файлы \'signature.asc\'
+ Подписи могут отображаться как вложенные файлы «signature.asc»Всегда добавлять подпись к шифрованным сообщениямТекстневерная подпись сквозного шифрования
@@ -963,8 +967,8 @@ K-9 Mail — почтовый клиент для Android.
но ключ сквозного шифрования небезопасенно ключ сквозного шифрования неизвестенЗашифровано
- но был сбой дешифрования
- требуется полная загрузка сообщения для дешифрования
+ но был сбой расшифровки
+ требуется полная загрузка сообщения для расшифровкино отсутствует настроенное криптоприложениеЗашифрованоно без сквозного шифрования
@@ -987,16 +991,16 @@ K-9 Mail — почтовый клиент для Android.
Эта часть не была зашифрована и небезопаснаНезащищённое вложениеЗагрузка…
- Дешифрование отменено.
+ Расшифрование отменено.Повтор
- Зашифрованное сообщение необходимо загрузить для дешифрования
- Сбой дешифрования почты
+ Зашифрованное сообщение необходимо загрузить для расшифровки
+ Сбой расшифровки почтыСпецсимволы пока не поддерживаются!Сбой разбора адреса!Скрыть подписи без шифрованияОтображаются зашифрованные подписиОтображаются все подписи
- Шифрование недоступно в режиме \"Только подпись\"
+ Шифрование недоступно в режиме «Только подпись»Неподписанный текстСообщение зашифрованоСообщение зашифровано OpenPGP.\nЧтобы прочесть его, необходимо установить и настроить подходящее OpenPGP-приложение.
@@ -1044,13 +1048,13 @@ K-9 Mail — почтовый клиент для Android.
Настройки взаимного автошифрованияЭто сообщение содержит все сведения, необходимые для переноса настроек взаимного автошифрования вместе с секретным ключом с исходного устройства.
-Для настройки взаимного автошифрования на новом устройстве, следуйте инструкциям, отображаемым на новом устройстве.
+Для настройки взаимного автошифрования на новом устройстве, следуйте руководству, отображаемому на новом устройстве.
Это сообщение можно сохранить и использовать в качестве резервной копии своего секретного ключа. Запишите и надёжно сохраните пароль.
Сбой при отправке сообщения. Проверьте соединение с сетью и настройки сервера исходящей почты.Вкл
- Откл
+ ВыклРазрешить доступ к контактамЧтобы подсказывать имена и показывать фото, приложению нужен доступ к контактам
@@ -1072,6 +1076,7 @@ K-9 Mail — почтовый клиент для Android.
Снять выбор
+ ПрочитаноНе прочитано
@@ -1085,4 +1090,39 @@ K-9 Mail — почтовый клиент для Android.
Отправить в спам
+ Переместить в...
+
+ Показать плавающую кнопку создания сообщения
+
+ Ошибка
+
+ Папка не найдена
+
+ Подробности сообщения
+
+ Отсутствует заголовок \'Дата\'
+
+ От
+
+ Отправитель
+
+ Ответить на
+
+ Кому
+
+ Копия
+
+ Скрытая копия
+
+ Произошла ошибка при загрузке сведений о сообщении.
+
+ Добавить в контакты
+
+ Скопировать адрес эл. почты
+
+ Скопировать имя и адрес эл. почты
+
+ Адрес электронной почты
+
+ Имя и адрес эл. почты
diff --git a/app/ui/legacy/src/main/res/values-sk/strings.xml b/app/ui/legacy/src/main/res/values-sk/strings.xml
index 719f275385..f8436e551c 100644
--- a/app/ui/legacy/src/main/res/values-sk/strings.xml
+++ b/app/ui/legacy/src/main/res/values-sk/strings.xml
@@ -70,7 +70,6 @@ Prosím, nahlasujte prípadné chyby, prispievajte novými funkciami a pýtajte
Vyberte priečinok%d vybranýchĎalej
- SpäťOKZrušiť
@@ -139,14 +138,12 @@ Prosím, nahlasujte prípadné chyby, prispievajte novými funkciami a pýtajte
%.1f MB%.1f kB%d B
- Nová správa%d nová správa%d nové správy%d nových správ%d nových správ
- Počet neprečítaných správ: %1$d v %2$s+ %1$d ďalších v %2$sOdpovedaťOznačiť ako prečítané
@@ -209,11 +206,14 @@ Prosím, nahlasujte prípadné chyby, prispievajte novými funkciami a pýtajte
Kópia:Skrytá kópia (Bcc):Prílohu sa nepodarilo uložiť.
+
+
+
+
Nemožno nájsť prehliadač pre %s.Stiahnuť kompletnú správucez %1$sViac od tohto odosielateľa
- Od %sSpráva bola zahodenáSpráva bola uložená ako konceptZobraziť hviezdičky
@@ -901,4 +901,27 @@ Prosím, nahlasujte prípadné chyby, prispievajte novými funkciami a pýtajte
Nevyžiadaná pošta
+
+
+
+
+
+
+ Od
+
+ Odosielateľ
+
+
+ Komu
+
+ Kópia
+
+ Skrytá kópia
+
+
+
+
+
+ E-mailová adresa
+
diff --git a/app/ui/legacy/src/main/res/values-sl/strings.xml b/app/ui/legacy/src/main/res/values-sl/strings.xml
index cf202e27ee..c5062651bd 100644
--- a/app/ui/legacy/src/main/res/values-sl/strings.xml
+++ b/app/ui/legacy/src/main/res/values-sl/strings.xml
@@ -12,8 +12,8 @@
Dovoljenje Apache, različica 2.0Odprtokodni projektSpletna stran
- Navodila za uporabo
- Poišči pomoč
+ Uporabniški priročnik
+ Pridobi pomočUporabniški forumFediverseTwitter
@@ -24,7 +24,7 @@
Različica %sKaj je novega?Pokaže zadnje spremembe po posodobitvi programa
- Preglejte, kaj je novega v tej izdaji
+ Kaj je novega v tej izdajiDobrodošli v K-9 MailKopiraj v …Izbrano: %dNaslednje
- PredhodnoV reduPrekliči
@@ -150,14 +149,12 @@ dodatnih %d sporočil
%.1f MB%.1f kB%d B
- Nova pošta%d novo sporočilo%d novi sporočili%d nova sporočila%d novih sporočil
- Neprebrano: %1$d (%2$s)in %1$d na %2$sOdgovoriOznači kot prebrano
@@ -199,7 +196,7 @@ dodatnih %d sporočil
Beleženje občutljivih podrobnostiV dnevnikih so lahko objavljena tudi gesla.Izvozi dnevnike
- Izvoz uspešen. Dnevniki lahko vsebujejo občutljive informacije. Bodi previden, komu jih pošlješ.
+ Izvoz je uspešno zaključen. Dnevniški zapis lahko vsebuje občutljive podrobnosti. Priporočena je previdnost pri pošiljanju tretjim osebam. Izvoz je spodletel.Naloži več sporočilZa:%s
@@ -228,11 +225,14 @@ dodatnih %d sporočil
Kp:Skp:Priloge ni mogoče shraniti.
+
+
+
+
Ni mogoče najti pregledovalnika za vrsto %s.Prejmi celotno sporočiloprek %1$sPoišči več sporočil tega pošiljatelja
- Od %sSporočilo je zavrženo.Sporočilo je shranjeno kot osnutekPokaži zvezdice sporočil
@@ -264,21 +264,27 @@ dodatnih %d sporočil
Označi vsa sporočila kot prebranaBrisanje neposredno iz obvestilne vrstice
+ Dejanja potega
+ Desni poteg
+ Levi poteg
- Brez usklajevanja
+ Brez potega
+ Preklopi izbor
+ Označi kot prebrano/neprebrano
+ Dodaj/Odstrani zvezdico
- Arhivirano
+ Arhiviranje
- Brisanje vseh vrst sporočil
+ BrisanjeNeželena pošta
- Premakni
+ PremikSkrij programOdstrani podatke programa K-9 iz glave pošteSkrij časovni pas
@@ -302,15 +308,15 @@ dodatnih %d sporočil
Nastavitev novega računaNaslov elektronske pošteGeslo
- Če želiš uporabljati ta e-poštni račun s K-9 Mail, se moraš prijaviti in aplikaciji odobriti dostop do svojih e-poštnih sporočil.
+ Za uporabo poštnega računa s v programu K-9 Mail, je zahtevana prijava v programu in odobritev dostopa do sporočil.Prijava
- Prijavi se z Google
+ Prijava z računom Google
- Če si želiš ogledati svoje geslo tukaj, omogoči zaklepanje zaslona na tej napravi.
- Preverjanje identitete
- Odkleni, za ogled svojega gesla
+ Za prikaz gesla je treba omogočiti zaklepanje zaslona na tej napravi.
+ Preverjanje istovetnosti
+ Odkleni, za prikaz geslaRočna nastavitevPridobivanje podrobnosti računa \u2026
@@ -414,10 +420,10 @@ dodatnih %d sporočil
Napačno uporabniško ime ali geslo\n(%s)Strežnik je objavil neveljavno potrdilo SSL. To je lahko posledica napačne nastavitve strežnika ali pa poskusa napada na poštni strežnik. Če niste prepričani v nastavitve, zavrnite sprejem potrdila in stopite v stik s skrbnikom strežnika.\n\nNapaka:\n(%s)S strežnikom ni mogoče vzpostaviti povezave.\n(%s)
- Avtorizacija preklicana
- Avtorizacija ni uspela zaradi te napake: %s
- OAuth 2.0 trenutno ni podprt s tem ponudnikom.
- Aplikacija ni mogla najti brskalnika za odobritev dostopa do tvojega računa.
+ Overitev je preklicana
+ Overitev je spodletela z napako: %s
+ S tem ponudnikom šifriranje OAuth 2.0 podprto.
+ Brskalnik nima dostopa do brskalnika za odobritev prijavnih podatkov računa.Uredi podrobnostiNadaljujNapredne možnosti
@@ -437,15 +443,15 @@ dodatnih %d sporočil
Pokaže obvestilo tudi za poslana sporočilaPokaži obvestila le za sporočila znanih stikovPokažejo se le obvestila za prispela sporočila od stikov, ki so v krajevnem imeniku
- Ignoriraj sporočila klepeta
- Ne prikazuj obvestil za sporočila, ki spadajo v e-poštni klepet
+ Prezri sporočila klepeta
+ Ne prikazuj obvestil za sporočila, ki so poslana kot klepetOb odpiranju označi kot prebranoKo se sporočilo prvič odpre, naj bo označeno kot prebranoOb izbrisu označi kot prebranoOb izbrisu označi sporočilo tudi kot prebranoKategorije obvestil
- Konfiguriranje obvestil za nova sporočila
- Konfiguriranje obvestil o napakah in stanju
+ Nastavitev obvestil za nova sporočila
+ Nastavitev obvestil o napakah in o stanju računaPrikaz slikNe pokaži slikPokaži slike znanih stikov
@@ -584,7 +590,7 @@ dodatnih %d sporočil
Število ponovitev tresenjaOnemogočenoZvonjenje ob prejemu novega sporočila
- Barva luči obvestil
+ Svetlobno obveščanjeOnemogočenoBarvna shema računasistemsko privzeta barva
@@ -699,6 +705,7 @@ dodatnih %d sporočil
1000 mapPokaži animirane učinke vmesnikaPrehodi dejanj in različni učinki delovanja vmesnika so animirani
+ Krmarjenje s tipko za glasnost v pogledu sporočilaPokaži skupno mapo prejetih sporočilPokaži število označb z zvezdicoSkupna mapa prejetih sporočil
@@ -786,9 +793,9 @@ dodatnih %d sporočil
Prosim, vnesite geslo
- Prosim, prijavi se
+ Pred nadaljevanjem se je treba prijaviti
- Prosim, prijavi se in vnesi gesla
+ Za prijavo je treba vpisati geslaNapaka pri uvozu nastavitevNapaka pri branju datoteke nastavitevNapaka pri uvozu nekaterih nastavitev
@@ -1028,7 +1035,7 @@ dodatnih %d sporočil
Pošlji nastavitveno sporočilo šifriranja AutoCryptVarna izmenjava nastavitev šifriranja med različnimi napravamiNastavitveno sporočilo šifriranja AutoCrypt
- Nastavitveno sporočilo šifriranja AutoCrypt varno deli vašo celovito nastavitev z drugimi napravami.
+ Nastavitveno šifrirano sporočilo AutoCrypt omogoča varno izmenjavo celovite nastavitve naprave z drugimi napravami.Pošlji nastavitveno sporočiloSporočilo bo poslano na naslov:Poteka ustvarjanje nastavitvenega sporočila …
@@ -1049,23 +1056,24 @@ Sporočilo lahko shranite in ga uporabite kot varno kopijo šifrirnega ključa.
Dovoli dostop do stikovČe hočete dobiti predloge za stike in prikazati imena in fotografije stikov, aplikacija potrebuje dostop do vaših stikov.Med nalaganjem podatkov je prišlo do napake
- Inicializacija …
+ Začenjanje …Čakam na nova e-poštna sporočilaSpanje, dokler ni dovoljena sinhronizacija v ozadju Spanje, dokler ni na voljo omrežjaDotakni se, če želiš izvedeti več.
- Informacije o potisku
+ Podrobnosti potisnih storitevKo uporabljate potisk, K-9 Mail vzdržuje povezavo s poštnim strežnikom. Android zahteva prikaz obvestila, ko je aplikacija aktivna v ozadju. %sVendar pa vam Android tudi omogoča, da obvestilo skrijete.Več o tem
- Nastavitev obvestila
+ Nastavitev obveščanjaČe ne potrebuješ takojšnjih obvestil o novih sporočilih, moraš onemogočiti potiskanje in uporabiti navadno izpraševanje. Izpraševanje išče novo pošto v rednih časovnih presledkih in ne potrebuje obvestila.
- Onemogoči potiskanje
+ Onemogoči potisne storitveIzberiOdstrani izbor
+ Označi kot prebranoOznači kot neprebrano
@@ -1073,10 +1081,35 @@ Sporočilo lahko shranite in ga uporabite kot varno kopijo šifrirnega ključa.
Odstrani zvezdico
- Arhivirano
+ Arhiviraj
- Brisanje vseh vrst sporočil
+ Izbriši
- Neželena pošta
+ Neželeno sporočilo
+ Premakni …
+
+
+
+
+
+
+ Od
+
+ po pošiljatelju
+
+ Odgovori na
+
+ Za
+
+ Kp
+
+ Skp
+
+
+
+
+
+ Naslov elektronske pošte
+
diff --git a/app/ui/legacy/src/main/res/values-sq/strings.xml b/app/ui/legacy/src/main/res/values-sq/strings.xml
index 88343b926c..377c3c7364 100644
--- a/app/ui/legacy/src/main/res/values-sq/strings.xml
+++ b/app/ui/legacy/src/main/res/values-sq/strings.xml
@@ -77,7 +77,6 @@ Ju lutemi, parashtrim njoftimesh për të meta, kontribute për veçori të reaj
Kopjojeni te…%d të përzgjedhurPasuesi
- I mëparshmiOKAnuloje
@@ -149,12 +148,10 @@ Ju lutemi, parashtrim njoftimesh për të meta, kontribute për veçori të reaj
%.1f MB%.1f kB%d B
- Postë e re%d mesazh i ri%d mesazhe të rinj
- %1$d Të palexuar te (%2$s)+ %1$d më tepër te %2$sPërgjigjuniShënoje Si të Lexuar
@@ -225,11 +222,18 @@ Ju lutemi, parashtrim njoftimesh për të meta, kontribute për veçori të reaj
Cc:Bcc:S\’arrihet të ruhet bashkëngjitje
+
+ për
+
+ +
+
+ mua
+
+ Shfaq figura të largëtaS\’arrihet të gjendet parës për %s.Shkarko mesazhin e plotëpërmes %1$sMë tepër nga ky dërgues
- Nga %sMesazhi u hodh tejMesazhi u ruajt si skicëShfaqi yjet
@@ -702,6 +706,7 @@ Ju lutemi, parashtrim njoftimesh për të meta, kontribute për veçori të reaj
1000 dosjeAnimacionPërdor efekteve pamore Gaudy
+ Lëvizje me tastin e volumit, te pamje mesazhiShfaq Kuti Poste të NjësuarShfaq llogari me yllKuti Poste e Njësuar
@@ -723,6 +728,7 @@ Ju lutemi, parashtrim njoftimesh për të meta, kontribute për veçori të reaj
ParaparjeMesazheDërgues
+ MarrësSubjektKohë dhe datëTrup i mesazhit
@@ -1074,4 +1080,37 @@ Mund ta mbani këtë mesazh dhe ta përdorni si një kopjeruatje të kyçit tuaj
Shënoje si të padëshiruarLëvizeni…
+
+
+ Gabim
+
+ S’u gjet dosja
+
+ Hollësi mesazhi
+
+ I mungon kryeja \'Date\'
+
+ Nga
+
+ Dërgues
+
+ Përgjigjuni
+
+ Për
+
+ Cc
+
+ Bcc
+
+ Ndodhi një gabim gjatë ngarkimit të hollësive të mesazhit.
+
+ Shtoje te kontaktet
+
+ Kopjo adresë email
+
+ Kopjo emër dhe adresë email
+
+ Adresë email
+
+ Emër dhe adresë email
diff --git a/app/ui/legacy/src/main/res/values-sr/strings.xml b/app/ui/legacy/src/main/res/values-sr/strings.xml
index a3dfec1c62..d86cb73ca8 100644
--- a/app/ui/legacy/src/main/res/values-sr/strings.xml
+++ b/app/ui/legacy/src/main/res/values-sr/strings.xml
@@ -69,7 +69,6 @@
Избор фасцикле%d изабраноСледеће
- ПретходноУ редуОдустани
@@ -138,13 +137,11 @@
%.1f MB%.1f кB%d B
- Нова пошта%d нова порука%d нове поруке%d нових порука
- %1$d непрочитаних (%2$s)+ %1$d још на %2$sОдговориОзначи прочитаним
@@ -207,11 +204,14 @@
Коп:СКоп:Не могу да сачувам прилог.
+
+
+
+
Не могу да нађем прегледач за %s.Преузми читаву порукупроследи %1$sЈош од овог пошиљаоца
- Од %sПорука одбаченаПорука сачувана у нацртеПрикажи звездице
@@ -996,4 +996,27 @@
померања у нежељене
+
+
+
+
+
+
+ Од
+
+ пошиљаоцу
+
+
+ За
+
+ Коп
+
+ СКоп
+
+
+
+
+
+ Адреса е-поште
+
diff --git a/app/ui/legacy/src/main/res/values-sv/strings.xml b/app/ui/legacy/src/main/res/values-sv/strings.xml
index 9ce5bddbc7..8bcec66cff 100644
--- a/app/ui/legacy/src/main/res/values-sv/strings.xml
+++ b/app/ui/legacy/src/main/res/values-sv/strings.xml
@@ -76,7 +76,6 @@ Skicka in felrapporter, bidra med nya funktioner och ställ frågor på
Kopiera till…%d valdaNästa
- FöregåendeOKAvbryt
@@ -148,12 +147,10 @@ Skicka in felrapporter, bidra med nya funktioner och ställ frågor på
%.1f MB%.1f kB%d B
- Ny e-post%d nytt meddelande%d nya meddelanden
- %1$d olästa (%2$s)+ %1$d fler på %2$sSvaraMarkera som läst
@@ -224,11 +221,18 @@ Skicka in felrapporter, bidra med nya funktioner och ställ frågor på
Kopia:Blindkopia:Det går inte att spara bilaga.
+
+ till
+
+ +
+
+ mig
+
+ Visa fjärrbilderKan inte hitta visare för %s.Hämta hela meddelandetvia %1$sMer från denna avsändare
- Från %sMeddelandet kasseradesMeddelandet sparat som utkastVisa stjärnor
@@ -723,6 +727,7 @@ Skicka in felrapporter, bidra med nya funktioner och ställ frågor på
FörhandsgranskningMeddelandenAvsändare
+ MottagareÄmneTid och datumInnehåll
@@ -1008,7 +1013,7 @@ Skicka in felrapporter, bidra med nya funktioner och ställ frågor på
Autocrypt ömsesidigt lägeMeddelanden kommer normalt att krypteras efter eget val, eller när man svarar på ett krypterat meddelande.Om både avsändare och mottagare aktiverar ömsesidigt läge aktiveras kryptering som standard.
- Du kan trycka här för att lära dig mer.
+ Du kan trycka här för att läsa mer.Allmänna inställningarIngen OpenPGP-app installeradInstallera
@@ -1046,7 +1051,7 @@ Du kan behålla detta meddelande och använda det som en säkerhetskopia för di
Väntar på nya e-postmeddelandenSover tills bakgrundssynkronisering är tillåtenSover tills nätverket är tillgängligt
- Tryck för att lära dig mer.
+ Tryck för att läsa mer.Push-infoVid användning av Push upprätthåller K-9 Mail en anslutning till e-postservern. Android kräver att ett pågående meddelande visas medan appen är aktiv i bakgrunden. %sMen Android låter dig också dölja aviseringen.
@@ -1074,4 +1079,38 @@ Du kan behålla detta meddelande och använda det som en säkerhetskopia för di
SkräppostFlytta…
+
+ Visa flytande skrivknapp
+
+ Fel
+
+ Mappen hittades inte
+
+ Meddelande detaljer
+
+ Rubriken \"Date\" saknas
+
+ Från
+
+ Avsändare
+
+ Svara till
+
+ Till
+
+ Kopia
+
+ Blindkopia
+
+ Ett fel uppstod när meddelande detaljerna lästes in.
+
+ Lägg till i kontakter
+
+ Kopiera e-postadress
+
+ Kopiera namn och e-postadress
+
+ E-postadress
+
+ Namn och e-postadress
diff --git a/app/ui/legacy/src/main/res/values-tr/strings.xml b/app/ui/legacy/src/main/res/values-tr/strings.xml
index 305203425a..09450a532b 100644
--- a/app/ui/legacy/src/main/res/values-tr/strings.xml
+++ b/app/ui/legacy/src/main/res/values-tr/strings.xml
@@ -12,6 +12,8 @@
Apache Lisansı, Versiyon 2.0Açık Kaynak ProjesiWeb sitesi
+ Kullanım kılavuzu
+ Yardım alKullanıcı forumuFediverseTwitter
@@ -38,7 +40,7 @@ Geliştirilmiş özellikler içerir:
E-posta imzaları
Bcc-to-self
Klasör kayıtları
-
Tüm klasörü eşzamanlama
+
Tüm klasörler eşzamanlanır
Yanıt adresi yapılandırması
Klavye kısayolları
Daha iyi IMAP desteği
@@ -70,16 +72,17 @@ Microsoft Exchange ile konuşurken kimi tuhaflıklar yaşadığını lütfen akl
Ek olarak iletHesap SeçinKlasör Seç
+ Şuraya taşı...
+ Şuraya kopyala...%d seçildiSonraki
- ÖncekiTamamİptalGönderKonu yok, bu şekilde göndermek için tıklayınYanıtla
- Tümünü Yanıtla
+ Tümünü yanıtlaSilArşivGereksiz posta
@@ -91,27 +94,27 @@ Microsoft Exchange ile konuşurken kimi tuhaflıklar yaşadığını lütfen akl
Gönder…Yeniden işlem…Tamam
- Çıkart
+ YoksayTaslak olarak Kaydet
- Postayı Kontrol et
- İletileri Gönder
+ Postayı kontrol et
+ İletileri gönderKlasörleri yineleKlasör bul
- Hesap Ekle
+ Hesap ekleOluşturAramaHer yerde araArama Sonuçları
- Yenı mesajlar
+ Yeni iletilerAyarlarKlasörleri yönetHesap Ayarları
- Hesabı Kaldır
+ Hesabı kaldırOkundu olarak işaretlePaylaş
- Gönderici Seç
- Yıldız Ekle
- Yıldızı Kaldır
+ Gönderici seç
+ Yıldız ekle
+ Yıldızı kaldırKopyalaAbonelikten ÇıkBaşlıkları göster
@@ -143,12 +146,10 @@ Microsoft Exchange ile konuşurken kimi tuhaflıklar yaşadığını lütfen akl
%.1fMB%.1f kB%d B
- Yeni posta%d yeni mesaj%d yeni ileti
- %1$d Okunmadı (%2$s)%1$d daha fazla %2$sYanıtlaOkundu olarak işaretle
@@ -164,6 +165,7 @@ Microsoft Exchange ile konuşurken kimi tuhaflıklar yaşadığını lütfen akl
Kimlik Doğrulama Hatası%s için oturum açılamadı. Sunucu ayarlarınızı güncelleyin.
+ Bildirim hatasıPosta kontrol ediliyor: %1$s:%2$sPosta kontrol ediliyor
@@ -217,13 +219,16 @@ Microsoft Exchange ile konuşurken kimi tuhaflıklar yaşadığını lütfen akl
Bilgi:Gizli Kopya:Eklenti kaydedilemedi
+
+
+
+
%s için görüntüleyici bulunamadı.
- Mesajın tamamını indir
+ İletinin tamamını indir%1$skanalıylaBu göndericiden daha fazla ileti
- Kimden %s
- Mesaj silindi
- Mesaj taslak olarak kaydedildi
+ İleti silindi
+ İleti taslak olarak kaydedildiYıldızları GösterYıldız bayraklı mesajları gösterirÖnizleme hatları
@@ -248,17 +253,23 @@ Microsoft Exchange ile konuşurken kimi tuhaflıklar yaşadığını lütfen akl
SilYıldızlıları Sil (sadece mesaj görünümü)Gereksiz posta
- Mesajı yoksay
+ İletiyi yoksayTüm iletileri okundu olarak işaretleSil (bildirimden)
+ Kaydırma eylemleri
+ Sağa kaydır
+ Sola kaydırHiçbiri
+ Seçimi değiştir
+ Okundu/okunmadı say
+ Yıldızı ekle/kaldırArşiv
@@ -271,15 +282,15 @@ Microsoft Exchange ile konuşurken kimi tuhaflıklar yaşadığını lütfen akl
Posta başlığından K-9 Kullanıcı Aracısını kaldırZaman dilimini gizlePosta ve yanıt başlıklarında yerel zaman dilimi yerine UTC kullan
- \'Sil\' butonunu göster
+ \'Sil\' düğmesini gösterHiçbir zamanTek bir mesaj bildirimi içinHer zamanKilit Ekranı BildirimleriKilit ekranı bildirimi yokUygulama adı
- Yeni mesaj sayısı
- Mesaj sayısı ve gönderenler
+ Yeni ileti sayısı
+ İleti sayısı ve gönderenlerEkran kilidi açıkken olduğu gibiSessiz ZamanZil sesi, titreşim ve flaşı devre dışı bırak
@@ -433,13 +444,13 @@ Microsoft Exchange ile konuşurken kimi tuhaflıklar yaşadığını lütfen akl
KişilerdenHerkestenPosta gönderiliyor
- Cevaplarken orjinal mesajı sakla
- Mesajları cevaplarken, orjinal mesaj cevabınızın içinde.
- Alıntı metinden sonra cevapla
- Mesajları cevaplarken, orjinal mesaj cevabınızın üzerinde gözükecek.
+ Yanıtlarken orijinal mesajı sakla
+ Mesajları yanıtlarken, orijinal mesaj yanıtınızın içinde.
+ Alıntı metinden sonra yanıtla
+ Mesajları yanıtlarken, özgün ileti yanıtınızın üzerinde gözükecek.Alıntılı yanıtta imzayı kaldırMesajlar yanıtlanırken, alıntı yapılan yazıdaki imzayı kaldır
- Mesaj Biçimi
+ İleti BiçimiDüz Metin (resimler ve biçimler kaldırılacak)HTML (resimler ve biçimler korunacak)Otomatik (HTML mesajına yanıt verilmiyorsa düz metin)
@@ -564,8 +575,10 @@ Microsoft Exchange ile konuşurken kimi tuhaflıklar yaşadığını lütfen akl
Titreşimi tekrarlaDevre dışıYeni posta zil sesi
+ Bildirim ışığıDevre dışıHesap rengi
+ Varsayılan sistem rengiBeyazKırmızıYeşil
@@ -595,7 +608,7 @@ Microsoft Exchange ile konuşurken kimi tuhaflıklar yaşadığını lütfen akl
(İsteğe bağlı)E-posta adresi(Gerekli)
- Cevap adresi
+ Yanıt adresi(İsteğe bağlı)İmza(İsteğe bağlı)
@@ -717,7 +730,7 @@ Microsoft Exchange ile konuşurken kimi tuhaflıklar yaşadığını lütfen akl
Bu mesajı kaydet veya sil?Değişikliklerden vazgeç veya kaydet?İleti silinsin mi?
- Bu mesajı silmek istediğinizden emin misiniz?
+ Bu iletiyi silmek istediğinizden emin misiniz?Yerel iletiler temizlensin mi?Bu işlem tüm yerel iletileri klasörden kaldıracak. İletiler sunucudan silinmeyecek.İletileri temizle
@@ -753,7 +766,7 @@ Microsoft Exchange ile konuşurken kimi tuhaflıklar yaşadığını lütfen akl
Dışa aktarma ayarları…Ayarlar başarıyla dışa aktarıldıHesaplar çıkarılırken hata oluştu
- İçe Aktarma ayarları
+ İçe aktarım ayarlarıDosya seçİçe AktarAyarlar başarıyla içe aktarıldı
@@ -851,7 +864,7 @@ Microsoft Exchange ile konuşurken kimi tuhaflıklar yaşadığını lütfen akl
Sol taraftan bir mesaj seçinKişi resimlerini gösterMesaj listesinde kişi resimlerini gösterir
- Tümünü okundu olarak işaretle
+ Tümünü okundu sayKişi resimlerini renklendirEksik kişi resimlerini renklendirMesaj eylemlerini görünür yap
@@ -905,7 +918,7 @@ Microsoft Exchange ile konuşurken kimi tuhaflıklar yaşadığını lütfen akl
Koruma etkinleştirildiPGP Sadece İmza KipiBu modda, PGP anahtarınız, şifrelenmemiş bir e-postanın şifreleme imzasını oluşturmak için kullanılacaktır.
- Bu, epostayı şifreli yapmaz, fakat sizin anahtarınızdan gönderildiğini doğrular.
+ Bu, e-postayı şifreli yapmaz, fakat sizin anahtarınızdan gönderildiğini doğrular.İmzalar posta listelerine gönderildiğinde kırılabilir.İmzalar bazı istemcilerde \'signature.asc\' ekleri olarak görüntülenebilir.Şifrelenmiş iletiler her zaman bir imza içerir.
@@ -959,8 +972,8 @@ Microsoft Exchange ile konuşurken kimi tuhaflıklar yaşadığını lütfen akl
Tüm imzalar görüntülenecekSadece imza kipinde şifreleme kullanılamaz!İmzasız Metin
- Bu eposta şifreli
- Bu eposta OpenPGP ile şifrelendi. On okumak için uyumlu bir OpenPGP uygulaması kurup yapılandırmanız gerekir.
+ Bu e-posta şifreli
+ Bu e-posta OpenPGP ile şifrelendi. On okumak için uyumlu bir OpenPGP uygulaması kurup yapılandırmanız gerekir.Ayarlara GitK-9 İleti Listesi
@@ -1029,8 +1042,9 @@ Bu iletiyi saklayabilir ve gizli anahtarınız için bir yedekleme olarak kullan
Seçimi Kaldır
+ Okundu say
- Okunmadı Olarak İşaretle
+ Okunmadı sayYıldız Ekle
@@ -1042,4 +1056,31 @@ Bu iletiyi saklayabilir ve gizli anahtarınız için bir yedekleme olarak kullan
Gereksiz posta
+ Taşı...
+
+
+ Hata
+
+ Klasör bulunamadı
+
+
+
+ Kimden
+
+ Gönderen
+
+ Yanıtla
+
+ Kime
+
+ Kopya
+
+ Gizli Kopya
+
+
+
+
+
+ E-posta adresi
+
diff --git a/app/ui/legacy/src/main/res/values-uk/strings.xml b/app/ui/legacy/src/main/res/values-uk/strings.xml
index 091f893c88..ccfde6cf1c 100644
--- a/app/ui/legacy/src/main/res/values-uk/strings.xml
+++ b/app/ui/legacy/src/main/res/values-uk/strings.xml
@@ -77,7 +77,6 @@ K-9 Mail — це вільний клієнт електронної пошти
Копіювати до…%d вибраноНаступний
- ПопереднійГараздСкасувати
@@ -151,14 +150,12 @@ K-9 Mail — це вільний клієнт електронної пошти
%.1f МБ%.1f кБ%d Б
- Нова пошта%d нове повідомлення%d нових повідомлень%d нових повідомлень%d нових повідомлень
- %1$d непрочитане(-их) (%2$s)ще %1$d у %2$sВідповістиПозначити прочитаним
@@ -229,11 +226,14 @@ K-9 Mail — це вільний клієнт електронної пошти
Копія:Прихована копія:Не вдалося зберегти вкладення.
+
+
+
+
Не знайдено додаток для перегляду %s.Завантажити усе повідомленняза допомогою %1$sБільше від цього відправника
- Від %sПовідомлення скасованоПовідомлення збережено як чернеткуПоказувати зірочки
@@ -265,13 +265,19 @@ K-9 Mail — це вільний клієнт електронної пошти
Позначити всі повідомлення як прочитаніВидалити (зі сповіщення)
+ Змахи
+ Змах вправо
+ Змах влівоЖодна
+ Перемкнути вибір
+ Позначити прочитаним/непрочитаним
+ Додати/вилучити зіркуАрхівувати
@@ -700,6 +706,7 @@ K-9 Mail — це вільний клієнт електронної пошти
1000 текАнімаціяВикористовувати яскраві візуальні ефекти
+ Навігація у повідомленні кнопками гучностіПоказувати Об\'єднані ВхідніПоказати лічильник зірочокОб\'єднані Вхідні
@@ -1067,6 +1074,7 @@ K-9 Mail — це вільний клієнт електронної пошти
Скасувати вибір
+ Позначити прочитанимПозначити непрочитаним
@@ -1080,4 +1088,29 @@ K-9 Mail — це вільний клієнт електронної пошти
Спам
+ Перемістити...
+
+
+
+
+
+
+ Від
+
+ відправником
+
+ Відповісти до
+
+ До
+
+ Копія
+
+ Прихована копія
+
+
+
+
+
+ Електронна адреса
+
diff --git a/app/ui/legacy/src/main/res/values-zh-rCN/strings.xml b/app/ui/legacy/src/main/res/values-zh-rCN/strings.xml
index e448914e76..946ecd6e59 100644
--- a/app/ui/legacy/src/main/res/values-zh-rCN/strings.xml
+++ b/app/ui/legacy/src/main/res/values-zh-rCN/strings.xml
@@ -77,7 +77,6 @@ K-9 Mail 是 Android 上一款功能强大的免费邮件客户端。
复制到…已选择 %d 个前进
- 后退确定取消
@@ -147,11 +146,9 @@ K-9 Mail 是 Android 上一款功能强大的免费邮件客户端。
%.1fMB%.1fKB%dB
- 您有新邮件%d 条新消息
- 您有%1$d封未读邮件(%2$s)加载 %2$s 上的更多 %1$d 条消息回复标记为已读
@@ -222,11 +219,18 @@ K-9 Mail 是 Android 上一款功能强大的免费邮件客户端。
抄送:密送:无法保存附件。
+
+ 到
+
+ +
+
+ 我
+
+ 显示远程图片无法打开%s。找不到可以阅读该文件的程序。下载完整邮件通过 %1$s来自这个发件人的更多邮件
- 发送自 %s邮件已丢弃邮件已保存为草稿显示星标
@@ -721,6 +725,7 @@ K-9 Mail 是 Android 上一款功能强大的免费邮件客户端。
预览邮件发件人
+ 收件人主题日期邮件内容
@@ -1067,4 +1072,38 @@ K-9 Mail 是 Android 上一款功能强大的免费邮件客户端。
标记为垃圾邮件移动…
+
+ 显示悬浮“写邮件”按钮
+
+ 错误
+
+ 未找到文件夹
+
+ 邮件详情
+
+ 缺少\"Date\"标头
+
+ 发件人
+
+ 发件人
+
+ 回复给
+
+ 收件人
+
+ 抄送
+
+ 秘送
+
+ 加载邮件详情时出错。
+
+ 添加到联系人
+
+ 复制电子邮箱地址
+
+ 复制姓名和电子邮箱地址
+
+ 邮件地址
+
+ 姓名和电子邮箱地址
diff --git a/app/ui/legacy/src/main/res/values-zh-rTW/strings.xml b/app/ui/legacy/src/main/res/values-zh-rTW/strings.xml
index 4ecf8cf46f..428d802bf0 100644
--- a/app/ui/legacy/src/main/res/values-zh-rTW/strings.xml
+++ b/app/ui/legacy/src/main/res/values-zh-rTW/strings.xml
@@ -77,7 +77,6 @@ K-9 Mail 是 Android 上一款功能強大,免費的電子郵件用戶端。
複製至…%d 已選擇下一步
- 上一步確定取消
@@ -147,11 +146,9 @@ K-9 Mail 是 Android 上一款功能強大,免費的電子郵件用戶端。
%.1fMB%.1fkB%dB
- 您有新郵件%d 條新訊息
- 您有%1$d封未讀郵件(%2$s)+ 來自%2$s已超過%1$d則訊息回覆標示為已讀取
@@ -222,11 +219,14 @@ K-9 Mail 是 Android 上一款功能強大,免費的電子郵件用戶端。
副本:密件副本:無法存檔附件。
+
+
+
+
無法開啟%s。找不到可以開啟該附件的程式。下載完整郵件透過 %1$s來自這個寄件人的更多郵件
- 寄送自 %s郵件已捨棄郵件已儲存為草稿顯示星號
@@ -1067,4 +1067,28 @@ K-9 Mail 是 Android 上一款功能強大,免費的電子郵件用戶端。
標記為垃圾郵件移動…
+
+
+
+
+
+
+ 寄件人:
+
+ 寄件人
+
+ 回覆給
+
+ 收件人
+
+ 副本
+
+ 密件副本
+
+
+
+
+
+ 電子郵件地址
+
--
GitLab
From d43c8a1dc30b01c9bf1e24d5f831d68015e67539 Mon Sep 17 00:00:00 2001
From: cketti
Date: Fri, 10 Feb 2023 11:31:15 +0100
Subject: [PATCH 032/317] Version 6.507
---
app/k9mail/build.gradle | 4 ++--
app/ui/legacy/src/main/res/raw/changelog_master.xml | 7 +++++++
fastlane/metadata/android/en-US/changelogs/35007.txt | 5 +++++
3 files changed, 14 insertions(+), 2 deletions(-)
create mode 100644 fastlane/metadata/android/en-US/changelogs/35007.txt
diff --git a/app/k9mail/build.gradle b/app/k9mail/build.gradle
index 37c4d2c4bc..52b84cd9bb 100644
--- a/app/k9mail/build.gradle
+++ b/app/k9mail/build.gradle
@@ -53,8 +53,8 @@ android {
applicationId "com.fsck.k9"
testApplicationId "com.fsck.k9.tests"
- versionCode 35006
- versionName '6.507-SNAPSHOT'
+ versionCode 35007
+ versionName '6.507'
// Keep in sync with the resource string array 'supported_languages'
resConfigs "in", "br", "ca", "cs", "cy", "da", "de", "et", "en", "en_GB", "es", "eo", "eu", "fr", "gd", "gl",
diff --git a/app/ui/legacy/src/main/res/raw/changelog_master.xml b/app/ui/legacy/src/main/res/raw/changelog_master.xml
index d98bc74344..d3902cd7ae 100644
--- a/app/ui/legacy/src/main/res/raw/changelog_master.xml
+++ b/app/ui/legacy/src/main/res/raw/changelog_master.xml
@@ -5,6 +5,13 @@
Locale-specific versions are kept in res/raw-/changelog.xml.
-->
+
+ Respect "show contact names" setting in message details screen
+ Display folder name in message details screen
+ Small adjustment to the appearance of the "Download complete message" button
+ Internal changes
+ Updated translations
+ Fixed a crash when displaying a message without any recipientsFetch BCC header when partially downloading a message
diff --git a/fastlane/metadata/android/en-US/changelogs/35007.txt b/fastlane/metadata/android/en-US/changelogs/35007.txt
new file mode 100644
index 0000000000..592bf60cc3
--- /dev/null
+++ b/fastlane/metadata/android/en-US/changelogs/35007.txt
@@ -0,0 +1,5 @@
+- Respect "show contact names" setting in message details screen
+- Display folder name in message details screen
+- Small adjustment to the appearance of the "Download complete message" button
+- Internal changes
+- Updated translations
--
GitLab
From d2e8dbb3ca635aa6b2563f0f222646ca76acba8b Mon Sep 17 00:00:00 2001
From: cketti
Date: Fri, 10 Feb 2023 11:50:54 +0100
Subject: [PATCH 033/317] Prepare for version 6.508
---
app/k9mail/build.gradle | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/k9mail/build.gradle b/app/k9mail/build.gradle
index 52b84cd9bb..e45c78f45d 100644
--- a/app/k9mail/build.gradle
+++ b/app/k9mail/build.gradle
@@ -54,7 +54,7 @@ android {
testApplicationId "com.fsck.k9.tests"
versionCode 35007
- versionName '6.507'
+ versionName '6.508-SNAPSHOT'
// Keep in sync with the resource string array 'supported_languages'
resConfigs "in", "br", "ca", "cs", "cy", "da", "de", "et", "en", "en_GB", "es", "eo", "eu", "fr", "gd", "gl",
--
GitLab
From aa83bf1e9b2bff69c73cb7f0132f9a55a3835884 Mon Sep 17 00:00:00 2001
From: cketti
Date: Fri, 10 Feb 2023 13:49:52 +0100
Subject: [PATCH 034/317] Add a thread consisting of two messages to the demo
account
---
backend/demo/src/main/resources/contents.json | 2 +-
backend/demo/src/main/resources/inbox/thread_1.eml | 9 +++++++++
backend/demo/src/main/resources/inbox/thread_2.eml | 11 +++++++++++
3 files changed, 21 insertions(+), 1 deletion(-)
create mode 100644 backend/demo/src/main/resources/inbox/thread_1.eml
create mode 100644 backend/demo/src/main/resources/inbox/thread_2.eml
diff --git a/backend/demo/src/main/resources/contents.json b/backend/demo/src/main/resources/contents.json
index 03a7c033a1..5443d1871f 100644
--- a/backend/demo/src/main/resources/contents.json
+++ b/backend/demo/src/main/resources/contents.json
@@ -2,7 +2,7 @@
"inbox": {
"name": "Inbox",
"type": "INBOX",
- "messageServerIds": ["intro", "many_recipients"]
+ "messageServerIds": ["intro", "many_recipients", "thread_1", "thread_2"]
},
"trash": {
"name": "Trash",
diff --git a/backend/demo/src/main/resources/inbox/thread_1.eml b/backend/demo/src/main/resources/inbox/thread_1.eml
new file mode 100644
index 0000000000..a597808451
--- /dev/null
+++ b/backend/demo/src/main/resources/inbox/thread_1.eml
@@ -0,0 +1,9 @@
+MIME-Version: 1.0
+From: Alice
+Date: Fri, 10 Feb 2023 10:00:00 +0100
+Message-ID:
+Subject: Thread
+To: Bob
+Content-Type: text/plain; charset=UTF-8
+
+This is the first message in this thread.
diff --git a/backend/demo/src/main/resources/inbox/thread_2.eml b/backend/demo/src/main/resources/inbox/thread_2.eml
new file mode 100644
index 0000000000..5b455009b8
--- /dev/null
+++ b/backend/demo/src/main/resources/inbox/thread_2.eml
@@ -0,0 +1,11 @@
+MIME-Version: 1.0
+From: Bob
+Date: Fri, 10 Feb 2023 10:05:00 +0100
+Message-ID:
+Subject: Re: Thread
+To: Alice
+In-Reply-To:
+References:
+Content-Type: text/plain; charset=UTF-8
+
+This is the second message in this thread.
--
GitLab
From f46b75437355e10504661148032dbc50ac8e61e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Wolf=20Montwe=CC=81?=
Date: Fri, 10 Feb 2023 14:37:15 +0100
Subject: [PATCH 035/317] Add `ContactIntentHelper` and remove functionality
from `Contacts`
---
.../fsck/k9/contact/ContactIntentHelper.kt | 47 +++++++++++++++++
.../java/com/fsck/k9/helper/Contacts.java | 52 -------------------
.../com/fsck/k9/activity/MessageCompose.java | 3 +-
.../k9/activity/compose/RecipientPresenter.kt | 5 +-
.../k9/ui/messageview/MessageContainerView.kt | 10 ++--
5 files changed, 56 insertions(+), 61 deletions(-)
create mode 100644 app/core/src/main/java/com/fsck/k9/contact/ContactIntentHelper.kt
diff --git a/app/core/src/main/java/com/fsck/k9/contact/ContactIntentHelper.kt b/app/core/src/main/java/com/fsck/k9/contact/ContactIntentHelper.kt
new file mode 100644
index 0000000000..54fc520fd3
--- /dev/null
+++ b/app/core/src/main/java/com/fsck/k9/contact/ContactIntentHelper.kt
@@ -0,0 +1,47 @@
+package com.fsck.k9.contact
+
+import android.content.Intent
+import android.net.Uri
+import android.provider.ContactsContract
+import com.fsck.k9.mail.Address
+
+object ContactIntentHelper {
+ @JvmStatic
+ fun getContactPickerIntent(): Intent {
+ return Intent(Intent.ACTION_PICK, ContactsContract.CommonDataKinds.Email.CONTENT_URI)
+ }
+
+ /**
+ * Get Intent to add information to an existing contact or add a new one.
+ *
+ * @param address An {@link Address} instance containing the email address
+ * of the entity you want to add to the contacts. Optionally
+ * the instance also contains the (display) name of that
+ * entity.
+ */
+ fun getAddEmailContactIntent(address: Address): Intent {
+ return Intent(ContactsContract.Intents.SHOW_OR_CREATE_CONTACT).apply {
+ flags = Intent.FLAG_ACTIVITY_NEW_TASK
+ data = Uri.fromParts("mailto", address.address, null)
+ putExtra(ContactsContract.Intents.EXTRA_CREATE_DESCRIPTION, address.toString())
+
+ if (address.personal != null) {
+ putExtra(ContactsContract.Intents.Insert.NAME, address.personal)
+ }
+ }
+ }
+
+ /**
+ * Get Intent to add a phone number to an existing contact or add a new one.
+ *
+ * @param phoneNumber
+ * The phone number to add to a contact, or to use when creating a new contact.
+ */
+ fun getAddPhoneContactIntent(phoneNumber: String): Intent {
+ return Intent(Intent.ACTION_INSERT_OR_EDIT).apply {
+ flags = Intent.FLAG_ACTIVITY_NEW_TASK
+ type = ContactsContract.Contacts.CONTENT_ITEM_TYPE
+ putExtra(ContactsContract.Intents.Insert.PHONE, Uri.decode(phoneNumber))
+ }
+ }
+}
diff --git a/app/core/src/main/java/com/fsck/k9/helper/Contacts.java b/app/core/src/main/java/com/fsck/k9/helper/Contacts.java
index d2642f7d04..37f09cc079 100644
--- a/app/core/src/main/java/com/fsck/k9/helper/Contacts.java
+++ b/app/core/src/main/java/com/fsck/k9/helper/Contacts.java
@@ -86,50 +86,6 @@ public class Contacts {
mContentResolver = context.getContentResolver();
}
- /**
- * Start the activity to add information to an existing contact or add a
- * new one.
- *
- * @param email An {@link Address} instance containing the email address
- * of the entity you want to add to the contacts. Optionally
- * the instance also contains the (display) name of that
- * entity.
- */
- public void createContact(final Address email) {
- final Uri contactUri = Uri.fromParts("mailto", email.getAddress(), null);
-
- final Intent contactIntent = new Intent(ContactsContract.Intents.SHOW_OR_CREATE_CONTACT);
- contactIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- contactIntent.setData(contactUri);
-
- // Pass along full email string for possible create dialog
- contactIntent.putExtra(ContactsContract.Intents.EXTRA_CREATE_DESCRIPTION,
- email.toString());
-
- // Only provide personal name hint if we have one
- final String senderPersonal = email.getPersonal();
- if (senderPersonal != null) {
- contactIntent.putExtra(ContactsContract.Intents.Insert.NAME, senderPersonal);
- }
-
- mContext.startActivity(contactIntent);
- clearCache();
- }
-
- /**
- * Start the activity to add a phone number to an existing contact or add a new one.
- *
- * @param phoneNumber
- * The phone number to add to a contact, or to use when creating a new contact.
- */
- public void addPhoneContact(final String phoneNumber) {
- Intent addIntent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
- addIntent.setType(ContactsContract.Contacts.CONTENT_ITEM_TYPE);
- addIntent.putExtra(ContactsContract.Intents.Insert.PHONE, Uri.decode(phoneNumber));
- addIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- mContext.startActivity(addIntent);
- clearCache();
- }
/**
* Check whether the provided email address belongs to one of the contacts.
@@ -228,14 +184,6 @@ public class Contacts {
// auto-completion.
}
- /**
- * Creates the intent necessary to open a contact picker.
- *
- * @return The intent necessary to open a contact picker.
- */
- public Intent contactPickerIntent() {
- return new Intent(Intent.ACTION_PICK, ContactsContract.CommonDataKinds.Email.CONTENT_URI);
- }
/**
* Get URI to the picture of the contact with the supplied email address.
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageCompose.java b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageCompose.java
index 4d93ac90dc..c3bf894d19 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageCompose.java
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/MessageCompose.java
@@ -72,6 +72,7 @@ import com.fsck.k9.activity.compose.ReplyToView;
import com.fsck.k9.activity.compose.SaveMessageTask;
import com.fsck.k9.activity.misc.Attachment;
import com.fsck.k9.autocrypt.AutocryptDraftStateHeaderParser;
+import com.fsck.k9.contact.ContactIntentHelper;
import com.fsck.k9.controller.MessageReference;
import com.fsck.k9.controller.MessagingController;
import com.fsck.k9.controller.MessagingListener;
@@ -849,7 +850,7 @@ public class MessageCompose extends K9Activity implements OnClickListener,
public void showContactPicker(int requestCode) {
requestCode |= REQUEST_MASK_RECIPIENT_PRESENTER;
isInSubActivity = true;
- startActivityForResult(contacts.contactPickerIntent(), requestCode);
+ startActivityForResult(ContactIntentHelper.getContactPickerIntent(), requestCode);
}
@Override
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.kt b/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.kt
index 813337fdd7..c3a851a51a 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/RecipientPresenter.kt
@@ -17,7 +17,7 @@ import com.fsck.k9.activity.compose.ComposeCryptoStatus.AttachErrorState
import com.fsck.k9.activity.compose.ComposeCryptoStatus.SendErrorState
import com.fsck.k9.autocrypt.AutocryptDraftStateHeader
import com.fsck.k9.autocrypt.AutocryptDraftStateHeaderParser
-import com.fsck.k9.helper.Contacts
+import com.fsck.k9.contact.ContactIntentHelper
import com.fsck.k9.helper.MailTo
import com.fsck.k9.helper.ReplyToParser
import com.fsck.k9.mail.Address
@@ -608,8 +608,7 @@ class RecipientPresenter(
}
private fun isContactPickerAvailable(): Boolean {
- val contacts = Contacts.getInstance(context)
- val resolveInfoList = context.packageManager.queryIntentActivities(contacts.contactPickerIntent(), 0)
+ val resolveInfoList = context.packageManager.queryIntentActivities(ContactIntentHelper.getContactPickerIntent(), 0)
return resolveInfoList.isNotEmpty()
}
diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.kt
index 0915160e4d..3264451be3 100644
--- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.kt
+++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.kt
@@ -24,8 +24,8 @@ import android.widget.Toast
import androidx.core.app.ShareCompat.IntentBuilder
import androidx.core.view.isGone
import androidx.core.view.isVisible
+import com.fsck.k9.contact.ContactIntentHelper
import com.fsck.k9.helper.ClipboardManager
-import com.fsck.k9.helper.Contacts
import com.fsck.k9.helper.Utility
import com.fsck.k9.mail.Address
import com.fsck.k9.mailstore.AttachmentResolver
@@ -252,8 +252,8 @@ class MessageContainerView(context: Context, attrs: AttributeSet?) :
startActivityIfAvailable(context, intent)
}
MENU_ITEM_PHONE_SAVE -> {
- val contacts = Contacts.getInstance(context)
- contacts.addPhoneContact(phoneNumber)
+ val intent = ContactIntentHelper.getAddPhoneContactIntent(phoneNumber)
+ startActivityIfAvailable(context, intent)
}
MENU_ITEM_PHONE_COPY -> {
val label = context.getString(R.string.webview_contextmenu_phone_clipboard_label)
@@ -298,8 +298,8 @@ class MessageContainerView(context: Context, attrs: AttributeSet?) :
startActivityIfAvailable(context, intent)
}
MENU_ITEM_EMAIL_SAVE -> {
- val contacts = Contacts.getInstance(context)
- contacts.createContact(Address(email))
+ val intent = ContactIntentHelper.getAddEmailContactIntent(Address(email))
+ startActivityIfAvailable(context, intent)
}
MENU_ITEM_EMAIL_COPY -> {
val label = context.getString(R.string.webview_contextmenu_email_clipboard_label)
--
GitLab
From bf7dcec493505995b17f0565e8dc529ff9ede120 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Wolf=20Montwe=CC=81?=
Date: Mon, 13 Feb 2023 15:02:23 +0100
Subject: [PATCH 036/317] Rename settings.gradle to settings.gradle.kts
---
settings.gradle => settings.gradle.kts | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename settings.gradle => settings.gradle.kts (100%)
diff --git a/settings.gradle b/settings.gradle.kts
similarity index 100%
rename from settings.gradle
rename to settings.gradle.kts
--
GitLab
From fdfd7c220392414f937d2ac8d88079bb70b052f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Wolf=20Montwe=CC=81?=
Date: Mon, 13 Feb 2023 15:06:32 +0100
Subject: [PATCH 037/317] Change settings.gradle.kts to Kotlin
---
settings.gradle.kts | 66 ++++++++++++++++++++++-----------------------
1 file changed, 33 insertions(+), 33 deletions(-)
diff --git a/settings.gradle.kts b/settings.gradle.kts
index f8ae7c284a..e7f79efef4 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -11,39 +11,39 @@ dependencyResolutionManagement {
repositories {
google()
mavenCentral()
- maven { url 'https://jitpack.io' }
+ maven(url = "https://jitpack.io")
}
}
-include ':app:k9mail'
-include ':app:ui:base'
-include ':app:ui:setup'
-include ':app:ui:legacy'
-include ':app:ui:message-list-widget'
-include ':app:core'
-include ':app:storage'
-include ':app:crypto-openpgp'
-include ':app:testing'
-include ':app:autodiscovery:api'
-include ':app:autodiscovery:providersxml'
-include ':app:autodiscovery:srvrecords'
-include ':app:autodiscovery:thunderbird'
-include ':app:html-cleaner'
-include ':ui-utils:LinearLayoutManager'
-include ':ui-utils:ItemTouchHelper'
-include ':ui-utils:ToolbarBottomSheet'
-include ':mail:common'
-include ':mail:testing'
-include ':mail:protocols:imap'
-include ':mail:protocols:pop3'
-include ':mail:protocols:webdav'
-include ':mail:protocols:smtp'
-include ':backend:api'
-include ':backend:testing'
-include ':backend:imap'
-include ':backend:pop3'
-include ':backend:webdav'
-include ':backend:jmap'
-include ':backend:demo'
-include ':plugins:openpgp-api-lib:openpgp-api'
-include ':cli:html-cleaner-cli'
+include(":app:k9mail")
+include(":app:ui:base")
+include(":app:ui:setup")
+include(":app:ui:legacy")
+include(":app:ui:message-list-widget")
+include(":app:core")
+include(":app:storage")
+include(":app:crypto-openpgp")
+include(":app:testing")
+include(":app:autodiscovery:api")
+include(":app:autodiscovery:providersxml")
+include(":app:autodiscovery:srvrecords")
+include(":app:autodiscovery:thunderbird")
+include(":app:html-cleaner")
+include(":ui-utils:LinearLayoutManager")
+include(":ui-utils:ItemTouchHelper")
+include(":ui-utils:ToolbarBottomSheet")
+include(":mail:common")
+include(":mail:testing")
+include(":mail:protocols:imap")
+include(":mail:protocols:pop3")
+include(":mail:protocols:webdav")
+include(":mail:protocols:smtp")
+include(":backend:api")
+include(":backend:testing")
+include(":backend:imap")
+include(":backend:pop3")
+include(":backend:webdav")
+include(":backend:jmap")
+include(":backend:demo")
+include(":plugins:openpgp-api-lib:openpgp-api")
+include(":cli:html-cleaner-cli")
--
GitLab
From 73f9976838629584127c8645f9407af4c204cfc9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Wolf=20Montwe=CC=81?=
Date: Mon, 13 Feb 2023 15:07:30 +0100
Subject: [PATCH 038/317] Rename build.gradle to build.gradle.kts
---
build.gradle => build.gradle.kts | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename build.gradle => build.gradle.kts (100%)
diff --git a/build.gradle b/build.gradle.kts
similarity index 100%
rename from build.gradle
rename to build.gradle.kts
--
GitLab
From 7a77fc43b8f844b0d2fb3032e81a2b90bd5a8f82 Mon Sep 17 00:00:00 2001
From: Wolf Montwe
Date: Wed, 8 Feb 2023 14:28:19 +0100
Subject: [PATCH 039/317] Add Cache
---
.../src/main/java/com/fsck/k9/cache/Cache.kt | 12 +++
.../java/com/fsck/k9/cache/ExpiringCache.kt | 45 ++++++++++
.../java/com/fsck/k9/cache/InMemoryCache.kt | 21 +++++
.../com/fsck/k9/cache/SynchronizedCache.kt | 30 +++++++
.../test/java/com/fsck/k9/cache/CacheTest.kt | 84 +++++++++++++++++++
.../com/fsck/k9/cache/ExpiringCacheTest.kt | 68 +++++++++++++++
6 files changed, 260 insertions(+)
create mode 100644 app/core/src/main/java/com/fsck/k9/cache/Cache.kt
create mode 100644 app/core/src/main/java/com/fsck/k9/cache/ExpiringCache.kt
create mode 100644 app/core/src/main/java/com/fsck/k9/cache/InMemoryCache.kt
create mode 100644 app/core/src/main/java/com/fsck/k9/cache/SynchronizedCache.kt
create mode 100644 app/core/src/test/java/com/fsck/k9/cache/CacheTest.kt
create mode 100644 app/core/src/test/java/com/fsck/k9/cache/ExpiringCacheTest.kt
diff --git a/app/core/src/main/java/com/fsck/k9/cache/Cache.kt b/app/core/src/main/java/com/fsck/k9/cache/Cache.kt
new file mode 100644
index 0000000000..24452809b0
--- /dev/null
+++ b/app/core/src/main/java/com/fsck/k9/cache/Cache.kt
@@ -0,0 +1,12 @@
+package com.fsck.k9.cache
+
+interface Cache {
+
+ operator fun get(key: KEY): VALUE?
+
+ operator fun set(key: KEY, value: VALUE)
+
+ fun hasKey(key: KEY): Boolean
+
+ fun clear()
+}
diff --git a/app/core/src/main/java/com/fsck/k9/cache/ExpiringCache.kt b/app/core/src/main/java/com/fsck/k9/cache/ExpiringCache.kt
new file mode 100644
index 0000000000..8340420856
--- /dev/null
+++ b/app/core/src/main/java/com/fsck/k9/cache/ExpiringCache.kt
@@ -0,0 +1,45 @@
+package com.fsck.k9.cache
+
+import com.fsck.k9.Clock
+
+internal class ExpiringCache(
+ private val clock: Clock,
+ private val delegateCache: Cache = InMemoryCache(),
+ private var lastClearTime: Long = clock.time,
+ private val cacheTimeValidity: Long = CACHE_TIME_VALIDITY_IN_MILLIS
+) : Cache {
+
+ override fun get(key: KEY): VALUE? {
+ recycle()
+ return delegateCache[key]
+ }
+
+ override fun set(key: KEY, value: VALUE) {
+ recycle()
+ delegateCache[key] = value
+ }
+
+ override fun hasKey(key: KEY): Boolean {
+ recycle()
+ return delegateCache.hasKey(key)
+ }
+
+ override fun clear() {
+ lastClearTime = clock.time
+ delegateCache.clear()
+ }
+
+ private fun recycle() {
+ if (isExpired()) {
+ clear()
+ }
+ }
+
+ private fun isExpired(): Boolean {
+ return (clock.time - lastClearTime) >= cacheTimeValidity
+ }
+
+ private companion object {
+ const val CACHE_TIME_VALIDITY_IN_MILLIS = 30_000L
+ }
+}
diff --git a/app/core/src/main/java/com/fsck/k9/cache/InMemoryCache.kt b/app/core/src/main/java/com/fsck/k9/cache/InMemoryCache.kt
new file mode 100644
index 0000000000..835f0a91ed
--- /dev/null
+++ b/app/core/src/main/java/com/fsck/k9/cache/InMemoryCache.kt
@@ -0,0 +1,21 @@
+package com.fsck.k9.cache
+
+internal class InMemoryCache(
+ private val cache: MutableMap = mutableMapOf()
+) : Cache {
+ override fun get(key: KEY): VALUE? {
+ return cache[key]
+ }
+
+ override fun set(key: KEY, value: VALUE) {
+ cache[key] = value
+ }
+
+ override fun hasKey(key: KEY): Boolean {
+ return cache.containsKey(key)
+ }
+
+ override fun clear() {
+ cache.clear()
+ }
+}
diff --git a/app/core/src/main/java/com/fsck/k9/cache/SynchronizedCache.kt b/app/core/src/main/java/com/fsck/k9/cache/SynchronizedCache.kt
new file mode 100644
index 0000000000..518f4716de
--- /dev/null
+++ b/app/core/src/main/java/com/fsck/k9/cache/SynchronizedCache.kt
@@ -0,0 +1,30 @@
+package com.fsck.k9.cache
+
+internal class SynchronizedCache(
+ private val delegateCache: Cache
+) : Cache {
+
+ override fun get(key: KEY): VALUE? {
+ synchronized(delegateCache) {
+ return delegateCache[key]
+ }
+ }
+
+ override fun set(key: KEY, value: VALUE) {
+ synchronized(delegateCache) {
+ delegateCache[key] = value
+ }
+ }
+
+ override fun hasKey(key: KEY): Boolean {
+ synchronized(delegateCache) {
+ return delegateCache.hasKey(key)
+ }
+ }
+
+ override fun clear() {
+ synchronized(delegateCache) {
+ delegateCache.clear()
+ }
+ }
+}
diff --git a/app/core/src/test/java/com/fsck/k9/cache/CacheTest.kt b/app/core/src/test/java/com/fsck/k9/cache/CacheTest.kt
new file mode 100644
index 0000000000..605080f813
--- /dev/null
+++ b/app/core/src/test/java/com/fsck/k9/cache/CacheTest.kt
@@ -0,0 +1,84 @@
+package com.fsck.k9.cache
+
+import com.fsck.k9.TestClock
+import com.google.common.truth.Truth.assertThat
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.junit.runners.Parameterized
+
+data class CacheTestData(
+ val name: String,
+ val createCache: () -> Cache
+) {
+ override fun toString(): String = name
+}
+
+@RunWith(Parameterized::class)
+class CacheTest(data: CacheTestData) {
+
+ private val testSubject = data.createCache()
+
+ companion object {
+ @JvmStatic
+ @Parameterized.Parameters(name = "{0}")
+ fun data(): Collection> {
+ return listOf(
+ CacheTestData("InMemoryCache") { InMemoryCache() },
+ CacheTestData("ExpiringCache") { ExpiringCache(TestClock(), InMemoryCache()) },
+ CacheTestData("SynchronizedCache") { SynchronizedCache(InMemoryCache()) }
+ )
+ }
+
+ const val KEY = "key"
+ const val VALUE = "value"
+ }
+
+ @Test
+ fun `get should return null with empty cache`() {
+ assertThat(testSubject[KEY]).isNull()
+ }
+
+ @Test
+ fun `get should return entry when present`() {
+ testSubject[KEY] = VALUE
+
+ assertThat(testSubject[KEY]).isEqualTo(VALUE)
+ }
+
+ @Test
+ fun `set should add entry with empty cache`() {
+ testSubject[KEY] = VALUE
+
+ assertThat(testSubject[KEY]).isEqualTo(VALUE)
+ }
+
+ @Test
+ fun `set should overwrite entry when already present`() {
+ testSubject[KEY] = VALUE
+
+ testSubject[KEY] = "$VALUE changed"
+
+ assertThat(testSubject[KEY]).isEqualTo("$VALUE changed")
+ }
+
+ @Test
+ fun `hasKey should answer no with empty cache`() {
+ assertThat(testSubject.hasKey(KEY)).isFalse()
+ }
+
+ @Test
+ fun `hasKey should answer yes when cache has entry`() {
+ testSubject[KEY] = VALUE
+
+ assertThat(testSubject.hasKey(KEY)).isTrue()
+ }
+
+ @Test
+ fun `clear should empty cache`() {
+ testSubject[KEY] = VALUE
+
+ testSubject.clear()
+
+ assertThat(testSubject[KEY]).isNull()
+ }
+}
diff --git a/app/core/src/test/java/com/fsck/k9/cache/ExpiringCacheTest.kt b/app/core/src/test/java/com/fsck/k9/cache/ExpiringCacheTest.kt
new file mode 100644
index 0000000000..123892dbf7
--- /dev/null
+++ b/app/core/src/test/java/com/fsck/k9/cache/ExpiringCacheTest.kt
@@ -0,0 +1,68 @@
+package com.fsck.k9.cache
+
+import com.fsck.k9.TestClock
+import com.google.common.truth.Truth.assertThat
+import kotlin.test.Test
+
+class ExpiringCacheTest {
+
+ private val clock = TestClock()
+
+ private val testSubject: Cache = ExpiringCache(clock, InMemoryCache())
+
+ @Test
+ fun `get should return null when entry present and cache expired`() {
+ testSubject[KEY] = VALUE
+ advanceClockBy(CACHE_TIME_VALIDITY_IN_MILLIS)
+
+ val result = testSubject[KEY]
+
+ assertThat(result).isNull()
+ }
+
+ @Test
+ fun `set should clear cache and add new entry when cache expired`() {
+ testSubject[KEY] = VALUE
+ advanceClockBy(CACHE_TIME_VALIDITY_IN_MILLIS)
+
+ testSubject[KEY + 1] = "$VALUE changed"
+
+ assertThat(testSubject[KEY]).isNull()
+ assertThat(testSubject[KEY + 1]).isEqualTo("$VALUE changed")
+ }
+
+ @Test
+ fun `hasKey should answer no when cache has entry and validity expired`() {
+ testSubject[KEY] = VALUE
+ advanceClockBy(CACHE_TIME_VALIDITY_IN_MILLIS)
+
+ assertThat(testSubject.hasKey(KEY)).isFalse()
+ }
+
+ @Test
+ fun `should keep cache when time progresses within expiration`() {
+ testSubject[KEY] = VALUE
+ advanceClockBy(CACHE_TIME_VALIDITY_IN_MILLIS - 1)
+
+ assertThat(testSubject[KEY]).isEqualTo(VALUE)
+ }
+
+ @Test
+ fun `should empty cache after time progresses to expiration`() {
+ testSubject[KEY] = VALUE
+
+ advanceClockBy(CACHE_TIME_VALIDITY_IN_MILLIS)
+
+ assertThat(testSubject[KEY]).isNull()
+ }
+
+ private fun advanceClockBy(timeInMillis: Long) {
+ clock.time = clock.time + timeInMillis
+ }
+
+ private companion object {
+ const val KEY = "key"
+ const val VALUE = "value"
+ const val CACHE_TIME_VALIDITY_IN_MILLIS = 30_000L
+ }
+}
--
GitLab
From 71ae33719f05789f6512ac3432438a7d994c7e7b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Wolf=20Montwe=CC=81?=
Date: Mon, 13 Feb 2023 15:59:46 +0100
Subject: [PATCH 040/317] Change build.gradle.kts to Kotlin
---
build.gradle.kts | 119 +++++++++++++++++++++++++++--------------------
1 file changed, 69 insertions(+), 50 deletions(-)
diff --git a/build.gradle.kts b/build.gradle.kts
index a1d24d277d..769e587f93 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,7 +1,8 @@
+import com.android.build.gradle.BaseExtension
import com.android.build.gradle.BasePlugin
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
-import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
+@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
@@ -13,85 +14,102 @@ plugins {
alias(libs.plugins.spotless)
}
-project.ext {
- testCoverage = project.hasProperty('testCoverage')
-}
+val propertyTestCoverage: String? by extra
-def javaVersion = JavaVersion.VERSION_11
-def jvmTargetVersion = JvmTarget.JVM_11
+val javaVersion = JavaVersion.VERSION_11
+val jvmTargetVersion = JvmTarget.JVM_11
allprojects {
+ extra.apply {
+ set("testCoverage", propertyTestCoverage != null)
+ }
+
configurations.configureEach {
resolutionStrategy.dependencySubstitution {
- substitute module("androidx.core:core") using module("androidx.core:core:${libs.versions.androidxCore.get()}")
- substitute module("androidx.activity:activity") using module("androidx.activity:activity:${libs.versions.androidxActivity.get()}")
- substitute module("androidx.activity:activity-ktx") using module("androidx.activity:activity-ktx:${libs.versions.androidxActivity.get()}")
- substitute module("androidx.fragment:fragment") using module("androidx.fragment:fragment:${libs.versions.androidxFragment.get()}")
- substitute module("androidx.fragment:fragment-ktx") using module("androidx.fragment:fragment-ktx:${libs.versions.androidxFragment.get()}")
- substitute module("androidx.appcompat:appcompat") using module("androidx.appcompat:appcompat:${libs.versions.androidxAppCompat.get()}")
- substitute module("androidx.preference:preference") using module("androidx.preference:preference:${libs.versions.androidxPreference.get()}")
- substitute module("androidx.recyclerview:recyclerview") using module("androidx.recyclerview:recyclerview:${libs.versions.androidxRecyclerView.get()}")
- substitute module("androidx.constraintlayout:constraintlayout") using module("androidx.constraintlayout:constraintlayout:${libs.versions.androidxConstraintLayout.get()}")
- substitute module("androidx.drawerlayout:drawerlayout") using module("androidx.drawerlayout:drawerlayout:${libs.versions.androidxDrawerLayout.get()}")
- substitute module("androidx.lifecycle:lifecycle-livedata") using module("androidx.lifecycle:lifecycle-livedata:${libs.versions.androidxLifecycle.get()}")
- substitute module("androidx.transition:transition") using module("androidx.transition:transition:${libs.versions.androidxTransition.get()}")
- substitute module("org.jetbrains:annotations") using module("org.jetbrains:annotations:${libs.versions.jetbrainsAnnotations.get()}")
- substitute module("org.jetbrains.kotlin:kotlin-stdlib") using module("org.jetbrains.kotlin:kotlin-stdlib:${libs.versions.kotlin.get()}")
- substitute module("org.jetbrains.kotlin:kotlin-stdlib-jdk7") using module("org.jetbrains.kotlin:kotlin-stdlib-jdk7:${libs.versions.kotlin.get()}")
- substitute module("org.jetbrains.kotlin:kotlin-stdlib-jdk8") using module("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${libs.versions.kotlin.get()}")
- substitute module("org.jetbrains.kotlinx:kotlinx-coroutines-android") using module("org.jetbrains.kotlinx:kotlinx-coroutines-android:${libs.versions.kotlinCoroutines.get()}")
+ substitute(module("androidx.core:core"))
+ .using(module("androidx.core:core:${libs.versions.androidxCore.get()}"))
+ substitute(module("androidx.activity:activity"))
+ .using(module("androidx.activity:activity:${libs.versions.androidxActivity.get()}"))
+ substitute(module("androidx.activity:activity-ktx"))
+ .using(module("androidx.activity:activity-ktx:${libs.versions.androidxActivity.get()}"))
+ substitute(module("androidx.fragment:fragment"))
+ .using(module("androidx.fragment:fragment:${libs.versions.androidxFragment.get()}"))
+ substitute(module("androidx.fragment:fragment-ktx"))
+ .using(module("androidx.fragment:fragment-ktx:${libs.versions.androidxFragment.get()}"))
+ substitute(module("androidx.appcompat:appcompat"))
+ .using(module("androidx.appcompat:appcompat:${libs.versions.androidxAppCompat.get()}"))
+ substitute(module("androidx.preference:preference"))
+ .using(module("androidx.preference:preference:${libs.versions.androidxPreference.get()}"))
+ substitute(module("androidx.recyclerview:recyclerview"))
+ .using(module("androidx.recyclerview:recyclerview:${libs.versions.androidxRecyclerView.get()}"))
+ substitute(module("androidx.constraintlayout:constraintlayout"))
+ .using(module("androidx.constraintlayout:constraintlayout:${libs.versions.androidxConstraintLayout.get()}"))
+ substitute(module("androidx.drawerlayout:drawerlayout"))
+ .using(module("androidx.drawerlayout:drawerlayout:${libs.versions.androidxDrawerLayout.get()}"))
+ substitute(module("androidx.lifecycle:lifecycle-livedata"))
+ .using(module("androidx.lifecycle:lifecycle-livedata:${libs.versions.androidxLifecycle.get()}"))
+ substitute(module("androidx.transition:transition"))
+ .using(module("androidx.transition:transition:${libs.versions.androidxTransition.get()}"))
+ substitute(module("org.jetbrains:annotations"))
+ .using(module("org.jetbrains:annotations:${libs.versions.jetbrainsAnnotations.get()}"))
+ substitute(module("org.jetbrains.kotlin:kotlin-stdlib"))
+ .using(module("org.jetbrains.kotlin:kotlin-stdlib:${libs.versions.kotlin.get()}"))
+ substitute(module("org.jetbrains.kotlin:kotlin-stdlib-jdk7"))
+ .using(module("org.jetbrains.kotlin:kotlin-stdlib-jdk7:${libs.versions.kotlin.get()}"))
+ substitute(module("org.jetbrains.kotlin:kotlin-stdlib-jdk8"))
+ .using(module("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${libs.versions.kotlin.get()}"))
+ substitute(module("org.jetbrains.kotlinx:kotlinx-coroutines-android"))
+ .using(module("org.jetbrains.kotlinx:kotlinx-coroutines-android:${libs.versions.kotlinCoroutines.get()}"))
}
}
- plugins.withType(BasePlugin).configureEach {
- project.android {
- compileSdk 33
+ plugins.withType {
+ configure {
+ compileSdkVersion(33)
defaultConfig {
- minSdk 21
- targetSdk 31
+ minSdk = 21
+ targetSdk = 31
vectorDrawables.useSupportLibrary = true
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
- sourceCompatibility javaVersion
- targetCompatibility javaVersion
+ sourceCompatibility = javaVersion
+ targetCompatibility = javaVersion
}
lintOptions {
- abortOnError false
- lintConfig file("$rootProject.projectDir/config/lint/lint.xml")
+ isAbortOnError = false
+ lintConfig = file("${rootProject.projectDir}/config/lint/lint.xml")
}
testOptions {
unitTests {
- includeAndroidResources = true
+ isIncludeAndroidResources = true
}
}
}
}
- plugins.withType(JavaPlugin).configureEach {
- project.java {
+ plugins.withType {
+ configure {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}
}
- tasks.withType(Test).configureEach {
- testLogging {
- exceptionFormat "full"
- showCauses true
- showExceptions true
- showStackTraces true
- }
+ tasks.withType {
+ kotlinOptions.jvmTarget = jvmTargetVersion.target
}
- tasks.withType(KotlinCompile).configureEach {
- compilerOptions {
- jvmTarget = jvmTargetVersion
+ tasks.withType {
+ testLogging {
+ exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
+ showCauses = true
+ showExceptions = true
+ showStackTraces = true
}
}
}
@@ -118,9 +136,10 @@ spotless {
}
}
-tasks.register('testsOnCi') {
- dependsOn getSubprojects()
- .collect { project -> project.tasks.withType(Test) }
+tasks.register("testsOnCi") {
+ dependsOn(
+ subprojects.map { project -> project.tasks.withType(Test::class.java) }
.flatten()
- .findAll { task -> task.name in ['testDebugUnitTest', 'test'] }
+ .filterNot { task -> task.name in arrayOf("testDebugUnitTest", "test") }
+ )
}
--
GitLab
From 557bf1dcc78633680222676e5d974425f23da752 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Wolf=20Montwe=CC=81?=
Date: Mon, 13 Feb 2023 16:02:16 +0100
Subject: [PATCH 041/317] Add build-plugin
---
build-plugin/build.gradle.kts | 11 ++++++++++
build-plugin/settings.gradle.kts | 21 +++++++++++++++++++
.../src/main/kotlin/ProjectExtension.kt | 6 ++++++
settings.gradle.kts | 2 ++
4 files changed, 40 insertions(+)
create mode 100644 build-plugin/build.gradle.kts
create mode 100644 build-plugin/settings.gradle.kts
create mode 100644 build-plugin/src/main/kotlin/ProjectExtension.kt
diff --git a/build-plugin/build.gradle.kts b/build-plugin/build.gradle.kts
new file mode 100644
index 0000000000..cf9ed64058
--- /dev/null
+++ b/build-plugin/build.gradle.kts
@@ -0,0 +1,11 @@
+plugins {
+ `kotlin-dsl`
+}
+
+dependencies {
+ implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
+}
+
+fun plugin(provider: Provider) = with(provider.get()) {
+ "$pluginId:$pluginId.gradle.plugin:$version"
+}
diff --git a/build-plugin/settings.gradle.kts b/build-plugin/settings.gradle.kts
new file mode 100644
index 0000000000..46a867ddcb
--- /dev/null
+++ b/build-plugin/settings.gradle.kts
@@ -0,0 +1,21 @@
+pluginManagement {
+ repositories {
+ gradlePluginPortal()
+ google()
+ mavenCentral()
+ }
+}
+
+dependencyResolutionManagement {
+ repositories {
+ google()
+ mavenCentral()
+ gradlePluginPortal()
+ }
+
+ versionCatalogs.create("libs") {
+ from(files("../gradle/libs.versions.toml"))
+ }
+}
+
+rootProject.name = "build-plugin"
diff --git a/build-plugin/src/main/kotlin/ProjectExtension.kt b/build-plugin/src/main/kotlin/ProjectExtension.kt
new file mode 100644
index 0000000000..916ab22a08
--- /dev/null
+++ b/build-plugin/src/main/kotlin/ProjectExtension.kt
@@ -0,0 +1,6 @@
+import org.gradle.accessors.dm.LibrariesForLibs
+import org.gradle.api.Project
+import org.gradle.kotlin.dsl.getByName
+
+val Project.libs: LibrariesForLibs
+ get() = extensions.getByName("libs")
diff --git a/settings.gradle.kts b/settings.gradle.kts
index e7f79efef4..6f3e687fea 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -15,6 +15,8 @@ dependencyResolutionManagement {
}
}
+includeBuild("build-plugin")
+
include(":app:k9mail")
include(":app:ui:base")
include(":app:ui:setup")
--
GitLab
From 2967e933e42be68eeea7eb748100922cc2acc396 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Wolf=20Montwe=CC=81?=
Date: Mon, 13 Feb 2023 17:18:33 +0100
Subject: [PATCH 042/317] Change Spotless configuration to build-plugin
---
build-plugin/build.gradle.kts | 2 ++
....gradle.plugin.quality.spotless.gradle.kts | 28 +++++++++++++++++++
build.gradle.kts | 25 ++---------------
gradle/libs.versions.toml | 3 +-
4 files changed, 33 insertions(+), 25 deletions(-)
create mode 100644 build-plugin/src/main/kotlin/app.k9mail.gradle.plugin.quality.spotless.gradle.kts
diff --git a/build-plugin/build.gradle.kts b/build-plugin/build.gradle.kts
index cf9ed64058..6e93eb9db0 100644
--- a/build-plugin/build.gradle.kts
+++ b/build-plugin/build.gradle.kts
@@ -4,6 +4,8 @@ plugins {
dependencies {
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
+
+ implementation(plugin(libs.plugins.spotless))
}
fun plugin(provider: Provider) = with(provider.get()) {
diff --git a/build-plugin/src/main/kotlin/app.k9mail.gradle.plugin.quality.spotless.gradle.kts b/build-plugin/src/main/kotlin/app.k9mail.gradle.plugin.quality.spotless.gradle.kts
new file mode 100644
index 0000000000..0f77397b4b
--- /dev/null
+++ b/build-plugin/src/main/kotlin/app.k9mail.gradle.plugin.quality.spotless.gradle.kts
@@ -0,0 +1,28 @@
+import com.diffplug.gradle.spotless.SpotlessExtension
+
+@Suppress("DSL_SCOPE_VIOLATION")
+plugins {
+ id("com.diffplug.spotless")
+}
+
+configure {
+ kotlin {
+ ktlint(libs.versions.ktlint.get())
+ target("**/*.kt")
+ targetExclude("**/build/", "**/resources/", "plugins/openpgp-api-lib/")
+ }
+ kotlinGradle {
+ ktlint(libs.versions.ktlint.get())
+ target("**/*.gradle.kts")
+ targetExclude("**/build/")
+ }
+ format("markdown") {
+ prettier()
+ target("**/*.md")
+ targetExclude("plugins/openpgp-api-lib/")
+ }
+ format("misc") {
+ target("**/*.gradle", "**/.gitignore")
+ trimTrailingWhitespace()
+ }
+}
diff --git a/build.gradle.kts b/build.gradle.kts
index 769e587f93..e9fbc9ad26 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -11,7 +11,8 @@ plugins {
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.kotlin.jvm) apply false
- alias(libs.plugins.spotless)
+
+ id("app.k9mail.gradle.plugin.quality.spotless")
}
val propertyTestCoverage: String? by extra
@@ -114,28 +115,6 @@ allprojects {
}
}
-spotless {
- kotlin {
- ktlint(libs.versions.ktlint.get())
- target("**/*.kt")
- targetExclude("**/build/", "**/resources/", "plugins/openpgp-api-lib/")
- }
- kotlinGradle {
- ktlint(libs.versions.ktlint.get())
- target("**/*.gradle.kts")
- targetExclude("**/build/")
- }
- format("markdown") {
- prettier()
- target("**/*.md")
- targetExclude("plugins/openpgp-api-lib/")
- }
- format("misc") {
- target("**/*.gradle", "**/.gitignore")
- trimTrailingWhitespace()
- }
-}
-
tasks.register("testsOnCi") {
dependsOn(
subprojects.map { project -> project.tasks.withType(Test::class.java) }
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index dfab2102d5..9b827c2955 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -4,7 +4,6 @@
[versions]
androidGradlePlugin = "7.4.0"
ktlint = "0.47.1"
-spotless = "6.14.0"
kotlin = "1.8.0"
kotlinCoroutines = "1.6.4"
@@ -39,7 +38,7 @@ ksp = "com.google.devtools.ksp:1.8.0-1.0.8"
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
-spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
+spotless = "com.diffplug.spotless:6.14.0"
[libraries]
desugar = "com.android.tools:desugar_jdk_libs:1.1.8"
--
GitLab
From 946c105265726195306c18d4475a220fcebb3d44 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Wolf=20Montwe=CC=81?=
Date: Mon, 13 Feb 2023 17:42:20 +0100
Subject: [PATCH 043/317] Change include structure and enable typesafe project
accessors
---
settings.gradle.kts | 75 +++++++++++++++++++++++++++------------------
1 file changed, 45 insertions(+), 30 deletions(-)
diff --git a/settings.gradle.kts b/settings.gradle.kts
index 6f3e687fea..0b02218522 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -15,37 +15,52 @@ dependencyResolutionManagement {
}
}
+enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
+
includeBuild("build-plugin")
-include(":app:k9mail")
-include(":app:ui:base")
-include(":app:ui:setup")
-include(":app:ui:legacy")
-include(":app:ui:message-list-widget")
-include(":app:core")
-include(":app:storage")
-include(":app:crypto-openpgp")
-include(":app:testing")
-include(":app:autodiscovery:api")
-include(":app:autodiscovery:providersxml")
-include(":app:autodiscovery:srvrecords")
-include(":app:autodiscovery:thunderbird")
-include(":app:html-cleaner")
-include(":ui-utils:LinearLayoutManager")
-include(":ui-utils:ItemTouchHelper")
-include(":ui-utils:ToolbarBottomSheet")
-include(":mail:common")
-include(":mail:testing")
-include(":mail:protocols:imap")
-include(":mail:protocols:pop3")
-include(":mail:protocols:webdav")
-include(":mail:protocols:smtp")
-include(":backend:api")
-include(":backend:testing")
-include(":backend:imap")
-include(":backend:pop3")
-include(":backend:webdav")
-include(":backend:jmap")
-include(":backend:demo")
+include(
+ ":app:k9mail",
+ ":app:ui:base",
+ ":app:ui:setup",
+ ":app:ui:legacy",
+ ":app:ui:message-list-widget",
+ ":app:core",
+ ":app:storage",
+ ":app:crypto-openpgp",
+ ":app:testing",
+ ":app:autodiscovery:api",
+ ":app:autodiscovery:providersxml",
+ ":app:autodiscovery:srvrecords",
+ ":app:autodiscovery:thunderbird",
+ ":app:html-cleaner"
+)
+
+include(
+ ":ui-utils:LinearLayoutManager",
+ ":ui-utils:ItemTouchHelper",
+ ":ui-utils:ToolbarBottomSheet"
+)
+
+include(
+ ":mail:common",
+ ":mail:testing",
+ ":mail:protocols:imap",
+ ":mail:protocols:pop3",
+ ":mail:protocols:webdav",
+ ":mail:protocols:smtp"
+)
+
+include(
+ ":backend:api",
+ ":backend:testing",
+ ":backend:imap",
+ ":backend:pop3",
+ ":backend:webdav",
+ ":backend:jmap",
+ ":backend:demo"
+)
+
include(":plugins:openpgp-api-lib:openpgp-api")
+
include(":cli:html-cleaner-cli")
--
GitLab
From 77a295f7ed091b63033a4274e4cadd457545d4a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Wolf=20Montwe=CC=81?=
Date: Tue, 14 Feb 2023 10:45:28 +0100
Subject: [PATCH 044/317] Remove doubled test
---
app/core/src/test/java/com/fsck/k9/cache/CacheTest.kt | 7 -------
1 file changed, 7 deletions(-)
diff --git a/app/core/src/test/java/com/fsck/k9/cache/CacheTest.kt b/app/core/src/test/java/com/fsck/k9/cache/CacheTest.kt
index 605080f813..d07d82ac9e 100644
--- a/app/core/src/test/java/com/fsck/k9/cache/CacheTest.kt
+++ b/app/core/src/test/java/com/fsck/k9/cache/CacheTest.kt
@@ -38,13 +38,6 @@ class CacheTest(data: CacheTestData) {
assertThat(testSubject[KEY]).isNull()
}
- @Test
- fun `get should return entry when present`() {
- testSubject[KEY] = VALUE
-
- assertThat(testSubject[KEY]).isEqualTo(VALUE)
- }
-
@Test
fun `set should add entry with empty cache`() {
testSubject[KEY] = VALUE
--
GitLab
From caa6a848ff815a267049552903653267ad230582 Mon Sep 17 00:00:00 2001
From: cketti
Date: Mon, 13 Feb 2023 18:46:04 +0100
Subject: [PATCH 045/317] Limit summary notification actions to active
notifications
---
.../src/main/java/com/fsck/k9/notification/NotificationData.kt | 3 +++
.../com/fsck/k9/notification/SummaryNotificationDataCreator.kt | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/app/core/src/main/java/com/fsck/k9/notification/NotificationData.kt b/app/core/src/main/java/com/fsck/k9/notification/NotificationData.kt
index ab6f363995..d3f8dcd21a 100644
--- a/app/core/src/main/java/com/fsck/k9/notification/NotificationData.kt
+++ b/app/core/src/main/java/com/fsck/k9/notification/NotificationData.kt
@@ -29,6 +29,9 @@ internal data class NotificationData(
}
}
+ val activeMessageReferences: List
+ get() = activeNotifications.map { it.content.messageReference }
+
fun isEmpty() = activeNotifications.isEmpty()
companion object {
diff --git a/app/core/src/main/java/com/fsck/k9/notification/SummaryNotificationDataCreator.kt b/app/core/src/main/java/com/fsck/k9/notification/SummaryNotificationDataCreator.kt
index 6decadf15f..34d82efcf5 100644
--- a/app/core/src/main/java/com/fsck/k9/notification/SummaryNotificationDataCreator.kt
+++ b/app/core/src/main/java/com/fsck/k9/notification/SummaryNotificationDataCreator.kt
@@ -37,7 +37,7 @@ internal class SummaryNotificationDataCreator(
timestamp = timestamp,
content = data.summaryContent,
additionalMessagesCount = data.additionalMessagesCount,
- messageReferences = data.messageReferences,
+ messageReferences = data.activeMessageReferences,
actions = createSummaryNotificationActions(),
wearActions = createSummaryWearNotificationActions(data.account)
)
--
GitLab
From 2365b084c1fbde28a43d9f31b1222816f21d7c0c Mon Sep 17 00:00:00 2001
From: cketti
Date: Tue, 14 Feb 2023 14:41:23 +0100
Subject: [PATCH 046/317] Add messages with inline images to the demo backend
---
backend/demo/src/main/resources/contents.json | 9 +-
.../inbox/inline_image_attachment.eml | 248 ++++++++++++++++++
.../resources/inbox/inline_image_data_uri.eml | 15 ++
3 files changed, 271 insertions(+), 1 deletion(-)
create mode 100644 backend/demo/src/main/resources/inbox/inline_image_attachment.eml
create mode 100644 backend/demo/src/main/resources/inbox/inline_image_data_uri.eml
diff --git a/backend/demo/src/main/resources/contents.json b/backend/demo/src/main/resources/contents.json
index 5443d1871f..f0f75a8e00 100644
--- a/backend/demo/src/main/resources/contents.json
+++ b/backend/demo/src/main/resources/contents.json
@@ -2,7 +2,14 @@
"inbox": {
"name": "Inbox",
"type": "INBOX",
- "messageServerIds": ["intro", "many_recipients", "thread_1", "thread_2"]
+ "messageServerIds": [
+ "intro",
+ "many_recipients",
+ "thread_1",
+ "thread_2",
+ "inline_image_data_uri",
+ "inline_image_attachment"
+ ]
},
"trash": {
"name": "Trash",
diff --git a/backend/demo/src/main/resources/inbox/inline_image_attachment.eml b/backend/demo/src/main/resources/inbox/inline_image_attachment.eml
new file mode 100644
index 0000000000..6a7ceed12c
--- /dev/null
+++ b/backend/demo/src/main/resources/inbox/inline_image_attachment.eml
@@ -0,0 +1,248 @@
+MIME-Version: 1.0
+From: "Test data"
+Date: Tue, 14 Feb 2023 15:00:00 +0100
+Message-ID:
+Subject: Inline image attachment
+To: User
+Content-Type: multipart/related; boundary=BOUNDARY
+
+--BOUNDARY
+Content-Type: text/html; charset=UTF-8
+
+
+
+
Inline image using a cid: URI to reference an attached image: