From 443807f32abda383cf63a583f1f67293a48b3f38 Mon Sep 17 00:00:00 2001 From: cketti Date: Sat, 17 Sep 2022 12:22:47 +0200 Subject: [PATCH 01/26] Prepare Prepare for version 6.306 --- 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 e0dae8bc25..eedcf9c589 100644 --- a/app/k9mail/build.gradle +++ b/app/k9mail/build.gradle @@ -49,7 +49,7 @@ android { testApplicationId "com.fsck.k9.tests" versionCode 33005 - versionName '6.305' + versionName '6.306-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 8b21092cc2684213c4f4317236ac93d4e7d15a00 Mon Sep 17 00:00:00 2001 From: cketti Date: Sat, 17 Sep 2022 14:53:04 +0200 Subject: [PATCH 02/26] Convert :backend:* to JVM modules --- .../k9/controller/MessagingController.java | 2 +- backend/api/build.gradle | 33 ++++---------- backend/api/src/main/AndroidManifest.xml | 2 - backend/demo/build.gradle | 40 +++-------------- backend/demo/src/main/AndroidManifest.xml | 2 - backend/imap/build.gradle | 40 +++-------------- backend/imap/src/main/AndroidManifest.xml | 2 - .../fsck/k9/backend/imap/CommandExpunge.kt | 2 +- .../backend/imap/CommandMoveOrCopyMessages.kt | 2 +- .../fsck/k9/backend/imap/ImapBackendPusher.kt | 3 +- .../fsck/k9/backend/imap/ImapFolderPusher.kt | 2 +- .../java/com/fsck/k9/backend/imap/ImapSync.kt | 2 +- backend/jmap/build.gradle | 40 +++-------------- backend/jmap/src/main/AndroidManifest.xml | 2 - .../com/fsck/k9/backend/jmap/CommandDelete.kt | 2 +- .../com/fsck/k9/backend/jmap/CommandMove.kt | 2 +- .../fsck/k9/backend/jmap/CommandSetFlag.kt | 2 +- .../com/fsck/k9/backend/jmap/CommandSync.kt | 2 +- .../com/fsck/k9/backend/jmap/CommandUpload.kt | 2 +- .../k9/backend/jmap/JmapAccountDiscovery.kt | 2 +- backend/pop3/build.gradle | 41 +++-------------- backend/pop3/src/main/AndroidManifest.xml | 2 - .../com/fsck/k9/backend/pop3/Pop3Sync.java | 3 +- backend/testing/build.gradle | 34 ++++---------- backend/testing/src/main/AndroidManifest.xml | 2 - backend/webdav/build.gradle | 44 +++---------------- .../webdav/CommandMoveOrCopyMessages.java | 2 +- .../fsck/k9/backend/webdav/WebDavBackend.kt | 2 +- .../fsck/k9/backend/webdav/WebDavSync.java | 23 +++++----- 29 files changed, 73 insertions(+), 266 deletions(-) delete mode 100644 backend/api/src/main/AndroidManifest.xml delete mode 100644 backend/demo/src/main/AndroidManifest.xml delete mode 100644 backend/imap/src/main/AndroidManifest.xml delete mode 100644 backend/jmap/src/main/AndroidManifest.xml delete mode 100644 backend/pop3/src/main/AndroidManifest.xml delete mode 100644 backend/testing/src/main/AndroidManifest.xml diff --git a/app/core/src/main/java/com/fsck/k9/controller/MessagingController.java b/app/core/src/main/java/com/fsck/k9/controller/MessagingController.java index 8dea272689..b31e2800a8 100644 --- a/app/core/src/main/java/com/fsck/k9/controller/MessagingController.java +++ b/app/core/src/main/java/com/fsck/k9/controller/MessagingController.java @@ -36,7 +36,6 @@ import com.fsck.k9.K9; import com.fsck.k9.Preferences; import com.fsck.k9.backend.BackendManager; import com.fsck.k9.backend.api.Backend; -import com.fsck.k9.backend.api.BuildConfig; import com.fsck.k9.backend.api.SyncConfig; import com.fsck.k9.backend.api.SyncListener; import com.fsck.k9.controller.ControllerExtension.ControllerInternals; @@ -51,6 +50,7 @@ import com.fsck.k9.controller.MessagingControllerCommands.PendingMoveOrCopy; import com.fsck.k9.controller.MessagingControllerCommands.PendingReplace; import com.fsck.k9.controller.MessagingControllerCommands.PendingSetFlag; import com.fsck.k9.controller.ProgressBodyFactory.ProgressListener; +import com.fsck.k9.core.BuildConfig; import com.fsck.k9.helper.MutableBoolean; import com.fsck.k9.mail.AuthType; import com.fsck.k9.mail.AuthenticationFailedException; diff --git a/backend/api/build.gradle b/backend/api/build.gradle index 639fc33317..ce98344e01 100644 --- a/backend/api/build.gradle +++ b/backend/api/build.gradle @@ -1,29 +1,12 @@ -apply plugin: 'com.android.library' -apply plugin: 'org.jetbrains.kotlin.android' +apply plugin: 'java-library' +apply plugin: 'kotlin' +apply plugin: 'com.android.lint' -dependencies { - api project(":mail:common") +java { + sourceCompatibility = javaVersion + targetCompatibility = javaVersion } -android { - compileSdkVersion buildConfig.compileSdk - buildToolsVersion buildConfig.buildTools - - defaultConfig { - minSdkVersion buildConfig.minSdk - } - - lintOptions { - abortOnError false - lintConfig file("$rootProject.projectDir/config/lint/lint.xml") - } - - compileOptions { - sourceCompatibility javaVersion - targetCompatibility javaVersion - } - - kotlinOptions { - jvmTarget = kotlinJvmVersion - } +dependencies { + api project(":mail:common") } diff --git a/backend/api/src/main/AndroidManifest.xml b/backend/api/src/main/AndroidManifest.xml deleted file mode 100644 index a5723f2fd9..0000000000 --- a/backend/api/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/backend/demo/build.gradle b/backend/demo/build.gradle index 62e0bd34fd..ce88d022db 100644 --- a/backend/demo/build.gradle +++ b/backend/demo/build.gradle @@ -1,16 +1,17 @@ -apply plugin: 'com.android.library' -apply plugin: 'org.jetbrains.kotlin.android' +apply plugin: 'java-library' +apply plugin: 'kotlin' apply plugin: 'kotlin-kapt' +apply plugin: 'com.android.lint' -if (rootProject.testCoverage) { - apply plugin: 'jacoco' +java { + sourceCompatibility = javaVersion + targetCompatibility = javaVersion } dependencies { api project(":backend:api") implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${versions.kotlinCoroutines}" - implementation "com.jakewharton.timber:timber:${versions.timber}" implementation "com.squareup.moshi:moshi:${versions.moshi}" kapt "com.squareup.moshi:moshi-kotlin-codegen:${versions.moshi}" @@ -19,32 +20,3 @@ dependencies { testImplementation "org.mockito:mockito-core:${versions.mockito}" testImplementation "com.google.truth:truth:${versions.truth}" } - -android { - compileSdkVersion buildConfig.compileSdk - buildToolsVersion buildConfig.buildTools - - defaultConfig { - minSdkVersion buildConfig.minSdk - } - - buildTypes { - debug { - testCoverageEnabled rootProject.testCoverage - } - } - - lintOptions { - abortOnError false - lintConfig file("$rootProject.projectDir/config/lint/lint.xml") - } - - compileOptions { - sourceCompatibility javaVersion - targetCompatibility javaVersion - } - - kotlinOptions { - jvmTarget = kotlinJvmVersion - } -} diff --git a/backend/demo/src/main/AndroidManifest.xml b/backend/demo/src/main/AndroidManifest.xml deleted file mode 100644 index d9551f0716..0000000000 --- a/backend/demo/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/backend/imap/build.gradle b/backend/imap/build.gradle index a854f9234c..80388aa67c 100644 --- a/backend/imap/build.gradle +++ b/backend/imap/build.gradle @@ -1,8 +1,10 @@ -apply plugin: 'com.android.library' -apply plugin: 'org.jetbrains.kotlin.android' +apply plugin: 'java-library' +apply plugin: 'kotlin' +apply plugin: 'com.android.lint' -if (rootProject.testCoverage) { - apply plugin: 'jacoco' +java { + sourceCompatibility = javaVersion + targetCompatibility = javaVersion } dependencies { @@ -11,7 +13,6 @@ dependencies { api project(":mail:protocols:smtp") implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${versions.kotlinCoroutines}" - implementation "com.jakewharton.timber:timber:${versions.timber}" testImplementation project(":mail:testing") testImplementation project(":backend:testing") @@ -21,32 +22,3 @@ dependencies { testImplementation "com.google.truth:truth:${versions.truth}" testImplementation "org.apache.james:apache-mime4j-dom:${versions.mime4j}" } - -android { - compileSdkVersion buildConfig.compileSdk - buildToolsVersion buildConfig.buildTools - - defaultConfig { - minSdkVersion buildConfig.minSdk - } - - buildTypes { - debug { - testCoverageEnabled rootProject.testCoverage - } - } - - lintOptions { - abortOnError false - lintConfig file("$rootProject.projectDir/config/lint/lint.xml") - } - - compileOptions { - sourceCompatibility javaVersion - targetCompatibility javaVersion - } - - kotlinOptions { - jvmTarget = kotlinJvmVersion - } -} diff --git a/backend/imap/src/main/AndroidManifest.xml b/backend/imap/src/main/AndroidManifest.xml deleted file mode 100644 index f987abbd17..0000000000 --- a/backend/imap/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/backend/imap/src/main/java/com/fsck/k9/backend/imap/CommandExpunge.kt b/backend/imap/src/main/java/com/fsck/k9/backend/imap/CommandExpunge.kt index 4658731509..1b9178c902 100644 --- a/backend/imap/src/main/java/com/fsck/k9/backend/imap/CommandExpunge.kt +++ b/backend/imap/src/main/java/com/fsck/k9/backend/imap/CommandExpunge.kt @@ -1,8 +1,8 @@ package com.fsck.k9.backend.imap +import com.fsck.k9.logging.Timber import com.fsck.k9.mail.store.imap.ImapStore import com.fsck.k9.mail.store.imap.OpenMode -import timber.log.Timber internal class CommandExpunge(private val imapStore: ImapStore) { 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 54559f7475..c3b92903aa 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 @@ -1,10 +1,10 @@ package com.fsck.k9.backend.imap +import com.fsck.k9.logging.Timber import com.fsck.k9.mail.MessagingException import com.fsck.k9.mail.store.imap.ImapFolder import com.fsck.k9.mail.store.imap.ImapStore import com.fsck.k9.mail.store.imap.OpenMode -import timber.log.Timber internal class CommandMoveOrCopyMessages(private val imapStore: ImapStore) { diff --git a/backend/imap/src/main/java/com/fsck/k9/backend/imap/ImapBackendPusher.kt b/backend/imap/src/main/java/com/fsck/k9/backend/imap/ImapBackendPusher.kt index 96c68da54e..f08c4a88b5 100644 --- a/backend/imap/src/main/java/com/fsck/k9/backend/imap/ImapBackendPusher.kt +++ b/backend/imap/src/main/java/com/fsck/k9/backend/imap/ImapBackendPusher.kt @@ -2,6 +2,7 @@ package com.fsck.k9.backend.imap import com.fsck.k9.backend.api.BackendPusher import com.fsck.k9.backend.api.BackendPusherCallback +import com.fsck.k9.logging.Timber import com.fsck.k9.mail.AuthenticationFailedException import com.fsck.k9.mail.MessagingException import com.fsck.k9.mail.power.PowerManager @@ -14,9 +15,7 @@ import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.cancel -import kotlinx.coroutines.flow.collect import kotlinx.coroutines.launch -import timber.log.Timber private const val IO_ERROR_TIMEOUT = 5 * 60 * 1000L private const val UNEXPECTED_ERROR_TIMEOUT = 60 * 60 * 1000L diff --git a/backend/imap/src/main/java/com/fsck/k9/backend/imap/ImapFolderPusher.kt b/backend/imap/src/main/java/com/fsck/k9/backend/imap/ImapFolderPusher.kt index f9c4c4516b..ef3ffe0320 100644 --- a/backend/imap/src/main/java/com/fsck/k9/backend/imap/ImapFolderPusher.kt +++ b/backend/imap/src/main/java/com/fsck/k9/backend/imap/ImapFolderPusher.kt @@ -1,5 +1,6 @@ package com.fsck.k9.backend.imap +import com.fsck.k9.logging.Timber import com.fsck.k9.mail.power.PowerManager import com.fsck.k9.mail.store.imap.IdleRefreshManager import com.fsck.k9.mail.store.imap.IdleRefreshTimeoutProvider @@ -7,7 +8,6 @@ import com.fsck.k9.mail.store.imap.IdleResult import com.fsck.k9.mail.store.imap.ImapFolderIdler import com.fsck.k9.mail.store.imap.ImapStore import kotlin.concurrent.thread -import timber.log.Timber /** * Listens for changes to an IMAP folder in a dedicated thread. 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 8b67a6ea0d..1d62f180d8 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 @@ -7,6 +7,7 @@ import com.fsck.k9.backend.api.SyncConfig import com.fsck.k9.backend.api.SyncConfig.ExpungePolicy import com.fsck.k9.backend.api.SyncListener import com.fsck.k9.helper.ExceptionHelper +import com.fsck.k9.logging.Timber import com.fsck.k9.mail.AuthenticationFailedException import com.fsck.k9.mail.BodyFactory import com.fsck.k9.mail.DefaultBodyFactory @@ -23,7 +24,6 @@ import java.util.Collections import java.util.Date import java.util.concurrent.atomic.AtomicInteger import kotlin.math.max -import timber.log.Timber internal class ImapSync( private val accountName: String, diff --git a/backend/jmap/build.gradle b/backend/jmap/build.gradle index 344412a661..6f5416753e 100644 --- a/backend/jmap/build.gradle +++ b/backend/jmap/build.gradle @@ -1,9 +1,11 @@ -apply plugin: 'com.android.library' -apply plugin: 'org.jetbrains.kotlin.android' +apply plugin: 'java-library' +apply plugin: 'kotlin' apply plugin: 'kotlin-kapt' +apply plugin: 'com.android.lint' -if (rootProject.testCoverage) { - apply plugin: 'jacoco' +java { + sourceCompatibility = javaVersion + targetCompatibility = javaVersion } dependencies { @@ -11,7 +13,6 @@ dependencies { api "com.squareup.okhttp3:okhttp:${versions.okhttp}" implementation "rs.ltt.jmap:jmap-client:0.3.1" - implementation "com.jakewharton.timber:timber:${versions.timber}" implementation "com.squareup.moshi:moshi:${versions.moshi}" kapt "com.squareup.moshi:moshi-kotlin-codegen:${versions.moshi}" @@ -20,32 +21,3 @@ dependencies { testImplementation "org.mockito:mockito-core:${versions.mockito}" testImplementation("com.squareup.okhttp3:mockwebserver:${versions.okhttp}") } - -android { - compileSdkVersion buildConfig.compileSdk - buildToolsVersion buildConfig.buildTools - - defaultConfig { - minSdkVersion buildConfig.minSdk - } - - buildTypes { - debug { - testCoverageEnabled rootProject.testCoverage - } - } - - lintOptions { - abortOnError false - lintConfig file("$rootProject.projectDir/config/lint/lint.xml") - } - - compileOptions { - sourceCompatibility javaVersion - targetCompatibility javaVersion - } - - kotlinOptions { - jvmTarget = kotlinJvmVersion - } -} diff --git a/backend/jmap/src/main/AndroidManifest.xml b/backend/jmap/src/main/AndroidManifest.xml deleted file mode 100644 index 82de6eb7f4..0000000000 --- a/backend/jmap/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandDelete.kt b/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandDelete.kt index f6c1564c5b..0db6100f6d 100644 --- a/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandDelete.kt +++ b/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandDelete.kt @@ -1,5 +1,6 @@ package com.fsck.k9.backend.jmap +import com.fsck.k9.logging.Timber import rs.ltt.jmap.client.JmapClient import rs.ltt.jmap.common.Request.Invocation.ResultReference import rs.ltt.jmap.common.entity.filter.EmailFilterCondition @@ -7,7 +8,6 @@ import rs.ltt.jmap.common.method.call.email.QueryEmailMethodCall import rs.ltt.jmap.common.method.call.email.SetEmailMethodCall import rs.ltt.jmap.common.method.response.email.QueryEmailMethodResponse import rs.ltt.jmap.common.method.response.email.SetEmailMethodResponse -import timber.log.Timber class CommandDelete( private val jmapClient: JmapClient, diff --git a/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandMove.kt b/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandMove.kt index 086ac5b22f..f45461c64a 100644 --- a/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandMove.kt +++ b/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandMove.kt @@ -1,10 +1,10 @@ package com.fsck.k9.backend.jmap +import com.fsck.k9.logging.Timber import rs.ltt.jmap.client.JmapClient import rs.ltt.jmap.common.method.call.email.SetEmailMethodCall import rs.ltt.jmap.common.method.response.email.SetEmailMethodResponse import rs.ltt.jmap.common.util.Patches -import timber.log.Timber class CommandMove( private val jmapClient: JmapClient, diff --git a/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandSetFlag.kt b/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandSetFlag.kt index 3dfd648cde..1a1646337e 100644 --- a/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandSetFlag.kt +++ b/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandSetFlag.kt @@ -1,5 +1,6 @@ package com.fsck.k9.backend.jmap +import com.fsck.k9.logging.Timber import com.fsck.k9.mail.Flag import rs.ltt.jmap.client.JmapClient import rs.ltt.jmap.common.entity.filter.EmailFilterCondition @@ -8,7 +9,6 @@ import rs.ltt.jmap.common.method.call.email.SetEmailMethodCall import rs.ltt.jmap.common.method.response.email.QueryEmailMethodResponse import rs.ltt.jmap.common.method.response.email.SetEmailMethodResponse import rs.ltt.jmap.common.util.Patches -import timber.log.Timber class CommandSetFlag( private val jmapClient: JmapClient, diff --git a/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandSync.kt b/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandSync.kt index 2c26dc30e3..876d3b8ef6 100644 --- a/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandSync.kt +++ b/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandSync.kt @@ -4,6 +4,7 @@ import com.fsck.k9.backend.api.BackendFolder import com.fsck.k9.backend.api.BackendStorage import com.fsck.k9.backend.api.SyncConfig import com.fsck.k9.backend.api.SyncListener +import com.fsck.k9.logging.Timber import com.fsck.k9.mail.AuthenticationFailedException import com.fsck.k9.mail.Flag import com.fsck.k9.mail.MessageDownloadState @@ -26,7 +27,6 @@ import rs.ltt.jmap.common.method.call.email.QueryEmailMethodCall import rs.ltt.jmap.common.method.response.email.GetEmailMethodResponse import rs.ltt.jmap.common.method.response.email.QueryChangesEmailMethodResponse import rs.ltt.jmap.common.method.response.email.QueryEmailMethodResponse -import timber.log.Timber class CommandSync( private val backendStorage: BackendStorage, diff --git a/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandUpload.kt b/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandUpload.kt index 2b76767569..89da6e6f41 100644 --- a/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandUpload.kt +++ b/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/CommandUpload.kt @@ -1,5 +1,6 @@ package com.fsck.k9.backend.jmap +import com.fsck.k9.logging.Timber import com.fsck.k9.mail.Message import com.fsck.k9.mail.MessagingException import com.squareup.moshi.Moshi @@ -14,7 +15,6 @@ import rs.ltt.jmap.client.http.HttpAuthentication import rs.ltt.jmap.common.entity.EmailImport import rs.ltt.jmap.common.method.call.email.ImportEmailMethodCall import rs.ltt.jmap.common.method.response.email.ImportEmailMethodResponse -import timber.log.Timber class CommandUpload( private val jmapClient: JmapClient, diff --git a/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/JmapAccountDiscovery.kt b/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/JmapAccountDiscovery.kt index 5a4946d4a3..c3f4bf8a94 100644 --- a/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/JmapAccountDiscovery.kt +++ b/backend/jmap/src/main/java/com/fsck/k9/backend/jmap/JmapAccountDiscovery.kt @@ -1,11 +1,11 @@ package com.fsck.k9.backend.jmap +import com.fsck.k9.logging.Timber import java.net.UnknownHostException import rs.ltt.jmap.client.JmapClient import rs.ltt.jmap.client.api.EndpointNotFoundException import rs.ltt.jmap.client.api.UnauthorizedException import rs.ltt.jmap.common.entity.capability.MailAccountCapability -import timber.log.Timber class JmapAccountDiscovery { fun discover(emailAddress: String, password: String): JmapDiscoveryResult { diff --git a/backend/pop3/build.gradle b/backend/pop3/build.gradle index fb58ae2aca..8bd73c72cb 100644 --- a/backend/pop3/build.gradle +++ b/backend/pop3/build.gradle @@ -1,8 +1,10 @@ -apply plugin: 'com.android.library' -apply plugin: 'org.jetbrains.kotlin.android' +apply plugin: 'java-library' +apply plugin: 'kotlin' +apply plugin: 'com.android.lint' -if (rootProject.testCoverage) { - apply plugin: 'jacoco' +java { + sourceCompatibility = javaVersion + targetCompatibility = javaVersion } dependencies { @@ -10,38 +12,7 @@ dependencies { api project(":mail:protocols:pop3") api project(":mail:protocols:smtp") - implementation "com.jakewharton.timber:timber:${versions.timber}" - testImplementation project(":mail:testing") testImplementation "junit:junit:${versions.junit}" testImplementation "org.mockito:mockito-core:${versions.mockito}" } - -android { - compileSdkVersion buildConfig.compileSdk - buildToolsVersion buildConfig.buildTools - - defaultConfig { - minSdkVersion buildConfig.minSdk - } - - buildTypes { - debug { - testCoverageEnabled rootProject.testCoverage - } - } - - lintOptions { - abortOnError false - lintConfig file("$rootProject.projectDir/config/lint/lint.xml") - } - - compileOptions { - sourceCompatibility javaVersion - targetCompatibility javaVersion - } - - kotlinOptions { - jvmTarget = kotlinJvmVersion - } -} diff --git a/backend/pop3/src/main/AndroidManifest.xml b/backend/pop3/src/main/AndroidManifest.xml deleted file mode 100644 index f2d8069189..0000000000 --- a/backend/pop3/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/backend/pop3/src/main/java/com/fsck/k9/backend/pop3/Pop3Sync.java b/backend/pop3/src/main/java/com/fsck/k9/backend/pop3/Pop3Sync.java index 136364eba2..3ba740fb32 100644 --- a/backend/pop3/src/main/java/com/fsck/k9/backend/pop3/Pop3Sync.java +++ b/backend/pop3/src/main/java/com/fsck/k9/backend/pop3/Pop3Sync.java @@ -7,6 +7,7 @@ import com.fsck.k9.backend.api.BackendStorage; import com.fsck.k9.backend.api.SyncConfig; import com.fsck.k9.backend.api.SyncListener; import com.fsck.k9.helper.ExceptionHelper; +import com.fsck.k9.logging.Timber; import com.fsck.k9.mail.AuthenticationFailedException; import com.fsck.k9.mail.FetchProfile; import com.fsck.k9.mail.Flag; @@ -26,8 +27,6 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; -import timber.log.Timber; - class Pop3Sync { private static final String EXTRA_LATEST_OLD_MESSAGE_SEEN_TIME = "latestOldMessageSeenTime"; diff --git a/backend/testing/build.gradle b/backend/testing/build.gradle index 85e01489be..38dbc9e21f 100644 --- a/backend/testing/build.gradle +++ b/backend/testing/build.gradle @@ -1,31 +1,15 @@ -apply plugin: 'com.android.library' -apply plugin: 'org.jetbrains.kotlin.android' +apply plugin: 'java-library' +apply plugin: 'kotlin' +apply plugin: 'com.android.lint' + +java { + sourceCompatibility = javaVersion + targetCompatibility = javaVersion +} dependencies { implementation project(":backend:api") + implementation "com.squareup.okio:okio:${versions.okio}" implementation "junit:junit:${versions.junit}" } - -android { - compileSdkVersion buildConfig.compileSdk - buildToolsVersion buildConfig.buildTools - - defaultConfig { - minSdkVersion buildConfig.minSdk - } - - lintOptions { - abortOnError false - lintConfig file("$rootProject.projectDir/config/lint/lint.xml") - } - - compileOptions { - sourceCompatibility javaVersion - targetCompatibility javaVersion - } - - kotlinOptions { - jvmTarget = kotlinJvmVersion - } -} diff --git a/backend/testing/src/main/AndroidManifest.xml b/backend/testing/src/main/AndroidManifest.xml deleted file mode 100644 index 5c32387bbf..0000000000 --- a/backend/testing/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/backend/webdav/build.gradle b/backend/webdav/build.gradle index b4801f3032..02cb2a8085 100644 --- a/backend/webdav/build.gradle +++ b/backend/webdav/build.gradle @@ -1,49 +1,17 @@ -apply plugin: 'com.android.library' -apply plugin: 'org.jetbrains.kotlin.android' +apply plugin: 'java-library' +apply plugin: 'kotlin' +apply plugin: 'com.android.lint' -if (rootProject.testCoverage) { - apply plugin: 'jacoco' +java { + sourceCompatibility = javaVersion + targetCompatibility = javaVersion } dependencies { api project(":backend:api") api project(":mail:protocols:webdav") - implementation "com.jakewharton.timber:timber:${versions.timber}" - testImplementation project(":mail:testing") testImplementation "junit:junit:${versions.junit}" testImplementation "org.mockito:mockito-core:${versions.mockito}" } - -android { - compileSdkVersion buildConfig.compileSdk - buildToolsVersion buildConfig.buildTools - - defaultConfig { - minSdkVersion buildConfig.minSdk - } - - // for using Apache HTTP Client - useLibrary 'org.apache.http.legacy' - - buildTypes { - debug { - testCoverageEnabled rootProject.testCoverage - } - } - - lintOptions { - abortOnError false - lintConfig file("$rootProject.projectDir/config/lint/lint.xml") - } - - compileOptions { - sourceCompatibility javaVersion - targetCompatibility javaVersion - } - - kotlinOptions { - jvmTarget = kotlinJvmVersion - } -} diff --git a/backend/webdav/src/main/java/com/fsck/k9/backend/webdav/CommandMoveOrCopyMessages.java b/backend/webdav/src/main/java/com/fsck/k9/backend/webdav/CommandMoveOrCopyMessages.java index 1afa7a12a5..b6638c8c38 100644 --- a/backend/webdav/src/main/java/com/fsck/k9/backend/webdav/CommandMoveOrCopyMessages.java +++ b/backend/webdav/src/main/java/com/fsck/k9/backend/webdav/CommandMoveOrCopyMessages.java @@ -6,12 +6,12 @@ import java.util.Collection; import java.util.List; import java.util.Map; +import com.fsck.k9.logging.Timber; import com.fsck.k9.mail.MessagingException; import com.fsck.k9.mail.store.webdav.WebDavFolder; import com.fsck.k9.mail.store.webdav.WebDavMessage; import com.fsck.k9.mail.store.webdav.WebDavStore; import org.jetbrains.annotations.NotNull; -import timber.log.Timber; class CommandMoveOrCopyMessages { diff --git a/backend/webdav/src/main/java/com/fsck/k9/backend/webdav/WebDavBackend.kt b/backend/webdav/src/main/java/com/fsck/k9/backend/webdav/WebDavBackend.kt index e0321d60a0..6e855653a5 100644 --- a/backend/webdav/src/main/java/com/fsck/k9/backend/webdav/WebDavBackend.kt +++ b/backend/webdav/src/main/java/com/fsck/k9/backend/webdav/WebDavBackend.kt @@ -6,6 +6,7 @@ import com.fsck.k9.backend.api.BackendPusherCallback import com.fsck.k9.backend.api.BackendStorage import com.fsck.k9.backend.api.SyncConfig import com.fsck.k9.backend.api.SyncListener +import com.fsck.k9.logging.Timber import com.fsck.k9.mail.BodyFactory import com.fsck.k9.mail.Flag import com.fsck.k9.mail.Message @@ -13,7 +14,6 @@ import com.fsck.k9.mail.MessagingException import com.fsck.k9.mail.Part import com.fsck.k9.mail.store.webdav.WebDavStore import com.fsck.k9.mail.transport.WebDavTransport -import timber.log.Timber class WebDavBackend( accountName: String, diff --git a/backend/webdav/src/main/java/com/fsck/k9/backend/webdav/WebDavSync.java b/backend/webdav/src/main/java/com/fsck/k9/backend/webdav/WebDavSync.java index ca400431f3..e3bfff2030 100644 --- a/backend/webdav/src/main/java/com/fsck/k9/backend/webdav/WebDavSync.java +++ b/backend/webdav/src/main/java/com/fsck/k9/backend/webdav/WebDavSync.java @@ -1,12 +1,23 @@ package com.fsck.k9.backend.webdav; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.atomic.AtomicInteger; + import com.fsck.k9.backend.api.BackendFolder; import com.fsck.k9.backend.api.BackendFolder.MoreMessages; import com.fsck.k9.backend.api.BackendStorage; import com.fsck.k9.backend.api.SyncConfig; import com.fsck.k9.backend.api.SyncListener; import com.fsck.k9.helper.ExceptionHelper; +import com.fsck.k9.logging.Timber; import com.fsck.k9.mail.AuthenticationFailedException; import com.fsck.k9.mail.FetchProfile; import com.fsck.k9.mail.Flag; @@ -17,18 +28,6 @@ import com.fsck.k9.mail.store.webdav.WebDavFolder; import com.fsck.k9.mail.store.webdav.WebDavMessage; import com.fsck.k9.mail.store.webdav.WebDavStore; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.atomic.AtomicInteger; - -import timber.log.Timber; - class WebDavSync { private final String accountName; -- GitLab From c141c338af50c2f157c510cd6d1aae15a86823cc Mon Sep 17 00:00:00 2001 From: Sandelinos <3103376-Sandelinos@users.noreply.gitlab.com> Date: Sun, 18 Sep 2022 23:46:29 +0300 Subject: [PATCH 03/26] Add monochrome icon --- .../res/drawable/ic_launcher_monochrome.xml | 70 +++++++++ .../res/mipmap-anydpi-v26/ic_launcher.xml | 1 + .../drawable-src/ic_launcher_monochrome.svg | 133 ++++++++++++++++++ 3 files changed, 204 insertions(+) create mode 100644 app/ui/legacy/src/main/res/drawable/ic_launcher_monochrome.xml create mode 100644 images/drawable-src/ic_launcher_monochrome.svg diff --git a/app/ui/legacy/src/main/res/drawable/ic_launcher_monochrome.xml b/app/ui/legacy/src/main/res/drawable/ic_launcher_monochrome.xml new file mode 100644 index 0000000000..7ff75784ea --- /dev/null +++ b/app/ui/legacy/src/main/res/drawable/ic_launcher_monochrome.xml @@ -0,0 +1,70 @@ + + + + + + + + + + diff --git a/app/ui/legacy/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/ui/legacy/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index fb75445d16..df4ae3c1a3 100644 --- a/app/ui/legacy/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/app/ui/legacy/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -4,4 +4,5 @@ + \ No newline at end of file diff --git a/images/drawable-src/ic_launcher_monochrome.svg b/images/drawable-src/ic_launcher_monochrome.svg new file mode 100644 index 0000000000..9fc60f1de9 --- /dev/null +++ b/images/drawable-src/ic_launcher_monochrome.svg @@ -0,0 +1,133 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + -- GitLab From 2edf42f9f8179d248feef3609fa16f946eabade3 Mon Sep 17 00:00:00 2001 From: cketti Date: Mon, 12 Sep 2022 20:41:34 +0200 Subject: [PATCH 04/26] Switch message list from `ListView` to `RecyclerView` --- .../fsck/k9/fragment/MessageListAdapter.kt | 214 +++++++++++++++--- .../fsck/k9/fragment/MessageListFragment.kt | 172 ++++---------- .../fsck/k9/fragment/MessageListHandler.java | 2 +- .../com/fsck/k9/fragment/MessageViewHolder.kt | 9 +- .../message_list_item_footer_background.xml | 12 - .../main/res/layout/message_list_fragment.xml | 9 +- .../src/main/res/layout/message_list_item.xml | 1 + .../res/layout/message_list_item_footer.xml | 3 +- app/ui/legacy/src/main/res/values/attrs.xml | 1 + app/ui/legacy/src/main/res/values/colors.xml | 2 - app/ui/legacy/src/main/res/values/themes.xml | 14 +- .../k9/fragment/MessageListAdapterTest.kt | 5 +- 12 files changed, 256 insertions(+), 188 deletions(-) delete mode 100644 app/ui/legacy/src/main/res/drawable/message_list_item_footer_background.xml diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt index 30cd1418bb..0704a1fd0f 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt @@ -1,9 +1,8 @@ package com.fsck.k9.fragment -import android.content.Context +import android.annotation.SuppressLint import android.content.res.Resources import android.content.res.Resources.Theme -import android.graphics.Color import android.graphics.Typeface import android.graphics.drawable.Drawable import android.text.Spannable @@ -14,12 +13,15 @@ import android.text.style.StyleSpan import android.view.LayoutInflater import android.view.View import android.view.View.OnClickListener +import android.view.View.OnLongClickListener import android.view.ViewGroup -import android.widget.BaseAdapter import android.widget.ImageView import android.widget.TextView import androidx.core.graphics.drawable.DrawableCompat import androidx.core.view.isVisible +import androidx.recyclerview.widget.DiffUtil +import androidx.recyclerview.widget.RecyclerView +import androidx.recyclerview.widget.RecyclerView.NO_POSITION import com.fsck.k9.FontSizes import com.fsck.k9.contacts.ContactPictureLoader import com.fsck.k9.controller.MessageReference @@ -32,8 +34,12 @@ import com.fsck.k9.ui.resolveColorAttribute import com.fsck.k9.ui.resolveDrawableAttribute import kotlin.math.max +private const val FOOTER_ID = 1L + +private const val TYPE_MESSAGE = 0 +private const val TYPE_FOOTER = 1 + class MessageListAdapter internal constructor( - private val context: Context, theme: Theme, private val res: Resources, private val layoutInflater: LayoutInflater, @@ -41,7 +47,7 @@ class MessageListAdapter internal constructor( private val listItemListener: MessageListItemActionListener, private val appearance: MessageListAppearance, private val relativeDateTimeFormatter: RelativeDateTimeFormatter -) : BaseAdapter() { +) : RecyclerView.Adapter() { private val forwardedIcon: Drawable = theme.resolveDrawableAttribute(R.attr.messageListForwarded) private val answeredIcon: Drawable = theme.resolveDrawableAttribute(R.attr.messageListAnswered) @@ -49,11 +55,15 @@ class MessageListAdapter internal constructor( private val previewTextColor: Int = theme.resolveColorAttribute(R.attr.messageListPreviewTextColor) private val activeItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListActiveItemBackgroundColor) private val selectedItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListSelectedBackgroundColor) + private val regularItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListUnreadItemBackgroundColor) private val readItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListReadItemBackgroundColor) private val unreadItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListUnreadItemBackgroundColor) var messages: List = emptyList() + @SuppressLint("NotifyDataSetChanged") set(value) { + val oldMessageList = field + field = value messagesMap = value.associateBy { it.uniqueId } @@ -62,18 +72,57 @@ class MessageListAdapter internal constructor( selected = selected.intersect(uniqueIds) } - notifyDataSetChanged() + if (oldMessageList.isEmpty()) { + // While loading, only the footer view is showing. If we used DiffUtil, the footer view would be used as + // anchor element and the updated list would be scrolled all the way down. + notifyDataSetChanged() + } else { + val diffResult = DiffUtil.calculateDiff( + MessageListDiffCallback(oldMessageList = oldMessageList, newMessageList = value) + ) + diffResult.dispatchUpdatesTo(this) + } } private var messagesMap = emptyMap() var activeMessage: MessageReference? = null + set(value) { + if (value == field) return + + val oldPosition = getPosition(field) + val newPosition = getPosition(value) + + field = value + + oldPosition?.let { position -> notifyItemChanged(position) } + newPosition?.let { position -> notifyItemChanged(position) } + } var selected: Set = emptySet() private set(value) { + if (value == field) return + + // Selection removed + field.asSequence() + .filter { uniqueId -> uniqueId !in value } + .mapNotNull { uniqueId -> messagesMap[uniqueId] } + .mapNotNull { messageListItem -> getPosition(messageListItem) } + .forEach { position -> + notifyItemChanged(position) + } + + // Selection added + value.asSequence() + .filter { uniqueId -> uniqueId !in field } + .mapNotNull { uniqueId -> messagesMap[uniqueId] } + .mapNotNull { messageListItem -> getPosition(messageListItem) } + .forEach { position -> + notifyItemChanged(position) + } + field = value selectedCount = calculateSelectionCount() - notifyDataSetChanged() } val selectedMessages: List @@ -85,6 +134,29 @@ class MessageListAdapter internal constructor( var selectedCount: Int = 0 private set + var footerText: String? = null + set(value) { + if (field == value) return + + val hadFooterText = field != null + field = value + + if (hadFooterText) { + notifyItemChanged(footerPosition) + } else { + notifyItemInserted(footerPosition) + } + } + + private val hasFooter: Boolean + get() = footerText != null + + private val lastMessagePosition: Int + get() = messages.lastIndex + + private val footerPosition: Int + get() = if (hasFooter) lastMessagePosition + 1 else NO_POSITION + private inline val subjectViewFontSize: Int get() = if (appearance.senderAboveSubject) { appearance.fontSizes.messageListSender @@ -92,34 +164,59 @@ class MessageListAdapter internal constructor( appearance.fontSizes.messageListSubject } + private val messageClickedListener = OnClickListener { view: View -> + val messageListItem = getItemFromView(view) + listItemListener.onMessageClicked(messageListItem) + } + + private val messageLongClickedListener = OnLongClickListener { view: View -> + val messageListItem = getItemFromView(view) + listItemListener.onToggleMessageSelection(messageListItem) + true + } + + private val footerClickListener = OnClickListener { + listItemListener.onFooterClicked() + } + private val flagClickListener = OnClickListener { view: View -> - val messageViewHolder = view.tag as MessageViewHolder - val messageListItem = getItemById(messageViewHolder.uniqueId) + val messageListItem = getItemFromView(view) listItemListener.onToggleMessageFlag(messageListItem) } private val contactPictureClickListener = OnClickListener { view: View -> val parentView = view.parent.parent as View - val messageViewHolder = parentView.tag as MessageViewHolder - val messageListItem = getItemById(messageViewHolder.uniqueId) + val messageListItem = getItemFromView(parentView) listItemListener.onToggleMessageSelection(messageListItem) } + init { + setHasStableIds(true) + } + private fun recipientSigil(toMe: Boolean, ccMe: Boolean) = when { toMe -> res.getString(R.string.messagelist_sent_to_me_sigil) + " " ccMe -> res.getString(R.string.messagelist_sent_cc_me_sigil) + " " else -> "" } - override fun hasStableIds(): Boolean = true + override fun getItemCount(): Int = messages.size + if (hasFooter) 1 else 0 - override fun getCount(): Int = messages.size + override fun getItemId(position: Int): Long { + return if (position <= lastMessagePosition) { + messages[position].uniqueId + } else { + FOOTER_ID + } + } - override fun getItemId(position: Int): Long = messages[position].uniqueId + override fun getItemViewType(position: Int): Int { + return if (position <= lastMessagePosition) TYPE_MESSAGE else TYPE_FOOTER + } - override fun getItem(position: Int): MessageListItem = messages[position] + private fun getItem(position: Int): MessageListItem = messages[position] - private fun getItemById(uniqueId: Long): MessageListItem { + fun getItemById(uniqueId: Long): MessageListItem { return messagesMap[uniqueId]!! } @@ -135,16 +232,26 @@ class MessageListAdapter internal constructor( return messages.indexOf(messageListItem).takeIf { it != -1 } } - override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View { - val message = getItem(position) - val view: View = convertView ?: newView(parent) - bindView(view, context, message) + private fun getPosition(messageReference: MessageReference?): Int? { + if (messageReference == null) return null - return view + return messages.indexOfFirst { + messageReference.equals(it.account.uuid, it.folderId, it.messageUid) + }.takeIf { it != -1 } } - private fun newView(parent: ViewGroup?): View { + override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MessageListViewHolder { + return when (viewType) { + TYPE_MESSAGE -> createMessageViewHolder(parent) + TYPE_FOOTER -> createFooterViewHolder(parent) + else -> error("Unsupported type: $viewType") + } + } + + private fun createMessageViewHolder(parent: ViewGroup?): MessageViewHolder { val view = layoutInflater.inflate(R.layout.message_list_item, parent, false) + view.setOnClickListener(messageClickedListener) + view.setOnLongClickListener(messageLongClickedListener) val holder = MessageViewHolder(view) @@ -168,14 +275,33 @@ class MessageListAdapter internal constructor( view.tag = holder - return view + return holder } - private fun bindView(view: View, context: Context, message: MessageListItem) { - val isSelected = selected.contains(message.uniqueId) - val isActive = isActiveMessage(message) + private fun createFooterViewHolder(parent: ViewGroup): MessageListViewHolder { + val view = layoutInflater.inflate(R.layout.message_list_item_footer, parent, false) + view.setOnClickListener(footerClickListener) + return FooterViewHolder(view) + } - val holder = view.tag as MessageViewHolder + override fun onBindViewHolder(holder: MessageListViewHolder, position: Int) { + when (val viewType = getItemViewType(position)) { + TYPE_MESSAGE -> { + val messageListItem = getItem(position) + bindMessageViewHolder(holder as MessageViewHolder, messageListItem) + } + TYPE_FOOTER -> { + bindFooterViewHolder(holder as FooterViewHolder) + } + else -> { + error("Unsupported type: $viewType") + } + } + } + + private fun bindMessageViewHolder(holder: MessageViewHolder, messageListItem: MessageListItem) { + val isSelected = selected.contains(messageListItem.uniqueId) + val isActive = isActiveMessage(messageListItem) if (appearance.showContactPicture) { if (isSelected) { @@ -187,7 +313,7 @@ class MessageListAdapter internal constructor( } } - with(message) { + with(messageListItem) { val maybeBoldTypeface = if (isRead) Typeface.NORMAL else Typeface.BOLD val displayDate = relativeDateTimeFormatter.formatDate(messageDate) val displayThreadCount = if (appearance.showingThreadedList) threadCount else 0 @@ -206,7 +332,7 @@ class MessageListAdapter internal constructor( if (appearance.showContactPicture && holder.contactPicture.isVisible) { setContactPicture(holder.contactPicture, displayAddress) } - setBackgroundColor(view, isSelected, isRead, isActive) + setBackgroundColor(holder.itemView, isSelected, isRead, isActive) updateWithThreadCount(holder, displayThreadCount) val beforePreviewText = if (appearance.senderAboveSubject) subject else displayName val sigil = recipientSigil(toMe, ccMe) @@ -240,6 +366,10 @@ class MessageListAdapter internal constructor( } } + private fun bindFooterViewHolder(holder: FooterViewHolder) { + holder.text.text = footerText + } + private fun formatPreviewText( preview: TextView, beforePreviewText: CharSequence, @@ -304,7 +434,7 @@ class MessageListAdapter internal constructor( selected -> selectedItemBackgroundColor backGroundAsReadIndicator && read -> readItemBackgroundColor backGroundAsReadIndicator && !read -> unreadItemBackgroundColor - else -> Color.TRANSPARENT + else -> regularItemBackgroundColor } view.setBackgroundColor(backgroundColor) @@ -388,9 +518,33 @@ class MessageListAdapter internal constructor( .filter { it.uniqueId in selected } .sumOf { it.threadCount.coerceAtLeast(1) } } + + private fun getItemFromView(view: View): MessageListItem { + val messageViewHolder = view.tag as MessageViewHolder + return getItemById(messageViewHolder.uniqueId) + } +} + +private class MessageListDiffCallback( + private val oldMessageList: List, + private val newMessageList: List +) : DiffUtil.Callback() { + override fun getOldListSize(): Int = oldMessageList.size + + override fun getNewListSize(): Int = newMessageList.size + + override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean { + return oldMessageList[oldItemPosition].uniqueId == newMessageList[newItemPosition].uniqueId + } + + override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean { + return oldMessageList[oldItemPosition] == newMessageList[newItemPosition] + } } interface MessageListItemActionListener { + fun onMessageClicked(messageListItem: MessageListItem) fun onToggleMessageSelection(item: MessageListItem) fun onToggleMessageFlag(item: MessageListItem) + fun onFooterClicked() } diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt index 061bd58d9b..b4f80984b9 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt @@ -11,15 +11,14 @@ import android.view.Menu import android.view.MenuItem import android.view.View import android.view.ViewGroup -import android.widget.AdapterView -import android.widget.AdapterView.OnItemClickListener -import android.widget.AdapterView.OnItemLongClickListener -import android.widget.ListView -import android.widget.TextView import android.widget.Toast import androidx.appcompat.view.ActionMode import androidx.core.os.bundleOf import androidx.fragment.app.Fragment +import androidx.recyclerview.widget.DefaultItemAnimator +import androidx.recyclerview.widget.DividerItemDecoration +import androidx.recyclerview.widget.LinearLayoutManager +import androidx.recyclerview.widget.RecyclerView import androidx.swiperefreshlayout.widget.SwipeRefreshLayout import com.fsck.k9.Account import com.fsck.k9.Account.Expunge @@ -63,8 +62,6 @@ private const val MAXIMUM_MESSAGE_SORT_OVERRIDES = 3 class MessageListFragment : Fragment(), - OnItemClickListener, - OnItemLongClickListener, ConfirmationDialogFragmentListener, MessageListItemActionListener { @@ -82,12 +79,9 @@ class MessageListFragment : private lateinit var fragmentListener: MessageListFragmentListener - private lateinit var listView: ListView + private lateinit var recyclerView: RecyclerView private lateinit var swipeRefreshLayout: SwipeRefreshLayout private lateinit var adapter: MessageListAdapter - private var footerView: View? = null - - private var savedListState: Parcelable? = null private lateinit var accountUuids: Array private var account: Account? = null @@ -118,6 +112,7 @@ class MessageListFragment : private set private var isSingleFolderMode = false private var isRemoteSearch = false + private var initialMessageListLoad = true private val isUnifiedInbox: Boolean get() = localSearch.id == SearchAccount.UNIFIED_INBOX @@ -173,7 +168,6 @@ class MessageListFragment : activeMessages = savedInstanceState.getStringArray(STATE_ACTIVE_MESSAGES)?.map { MessageReference.parse(it)!! } restoreSelectedMessages(savedInstanceState) isRemoteSearch = savedInstanceState.getBoolean(STATE_REMOTE_SEARCH_PERFORMED) - savedListState = savedInstanceState.getParcelable(STATE_MESSAGE_LIST) val messageReferenceString = savedInstanceState.getString(STATE_ACTIVE_MESSAGE) activeMessage = MessageReference.parse(messageReferenceString) } @@ -183,7 +177,7 @@ class MessageListFragment : } fun restoreListState(savedListState: Parcelable) { - listView.onRestoreInstanceState(savedListState) + recyclerView.layoutManager?.onRestoreInstanceState(savedListState) } private fun decodeArguments(): MessageListFragment? { @@ -223,7 +217,7 @@ class MessageListFragment : override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { return inflater.inflate(R.layout.message_list_fragment, container, false).apply { initializeSwipeRefreshLayout(this) - initializeListView(this) + initializeRecyclerView(this) } } @@ -240,16 +234,13 @@ class MessageListFragment : swipeRefreshLayout.isEnabled = false } - private fun initializeListView(view: View) { - listView = view.findViewById(R.id.message_list) - with(listView) { - scrollBarStyle = View.SCROLLBARS_INSIDE_OVERLAY - isLongClickable = true - isFastScrollEnabled = true - isVerticalFadingEdgeEnabled = false - isScrollingCacheEnabled = false - onItemClickListener = this@MessageListFragment - onItemLongClickListener = this@MessageListFragment + private fun initializeRecyclerView(view: View) { + recyclerView = view.findViewById(R.id.message_list) + + val itemDecoration = DividerItemDecoration(requireContext(), DividerItemDecoration.VERTICAL) + recyclerView.addItemDecoration(itemDecoration) + recyclerView.itemAnimator = DefaultItemAnimator().apply { + supportsChangeAnimations = false } } @@ -265,7 +256,6 @@ class MessageListFragment : private fun initializeMessageList() { adapter = MessageListAdapter( - context = requireContext(), theme = requireActivity().theme, res = resources, layoutInflater = layoutInflater, @@ -277,12 +267,7 @@ class MessageListFragment : adapter.activeMessage = activeMessage - if (isSingleFolderMode) { - listView.addFooterView(getFooterView(listView)) - updateFooter(null) - } - - listView.adapter = adapter + recyclerView.adapter = adapter } private fun initializeSortSettings() { @@ -315,10 +300,9 @@ class MessageListFragment : currentFolder?.let { if (it.databaseId == folderId) { it.loading = loading + updateFooterText() } } - - updateFooterView() } fun updateTitle() { @@ -372,16 +356,7 @@ class MessageListFragment : fragmentListener.setMessageListProgressEnabled(progress) } - override fun onItemClick(parent: AdapterView<*>?, view: View, position: Int, id: Long) { - if (view === footerView) { - handleFooterClick() - } else { - val messageListItem = adapter.getItem(position) - handleListItemClick(messageListItem) - } - } - - private fun handleFooterClick() { + override fun onFooterClicked() { val currentFolder = this.currentFolder ?: return if (currentFolder.moreMessages && !localSearch.isManualSearch) { @@ -400,7 +375,7 @@ class MessageListFragment : } else { extraSearchResults = null loadSearchResults = additionalSearchResults - updateFooter(null) + updateFooterText(null) } messagingController.loadSearchResults( @@ -412,7 +387,7 @@ class MessageListFragment : } } - private fun handleListItemClick(messageListItem: MessageListItem) { + override fun onMessageClicked(messageListItem: MessageListItem) { if (adapter.selectedCount > 0) { toggleMessageSelect(messageListItem) } else { @@ -424,28 +399,17 @@ class MessageListFragment : } } - override fun onItemLongClick(parent: AdapterView<*>?, view: View, position: Int, id: Long): Boolean { - if (view === footerView) return false - - val messageListItem = adapter.getItem(position) - toggleMessageSelect(messageListItem) - - return true - } - override fun onDestroyView() { if (isNewMessagesView && !requireActivity().isChangingConfigurations) { messagingController.clearNewMessages(account) } - savedListState = listView.onSaveInstanceState() super.onDestroyView() } override fun onSaveInstanceState(outState: Bundle) { super.onSaveInstanceState(outState) - saveListState(outState) outState.putLongArray(STATE_SELECTED_MESSAGES, adapter.selected.toLongArray()) outState.putBoolean(STATE_REMOTE_SEARCH_PERFORMED, isRemoteSearch) outState.putStringArray( @@ -457,15 +421,6 @@ class MessageListFragment : } } - private fun saveListState(outState: Bundle) { - if (savedListState != null) { - // The previously saved state was never restored, so just use that. - outState.putParcelable(STATE_MESSAGE_LIST, savedListState) - } else { - outState.putParcelable(STATE_MESSAGE_LIST, listView.onSaveInstanceState()) - } - } - private val messageListAppearance: MessageListAppearance get() = MessageListAppearance( fontSizes = K9.fontSizes, @@ -789,26 +744,15 @@ class MessageListFragment : messagingController.sendPendingMessages(account, null) } - private fun getFooterView(parent: ViewGroup?): View? { - return footerView ?: createFooterView(parent).also { footerView = it } - } - - private fun createFooterView(parent: ViewGroup?): View { - return layoutInflater.inflate(R.layout.message_list_item_footer, parent, false).apply { - tag = FooterViewHolder(this) - } - } - - private fun updateFooterView() { + private fun updateFooterText() { val currentFolder = this.currentFolder val account = this.account - if (localSearch.isManualSearch || currentFolder == null || account == null) { - updateFooter(null) - return - } - - val footerText = if (currentFolder.loading) { + val footerText = if (initialMessageListLoad) { + null + } else if (localSearch.isManualSearch || currentFolder == null || account == null) { + null + } else if (currentFolder.loading) { getString(R.string.status_loading_more) } else if (!currentFolder.moreMessages) { null @@ -818,24 +762,11 @@ class MessageListFragment : getString(R.string.load_more_messages_fmt, account.displayCount) } - updateFooter(footerText) + updateFooterText(footerText) } - fun updateFooter(text: String?) { - val footerView = this.footerView ?: return - - val shouldHideFooter = text == null - if (shouldHideFooter) { - listView.removeFooterView(footerView) - } else { - val isFooterViewAddedToListView = listView.footerViewsCount > 0 - if (!isFooterViewAddedToListView) { - listView.addFooterView(footerView) - } - } - - val holder = footerView.tag as FooterViewHolder - holder.main.text = text + fun updateFooterText(text: String?) { + adapter.footerText = text } private fun selectAll() { @@ -1193,25 +1124,11 @@ class MessageListFragment : } fun onMoveUp() { - var currentPosition = listView.selectedItemPosition - if (currentPosition == AdapterView.INVALID_POSITION || listView.isInTouchMode) { - currentPosition = listView.firstVisiblePosition - } - - if (currentPosition > 0) { - listView.setSelection(currentPosition - 1) - } + // FIXME } fun onMoveDown() { - var currentPosition = listView.selectedItemPosition - if (currentPosition == AdapterView.INVALID_POSITION || listView.isInTouchMode) { - currentPosition = listView.firstVisiblePosition - } - - if (currentPosition < listView.count) { - listView.setSelection(currentPosition + 1) - } + // FIXME } fun openMessage(messageReference: MessageReference) { @@ -1227,8 +1144,9 @@ class MessageListFragment : private val selectedMessageListItem: MessageListItem? get() { - val position = listView.selectedItemPosition - return if (position !in 0 until adapter.count) null else adapter.getItem(position) + val focusedView = recyclerView.focusedChild ?: return null + val viewHolder = recyclerView.findContainingViewHolder(focusedView) as? MessageViewHolder ?: return null + return adapter.getItemById(viewHolder.uniqueId) } private val selectedMessages: List @@ -1365,16 +1283,13 @@ class MessageListFragment : resetActionMode() computeBatchDirection() - if (savedListState != null) { - handler.restoreListPosition(savedListState) - savedListState = null - } - invalidateMenu() + initialMessageListLoad = false + currentFolder?.let { currentFolder -> currentFolder.moreMessages = messageListInfo.hasMoreMessages - updateFooterView() + updateFooterText() } } @@ -1416,7 +1331,6 @@ class MessageListFragment : // Redraw list immediately if (::adapter.isInitialized) { adapter.activeMessage = activeMessage - adapter.notifyDataSetChanged() if (messageReference != null) { scrollToMessage(messageReference) @@ -1459,8 +1373,11 @@ class MessageListFragment : val messageListItem = adapter.getItem(messageReference) ?: return val position = adapter.getPosition(messageListItem) ?: return - if (position <= listView.firstVisiblePosition || position >= listView.lastVisiblePosition) { - listView.smoothScrollToPosition(position) + val linearLayoutManager = recyclerView.layoutManager as LinearLayoutManager + val firstVisiblePosition = linearLayoutManager.findFirstCompletelyVisibleItemPosition() + val lastVisiblePosition = linearLayoutManager.findLastCompletelyVisibleItemPosition() + if (position !in firstVisiblePosition..lastVisiblePosition) { + recyclerView.smoothScrollToPosition(position) } } @@ -1836,10 +1753,6 @@ class MessageListFragment : } } - internal class FooterViewHolder(view: View) { - val main: TextView = view.findViewById(R.id.main_text) - } - private enum class FolderOperation { COPY, MOVE } @@ -1873,7 +1786,6 @@ class MessageListFragment : private const val STATE_ACTIVE_MESSAGES = "activeMessages" private const val STATE_ACTIVE_MESSAGE = "activeMessage" private const val STATE_REMOTE_SEARCH_PERFORMED = "remoteSearchPerformed" - private const val STATE_MESSAGE_LIST = "listState" fun newInstance(search: LocalSearch, isThreadDisplay: Boolean, threadedList: Boolean): MessageListFragment { return MessageListFragment().apply { diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListHandler.java b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListHandler.java index d62e7b138b..72252cf15f 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListHandler.java +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListHandler.java @@ -57,7 +57,7 @@ public class MessageListHandler extends Handler { public void run() { MessageListFragment fragment = mFragment.get(); if (fragment != null) { - fragment.updateFooter(message); + fragment.updateFooterText(message); } } }); diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt index d6487ab9b5..5e436a3c73 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageViewHolder.kt @@ -4,9 +4,12 @@ import android.view.View import android.widget.CheckBox import android.widget.ImageView import android.widget.TextView +import androidx.recyclerview.widget.RecyclerView.ViewHolder import com.fsck.k9.ui.R -class MessageViewHolder(view: View) { +sealed class MessageListViewHolder(view: View) : ViewHolder(view) + +class MessageViewHolder(view: View) : MessageListViewHolder(view) { var uniqueId: Long = -1L val selected: View = view.findViewById(R.id.selected) @@ -20,3 +23,7 @@ class MessageViewHolder(view: View) { val attachment: ImageView = view.findViewById(R.id.attachment) val status: ImageView = view.findViewById(R.id.status) } + +class FooterViewHolder(view: View) : MessageListViewHolder(view) { + val text: TextView = view.findViewById(R.id.main_text) +} diff --git a/app/ui/legacy/src/main/res/drawable/message_list_item_footer_background.xml b/app/ui/legacy/src/main/res/drawable/message_list_item_footer_background.xml deleted file mode 100644 index 6606c0bb5f..0000000000 --- a/app/ui/legacy/src/main/res/drawable/message_list_item_footer_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - diff --git a/app/ui/legacy/src/main/res/layout/message_list_fragment.xml b/app/ui/legacy/src/main/res/layout/message_list_fragment.xml index f4baa830a9..d5329bcc3a 100644 --- a/app/ui/legacy/src/main/res/layout/message_list_fragment.xml +++ b/app/ui/legacy/src/main/res/layout/message_list_fragment.xml @@ -1,18 +1,21 @@ - - diff --git a/app/ui/legacy/src/main/res/layout/message_list_item.xml b/app/ui/legacy/src/main/res/layout/message_list_item.xml index a6d1bce895..8b4fa3034a 100644 --- a/app/ui/legacy/src/main/res/layout/message_list_item.xml +++ b/app/ui/legacy/src/main/res/layout/message_list_item.xml @@ -4,6 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" + android:foreground="?attr/selectableItemBackground" android:orientation="horizontal" android:layout_gravity="center_vertical" tools:layout_height="?android:attr/listPreferredItemHeight" diff --git a/app/ui/legacy/src/main/res/layout/message_list_item_footer.xml b/app/ui/legacy/src/main/res/layout/message_list_item_footer.xml index bb118bf780..365aebdb6d 100644 --- a/app/ui/legacy/src/main/res/layout/message_list_item_footer.xml +++ b/app/ui/legacy/src/main/res/layout/message_list_item_footer.xml @@ -4,7 +4,8 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="?android:attr/listPreferredItemHeight" - android:background="@drawable/message_list_item_footer_background" + android:background="?attr/messageListRegularItemBackgroundColor" + android:foreground="?attr/selectableItemBackground" android:gravity="center" android:orientation="horizontal"> + diff --git a/app/ui/legacy/src/main/res/values/colors.xml b/app/ui/legacy/src/main/res/values/colors.xml index 5228d76811..a569d49d67 100644 --- a/app/ui/legacy/src/main/res/values/colors.xml +++ b/app/ui/legacy/src/main/res/values/colors.xml @@ -4,8 +4,6 @@ #444444 - #eeeeee - #888 #f44336 #7bad45 diff --git a/app/ui/legacy/src/main/res/values/themes.xml b/app/ui/legacy/src/main/res/values/themes.xml index 0500a0236d..9c3016a43e 100644 --- a/app/ui/legacy/src/main/res/values/themes.xml +++ b/app/ui/legacy/src/main/res/values/themes.xml @@ -77,9 +77,10 @@ @drawable/ic_import_status @android:color/primary_text_light @android:color/secondary_text_light - #8038B8E2 - #c0cdcdcd - #00ffffff + #ff99d9ee + ?android:attr/windowBackground + #ffd8d8d8 + ?attr/messageListRegularItemBackgroundColor ?android:attr/colorBackground @drawable/thread_count_box_light #ff2ea7d1 @@ -196,9 +197,10 @@ @drawable/ic_import_status @android:color/primary_text_dark @android:color/secondary_text_dark - #8038B8E2 - #00000000 - #c05a5a5a + #ff347489 + ?android:attr/windowBackground + ?attr/messageListRegularItemBackgroundColor + #ff505050 ?android:attr/colorBackground @drawable/thread_count_box_dark #ff33b5e5 diff --git a/app/ui/legacy/src/test/java/com/fsck/k9/fragment/MessageListAdapterTest.kt b/app/ui/legacy/src/test/java/com/fsck/k9/fragment/MessageListAdapterTest.kt index 168f2bc688..095eb68159 100644 --- a/app/ui/legacy/src/test/java/com/fsck/k9/fragment/MessageListAdapterTest.kt +++ b/app/ui/legacy/src/test/java/com/fsck/k9/fragment/MessageListAdapterTest.kt @@ -457,7 +457,6 @@ class MessageListAdapterTest : RobolectricTest() { ) return MessageListAdapter( - context = context, theme = context.theme, res = context.resources, layoutInflater = LayoutInflater.from(context), @@ -518,7 +517,9 @@ class MessageListAdapterTest : RobolectricTest() { fun MessageListAdapter.createAndBindView(item: MessageListItem = createMessageListItem()): View { messages = listOf(item) - return getView(0, null, LinearLayout(context)) + val holder = onCreateViewHolder(LinearLayout(context), 0) + onBindViewHolder(holder, 0) + return holder.itemView } fun secondLine(senderOrSubject: String, preview: String) = "$senderOrSubject $preview" -- GitLab From 66739b4b70b060bc33f5a3408c83a08f8eb13fcb Mon Sep 17 00:00:00 2001 From: cketti Date: Sat, 17 Sep 2022 14:33:34 +0200 Subject: [PATCH 05/26] Switch to using 'namespace' property in `build.gradle` --- app/autodiscovery/providersxml/build.gradle | 2 ++ .../providersxml/src/main/AndroidManifest.xml | 2 -- app/core/build.gradle | 2 ++ app/core/src/main/AndroidManifest.xml | 3 +-- app/crypto-openpgp/build.gradle | 2 ++ app/crypto-openpgp/src/main/AndroidManifest.xml | 2 -- app/k9mail/build.gradle | 2 ++ app/k9mail/src/main/AndroidManifest.xml | 3 +-- app/storage/build.gradle | 2 ++ app/storage/src/main/AndroidManifest.xml | 2 -- app/testing/build.gradle | 2 ++ app/testing/src/main/AndroidManifest.xml | 2 -- app/ui/base/build.gradle | 2 ++ app/ui/base/src/main/AndroidManifest.xml | 3 +-- app/ui/legacy/build.gradle | 2 ++ app/ui/legacy/src/main/AndroidManifest.xml | 3 +-- app/ui/setup/build.gradle | 2 ++ app/ui/setup/src/main/AndroidManifest.xml | 2 -- plugins/openpgp-api-lib/openpgp-api/build.gradle | 2 ++ .../openpgp-api/src/main/AndroidManifest.xml | 7 ------- 20 files changed, 24 insertions(+), 25 deletions(-) delete mode 100644 app/autodiscovery/providersxml/src/main/AndroidManifest.xml delete mode 100644 app/crypto-openpgp/src/main/AndroidManifest.xml delete mode 100644 app/storage/src/main/AndroidManifest.xml delete mode 100644 app/testing/src/main/AndroidManifest.xml delete mode 100644 app/ui/setup/src/main/AndroidManifest.xml delete mode 100644 plugins/openpgp-api-lib/openpgp-api/src/main/AndroidManifest.xml diff --git a/app/autodiscovery/providersxml/build.gradle b/app/autodiscovery/providersxml/build.gradle index 1ec0a36c0b..a82e1b4f14 100644 --- a/app/autodiscovery/providersxml/build.gradle +++ b/app/autodiscovery/providersxml/build.gradle @@ -21,6 +21,8 @@ dependencies { } android { + namespace 'com.fsck.k9.autodiscovery.providersxml' + compileSdkVersion buildConfig.compileSdk buildToolsVersion buildConfig.buildTools diff --git a/app/autodiscovery/providersxml/src/main/AndroidManifest.xml b/app/autodiscovery/providersxml/src/main/AndroidManifest.xml deleted file mode 100644 index d2b5110021..0000000000 --- a/app/autodiscovery/providersxml/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/app/core/build.gradle b/app/core/build.gradle index 447bcfca0c..ed06e03ecf 100644 --- a/app/core/build.gradle +++ b/app/core/build.gradle @@ -43,6 +43,8 @@ dependencies { } android { + namespace 'com.fsck.k9.core' + compileSdkVersion buildConfig.compileSdk buildToolsVersion buildConfig.buildTools diff --git a/app/core/src/main/AndroidManifest.xml b/app/core/src/main/AndroidManifest.xml index dca0147e84..60d884212f 100644 --- a/app/core/src/main/AndroidManifest.xml +++ b/app/core/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools"> diff --git a/app/crypto-openpgp/build.gradle b/app/crypto-openpgp/build.gradle index 1aa5537b54..31a1df211e 100644 --- a/app/crypto-openpgp/build.gradle +++ b/app/crypto-openpgp/build.gradle @@ -9,6 +9,8 @@ dependencies { } android { + namespace 'com.fsck.k9.crypto.openpgp' + compileSdkVersion buildConfig.compileSdk buildToolsVersion buildConfig.buildTools diff --git a/app/crypto-openpgp/src/main/AndroidManifest.xml b/app/crypto-openpgp/src/main/AndroidManifest.xml deleted file mode 100644 index 2cdc574d91..0000000000 --- a/app/crypto-openpgp/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/app/k9mail/build.gradle b/app/k9mail/build.gradle index eedcf9c589..846334f415 100644 --- a/app/k9mail/build.gradle +++ b/app/k9mail/build.gradle @@ -41,6 +41,8 @@ dependencies { } android { + namespace 'com.fsck.k9' + compileSdkVersion buildConfig.compileSdk buildToolsVersion buildConfig.buildTools diff --git a/app/k9mail/src/main/AndroidManifest.xml b/app/k9mail/src/main/AndroidManifest.xml index dbf6fb714b..aa8b7bd317 100644 --- a/app/k9mail/src/main/AndroidManifest.xml +++ b/app/k9mail/src/main/AndroidManifest.xml @@ -2,8 +2,7 @@ + android:installLocation="auto"> - diff --git a/app/testing/build.gradle b/app/testing/build.gradle index 91d2eb8a26..c349f9ddf1 100644 --- a/app/testing/build.gradle +++ b/app/testing/build.gradle @@ -12,6 +12,8 @@ dependencies { } android { + namespace 'com.fsck.k9.testing' + compileSdkVersion buildConfig.compileSdk buildToolsVersion buildConfig.buildTools diff --git a/app/testing/src/main/AndroidManifest.xml b/app/testing/src/main/AndroidManifest.xml deleted file mode 100644 index a7a5e01452..0000000000 --- a/app/testing/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/app/ui/base/build.gradle b/app/ui/base/build.gradle index 97dc1f2bd1..410764844d 100644 --- a/app/ui/base/build.gradle +++ b/app/ui/base/build.gradle @@ -18,6 +18,8 @@ dependencies { } android { + namespace 'com.fsck.k9.ui.base' + compileSdkVersion buildConfig.compileSdk buildToolsVersion buildConfig.buildTools diff --git a/app/ui/base/src/main/AndroidManifest.xml b/app/ui/base/src/main/AndroidManifest.xml index f69b1cd3c0..495700ab62 100644 --- a/app/ui/base/src/main/AndroidManifest.xml +++ b/app/ui/base/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + diff --git a/app/ui/legacy/build.gradle b/app/ui/legacy/build.gradle index ed5187a19a..1ab0abb2eb 100644 --- a/app/ui/legacy/build.gradle +++ b/app/ui/legacy/build.gradle @@ -70,6 +70,8 @@ dependencies { } android { + namespace 'com.fsck.k9.ui' + compileSdkVersion buildConfig.compileSdk buildToolsVersion buildConfig.buildTools diff --git a/app/ui/legacy/src/main/AndroidManifest.xml b/app/ui/legacy/src/main/AndroidManifest.xml index e7fd747088..c44690f937 100644 --- a/app/ui/legacy/src/main/AndroidManifest.xml +++ b/app/ui/legacy/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + diff --git a/app/ui/setup/build.gradle b/app/ui/setup/build.gradle index a4279c21e0..aa9bdd7985 100644 --- a/app/ui/setup/build.gradle +++ b/app/ui/setup/build.gradle @@ -27,6 +27,8 @@ dependencies { } android { + namespace 'com.fsck.k9.ui.setup' + compileSdkVersion buildConfig.compileSdk buildToolsVersion buildConfig.buildTools diff --git a/app/ui/setup/src/main/AndroidManifest.xml b/app/ui/setup/src/main/AndroidManifest.xml deleted file mode 100644 index a770e75ee2..0000000000 --- a/app/ui/setup/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/plugins/openpgp-api-lib/openpgp-api/build.gradle b/plugins/openpgp-api-lib/openpgp-api/build.gradle index 302e7267a2..ce8cf248e4 100644 --- a/plugins/openpgp-api-lib/openpgp-api/build.gradle +++ b/plugins/openpgp-api-lib/openpgp-api/build.gradle @@ -1,6 +1,8 @@ apply plugin: 'com.android.library' android { + namespace 'org.openintents.openpgp' + compileSdkVersion buildConfig.compileSdk buildToolsVersion buildConfig.buildTools diff --git a/plugins/openpgp-api-lib/openpgp-api/src/main/AndroidManifest.xml b/plugins/openpgp-api-lib/openpgp-api/src/main/AndroidManifest.xml deleted file mode 100644 index f1f29cf3c4..0000000000 --- a/plugins/openpgp-api-lib/openpgp-api/src/main/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - \ No newline at end of file -- GitLab From 684740edb0b8375d08b22cd163ea3a0471260c92 Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 20 Sep 2022 18:39:22 +0200 Subject: [PATCH 06/26] Update AndroidX AppCompat to version 1.5.1 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index ce4e2491ae..229601812d 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,7 @@ buildscript { 'kotlin': '1.7.10', 'kotlinCoroutines': '1.6.4', 'jetbrainsAnnotations': '23.0.0', - 'androidxAppCompat': '1.5.0', + 'androidxAppCompat': '1.5.1', 'androidxActivity': '1.5.1', 'androidxRecyclerView': '1.2.1', 'androidxLifecycle': '2.5.1', -- GitLab From 069318cc25eaf52c840ebb8a557e8e604b373b02 Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 20 Sep 2022 18:43:02 +0200 Subject: [PATCH 07/26] Update AndroidX Navigation to version 2.5.2 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 229601812d..aabccd032f 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ buildscript { 'androidxLifecycle': '2.5.1', 'androidxAnnotation': '1.4.0', 'androidxBiometric': '1.1.0', - 'androidxNavigation': '2.5.1', + 'androidxNavigation': '2.5.2', 'androidxConstraintLayout': '2.1.4', 'androidxWorkManager': '2.7.1', 'androidxFragment': '1.5.2', -- GitLab From 330852516550997d8313af893391ddb6cbdb1fc3 Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 20 Sep 2022 19:00:24 +0200 Subject: [PATCH 08/26] Update AndroidX Core to version 1.9.0 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index aabccd032f..f655e56d54 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,7 @@ buildscript { 'androidxWorkManager': '2.7.1', 'androidxFragment': '1.5.2', 'androidxLocalBroadcastManager': '1.1.0', - 'androidxCore': '1.8.0', + 'androidxCore': '1.9.0', 'androidxCardView': '1.0.0', 'androidxPreference': '1.2.0', 'androidxTestCore': '1.4.0', -- GitLab From fae7eb21b2d31f27bfa3e4f661d5a02e1481183e Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 20 Sep 2022 19:03:31 +0200 Subject: [PATCH 09/26] Update Moshi to version 1.14.0 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index f655e56d54..a8626ed1f3 100644 --- a/build.gradle +++ b/build.gradle @@ -35,7 +35,7 @@ buildscript { 'fastAdapter': '5.6.0', 'preferencesFix': '1.1.0', 'okio': '3.2.0', - 'moshi': '1.13.0', + 'moshi': '1.14.0', 'timber': '5.0.1', 'koin': '3.2.0', // We can't upgrade Commons IO beyond this version because starting with 2.7 it is using Java 8 API -- GitLab From bbc223b490934459876126d98ca52872c1d7d55d Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 20 Sep 2022 19:05:42 +0200 Subject: [PATCH 10/26] Update Koin to version 3.2.1 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index a8626ed1f3..50b6822d9d 100644 --- a/build.gradle +++ b/build.gradle @@ -37,7 +37,7 @@ buildscript { 'okio': '3.2.0', 'moshi': '1.14.0', 'timber': '5.0.1', - 'koin': '3.2.0', + 'koin': '3.2.1', // We can't upgrade Commons IO beyond this version because starting with 2.7 it is using Java 8 API // that is not available until Android API 26 (even with desugaring enabled). // See https://issuetracker.google.com/issues/160484830 -- GitLab From 16bf4f7b76125fd1199faeff20cbee894c46c886 Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 20 Sep 2022 19:13:46 +0200 Subject: [PATCH 11/26] Update Mockito to version 4.8.0 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 50b6822d9d..be3f406219 100644 --- a/build.gradle +++ b/build.gradle @@ -52,7 +52,7 @@ buildscript { 'androidxTestRunner': '1.4.0', 'junit': '4.13.2', 'robolectric': '4.8.2', - 'mockito': '4.7.0', + 'mockito': '4.8.0', 'mockitoKotlin': '4.0.0', 'truth': '1.1.3', 'turbine': '0.9.0', -- GitLab From 59e19ce1ff24c02d6bd8f29b1eefc976bc592af8 Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 20 Sep 2022 19:15:07 +0200 Subject: [PATCH 12/26] Update Turbine to version 0.10.0 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index be3f406219..1b562d1be4 100644 --- a/build.gradle +++ b/build.gradle @@ -55,7 +55,7 @@ buildscript { 'mockito': '4.8.0', 'mockitoKotlin': '4.0.0', 'truth': '1.1.3', - 'turbine': '0.9.0', + 'turbine': '0.10.0', 'ktlint': '0.44.0' ] -- GitLab From 4635551e695dfeab96fd91a54bf4051a4035e30e Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 20 Sep 2022 19:27:54 +0200 Subject: [PATCH 13/26] Update SearchPreference to version 2.3.0 --- app/ui/legacy/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/ui/legacy/build.gradle b/app/ui/legacy/build.gradle index 1ab0abb2eb..9e3a6ab374 100644 --- a/app/ui/legacy/build.gradle +++ b/app/ui/legacy/build.gradle @@ -35,7 +35,7 @@ dependencies { implementation 'com.mikepenz:materialdrawer:8.4.5' implementation 'com.mikepenz:materialdrawer-iconics:8.4.5' implementation 'com.mikepenz:fontawesome-typeface:5.9.0.0-kotlin@aar' - implementation 'com.github.ByteHamster:SearchPreference:v2.2.1' + implementation 'com.github.ByteHamster:SearchPreference:v2.3.0' implementation "com.mikepenz:fastadapter:${versions.fastAdapter}" implementation "com.mikepenz:fastadapter-extensions-drag:${versions.fastAdapter}" implementation "com.mikepenz:fastadapter-extensions-utils:${versions.fastAdapter}" -- GitLab From b3c8e8591806d0cf697397ae9fb77bf76b088abb Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 20 Sep 2022 14:19:00 +0200 Subject: [PATCH 14/26] Remove volume key navigation for list views --- app/core/src/main/java/com/fsck/k9/K9.kt | 5 --- .../GeneralSettingsDescriptions.java | 3 -- .../com/fsck/k9/preferences/Settings.java | 2 +- .../values/arrays_general_settings_values.xml | 5 --- .../com/fsck/k9/activity/K9ListActivity.java | 42 ------------------- .../java/com/fsck/k9/activity/MessageList.kt | 8 +--- .../fsck/k9/fragment/MessageListFragment.kt | 8 ---- .../general/GeneralSettingsDataStore.kt | 12 +----- .../arrays_general_settings_strings.xml | 5 --- app/ui/legacy/src/main/res/values/strings.xml | 4 +- .../src/main/res/xml/general_settings.xml | 5 +-- 11 files changed, 6 insertions(+), 93 deletions(-) diff --git a/app/core/src/main/java/com/fsck/k9/K9.kt b/app/core/src/main/java/com/fsck/k9/K9.kt index d68f78431d..c0e7a6c53a 100644 --- a/app/core/src/main/java/com/fsck/k9/K9.kt +++ b/app/core/src/main/java/com/fsck/k9/K9.kt @@ -188,9 +188,6 @@ object K9 : EarlyInit { @JvmStatic var isUseVolumeKeysForNavigation = false - @JvmStatic - var isUseVolumeKeysForListNavigation = false - @JvmStatic var isShowUnifiedInbox = true @@ -298,7 +295,6 @@ object K9 : EarlyInit { isSensitiveDebugLoggingEnabled = storage.getBoolean("enableSensitiveLogging", false) isShowAnimations = storage.getBoolean("animations", true) isUseVolumeKeysForNavigation = storage.getBoolean("useVolumeKeysForNavigation", false) - isUseVolumeKeysForListNavigation = storage.getBoolean("useVolumeKeysForListNavigation", false) isShowUnifiedInbox = storage.getBoolean("showUnifiedInbox", true) isShowStarredCount = storage.getBoolean("showStarredCount", false) isMessageListSenderAboveSubject = storage.getBoolean("messageListSenderAboveSubject", false) @@ -370,7 +366,6 @@ object K9 : EarlyInit { editor.putEnum("backgroundOperations", backgroundOps) editor.putBoolean("animations", isShowAnimations) editor.putBoolean("useVolumeKeysForNavigation", isUseVolumeKeysForNavigation) - editor.putBoolean("useVolumeKeysForListNavigation", isUseVolumeKeysForListNavigation) editor.putBoolean("autofitWidth", isAutoFitWidth) editor.putBoolean("quietTimeEnabled", isQuietTimeEnabled) editor.putBoolean("notificationDuringQuietTimeEnabled", isNotificationDuringQuietTimeEnabled) diff --git a/app/core/src/main/java/com/fsck/k9/preferences/GeneralSettingsDescriptions.java b/app/core/src/main/java/com/fsck/k9/preferences/GeneralSettingsDescriptions.java index 34efb299a6..2458bf7800 100644 --- a/app/core/src/main/java/com/fsck/k9/preferences/GeneralSettingsDescriptions.java +++ b/app/core/src/main/java/com/fsck/k9/preferences/GeneralSettingsDescriptions.java @@ -184,9 +184,6 @@ public class GeneralSettingsDescriptions { new V(16, new LegacyThemeSetting(AppTheme.LIGHT)), new V(24, new SubThemeSetting(SubTheme.USE_GLOBAL)) )); - s.put("useVolumeKeysForListNavigation", Settings.versions( - new V(1, new BooleanSetting(false)) - )); s.put("useVolumeKeysForNavigation", Settings.versions( new V(1, new BooleanSetting(false)) )); diff --git a/app/core/src/main/java/com/fsck/k9/preferences/Settings.java b/app/core/src/main/java/com/fsck/k9/preferences/Settings.java index db1674f7c4..a82e888a7b 100644 --- a/app/core/src/main/java/com/fsck/k9/preferences/Settings.java +++ b/app/core/src/main/java/com/fsck/k9/preferences/Settings.java @@ -36,7 +36,7 @@ public class Settings { * * @see SettingsExporter */ - public static final int VERSION = 81; + public static final int VERSION = 82; static Map validate(int version, Map> settings, Map importedSettings, boolean useDefaultValues) { diff --git a/app/core/src/main/res/values/arrays_general_settings_values.xml b/app/core/src/main/res/values/arrays_general_settings_values.xml index 6922273349..b5b0f49f67 100644 --- a/app/core/src/main/res/values/arrays_general_settings_values.xml +++ b/app/core/src/main/res/values/arrays_general_settings_values.xml @@ -210,9 +210,4 @@ spam - - message - list - - diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/activity/K9ListActivity.java b/app/ui/legacy/src/main/java/com/fsck/k9/activity/K9ListActivity.java index 7dc1aab608..a1ebcc4b3a 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/activity/K9ListActivity.java +++ b/app/ui/legacy/src/main/java/com/fsck/k9/activity/K9ListActivity.java @@ -1,13 +1,10 @@ package com.fsck.k9.activity; -import android.view.KeyEvent; import android.view.View; -import android.widget.AdapterView; import android.widget.ListAdapter; import android.widget.ListView; -import com.fsck.k9.K9; import com.fsck.k9.ui.base.K9Activity; @@ -15,45 +12,6 @@ public abstract class K9ListActivity extends K9Activity { protected ListAdapter adapter; protected ListView list; - @Override - public boolean onKeyDown(int keyCode, KeyEvent event) { - // Shortcuts that work no matter what is selected - if (K9.isUseVolumeKeysForListNavigation() && - (keyCode == KeyEvent.KEYCODE_VOLUME_UP || - keyCode == KeyEvent.KEYCODE_VOLUME_DOWN)) { - - final ListView listView = getListView(); - - int currentPosition = listView.getSelectedItemPosition(); - if (currentPosition == AdapterView.INVALID_POSITION || listView.isInTouchMode()) { - currentPosition = listView.getFirstVisiblePosition(); - } - - if (keyCode == KeyEvent.KEYCODE_VOLUME_UP && currentPosition > 0) { - listView.setSelection(currentPosition - 1); - } else if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN && - currentPosition < listView.getCount()) { - listView.setSelection(currentPosition + 1); - } - - return true; - } - - return super.onKeyDown(keyCode, event); - } - - @Override - public boolean onKeyUp(int keyCode, KeyEvent event) { - // Swallow these events too to avoid the audible notification of a volume change - if (K9.isUseVolumeKeysForListNavigation() && - (keyCode == KeyEvent.KEYCODE_VOLUME_UP || - keyCode == KeyEvent.KEYCODE_VOLUME_DOWN)) { - return true; - } - - return super.onKeyUp(keyCode, event); - } - protected ListView getListView() { if (list == null) { list = findViewById(android.R.id.list); 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 6425672393..addb16a9f6 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 @@ -759,9 +759,6 @@ open class MessageList : ) { showPreviousMessage() return true - } else if (displayMode != DisplayMode.MESSAGE_VIEW && K9.isUseVolumeKeysForListNavigation) { - messageListFragment!!.onMoveUp() - return true } } KeyEvent.KEYCODE_VOLUME_DOWN -> { @@ -770,9 +767,6 @@ open class MessageList : ) { showNextMessage() return true - } else if (displayMode != DisplayMode.MESSAGE_VIEW && K9.isUseVolumeKeysForListNavigation) { - messageListFragment!!.onMoveDown() - return true } } KeyEvent.KEYCODE_DEL -> { @@ -910,7 +904,7 @@ open class MessageList : override fun onKeyUp(keyCode: Int, event: KeyEvent): Boolean { // Swallow these events too to avoid the audible notification of a volume change - if (K9.isUseVolumeKeysForListNavigation) { + if (K9.isUseVolumeKeysForNavigation) { if (keyCode == KeyEvent.KEYCODE_VOLUME_UP || keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) { Timber.v("Swallowed key up.") return true diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt index b4f80984b9..a9652d6640 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt @@ -1123,14 +1123,6 @@ class MessageListFragment : super.onStop() } - fun onMoveUp() { - // FIXME - } - - fun onMoveDown() { - // FIXME - } - fun openMessage(messageReference: MessageReference) { fragmentListener.openMessage(messageReference) } diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsDataStore.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsDataStore.kt index caed1e56ed..d712a8cde7 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsDataStore.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsDataStore.kt @@ -41,6 +41,7 @@ class GeneralSettingsDataStore( "privacy_hide_timezone" -> K9.isHideTimeZone "debug_logging" -> K9.isDebugLoggingEnabled "sensitive_logging" -> K9.isSensitiveDebugLoggingEnabled + "volume_navigation" -> K9.isUseVolumeKeysForNavigation else -> defValue } } @@ -70,6 +71,7 @@ class GeneralSettingsDataStore( "privacy_hide_timezone" -> K9.isHideTimeZone = value "debug_logging" -> K9.isDebugLoggingEnabled = value "sensitive_logging" -> K9.isSensitiveDebugLoggingEnabled = value + "volume_navigation" -> K9.isUseVolumeKeysForNavigation = value else -> return } @@ -189,12 +191,6 @@ class GeneralSettingsDataStore( if (K9.isMessageViewSpamActionVisible) add("spam") } } - "volume_navigation" -> { - mutableSetOf().apply { - if (K9.isUseVolumeKeysForNavigation) add("message") - if (K9.isUseVolumeKeysForListNavigation) add("list") - } - } else -> defValues } } @@ -217,10 +213,6 @@ class GeneralSettingsDataStore( K9.isMessageViewCopyActionVisible = "copy" in checkedValues K9.isMessageViewSpamActionVisible = "spam" in checkedValues } - "volume_navigation" -> { - K9.isUseVolumeKeysForNavigation = "message" in checkedValues - K9.isUseVolumeKeysForListNavigation = "list" in checkedValues - } else -> return } diff --git a/app/ui/legacy/src/main/res/values/arrays_general_settings_strings.xml b/app/ui/legacy/src/main/res/values/arrays_general_settings_strings.xml index 328f4cce3b..45bf2174c2 100644 --- a/app/ui/legacy/src/main/res/values/arrays_general_settings_strings.xml +++ b/app/ui/legacy/src/main/res/values/arrays_general_settings_strings.xml @@ -157,9 +157,4 @@ @string/spam_action - - @string/volume_navigation_message - @string/volume_navigation_list - - diff --git a/app/ui/legacy/src/main/res/values/strings.xml b/app/ui/legacy/src/main/res/values/strings.xml index 5ba8fc72fe..b514bd6c0c 100644 --- a/app/ui/legacy/src/main/res/values/strings.xml +++ b/app/ui/legacy/src/main/res/values/strings.xml @@ -817,9 +817,7 @@ Please submit bug reports, contribute new features and ask questions at Animation Use gaudy visual effects - Volume key navigation - In message views - In list views + Volume key navigation in message view Show Unified Inbox Show starred count diff --git a/app/ui/legacy/src/main/res/xml/general_settings.xml b/app/ui/legacy/src/main/res/xml/general_settings.xml index 5f089831da..cf6933a72c 100644 --- a/app/ui/legacy/src/main/res/xml/general_settings.xml +++ b/app/ui/legacy/src/main/res/xml/general_settings.xml @@ -358,10 +358,7 @@ android:title="@string/interaction_preferences" search:ignore="true"> - -- GitLab From 7dbc5cf6c5cbffb2b71fd47b10fc18ff415603b0 Mon Sep 17 00:00:00 2001 From: cketti Date: Wed, 21 Sep 2022 13:05:57 +0200 Subject: [PATCH 15/26] Correctly handle the message list footer being removed --- .../main/java/com/fsck/k9/fragment/MessageListAdapter.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt index 0704a1fd0f..9f150ffbd5 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt @@ -139,10 +139,15 @@ class MessageListAdapter internal constructor( if (field == value) return val hadFooterText = field != null + val previousFooterPosition = footerPosition field = value if (hadFooterText) { - notifyItemChanged(footerPosition) + if (value == null) { + notifyItemRemoved(previousFooterPosition) + } else { + notifyItemChanged(footerPosition) + } } else { notifyItemInserted(footerPosition) } -- GitLab From c72236b7f3030182f4b7741bd75fe4b21d67a88d Mon Sep 17 00:00:00 2001 From: cketti Date: Wed, 21 Sep 2022 11:36:14 +0200 Subject: [PATCH 16/26] Change `SearchView` initialization --- .../legacy/src/main/java/com/fsck/k9/activity/MessageList.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 addb16a9f6..fbb37fdfd8 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 @@ -588,7 +588,7 @@ open class MessageList : messageViewOnly = savedInstanceState.getBoolean(STATE_MESSAGE_VIEW_ONLY) messageListWasDisplayed = savedInstanceState.getBoolean(STATE_MESSAGE_LIST_WAS_DISPLAYED) - initialSearchViewIconified = savedInstanceState.getBoolean(STATE_SEARCH_VIEW_ICONIFIED) + initialSearchViewIconified = savedInstanceState.getBoolean(STATE_SEARCH_VIEW_ICONIFIED, true) initialSearchViewQuery = savedInstanceState.getString(STATE_SEARCH_VIEW_QUERY) } @@ -970,8 +970,8 @@ open class MessageList : } }) - searchView.isIconified = initialSearchViewIconified searchView.setQuery(initialSearchViewQuery, false) + searchView.isIconified = initialSearchViewIconified this.searchView = searchView } -- GitLab From 46c435ab088cf5a674156daf89c9ae634c0b7c8a Mon Sep 17 00:00:00 2001 From: cketti Date: Wed, 21 Sep 2022 15:16:38 +0200 Subject: [PATCH 17/26] Restore previous logic to select the next message after deleting the current one --- .../src/main/java/com/fsck/k9/activity/MessageList.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 fbb37fdfd8..a78a336977 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 @@ -1198,10 +1198,16 @@ open class MessageList : } private fun showLogicalNextMessage(): Boolean { - return when (lastDirection) { + val couldMoveInLastDirection = when (lastDirection) { Direction.NEXT -> showNextMessage() Direction.PREVIOUS -> showPreviousMessage() } + + return if (couldMoveInLastDirection) { + true + } else { + showNextMessage() || showPreviousMessage() + } } override fun setProgress(enable: Boolean) { -- GitLab From affe83a9b94154d8d8e8efbe98a7bc7413a91a94 Mon Sep 17 00:00:00 2001 From: cketti Date: Wed, 21 Sep 2022 12:45:02 +0200 Subject: [PATCH 18/26] Remove `trimIndent()` from production code --- .../storage/messages/CopyMessageOperations.kt | 54 +++-- .../messages/DeleteFolderOperations.kt | 20 +- .../messages/DeleteMessageOperations.kt | 34 +-- .../messages/RetrieveFolderOperations.kt | 32 +-- .../messages/RetrieveMessageListOperations.kt | 212 +++++++++--------- .../messages/ThreadMessageOperations.kt | 26 +-- 6 files changed, 188 insertions(+), 190 deletions(-) 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 9e6d2a4beb..71afa9ae61 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 @@ -70,30 +70,30 @@ internal class CopyMessageOperations( private fun copyMessageParts(database: SQLiteDatabase, messageId: Long): Long { return database.rawQuery( """ - SELECT - message_parts.id, - message_parts.type, - message_parts.root, - message_parts.parent, - message_parts.seq, - message_parts.mime_type, - message_parts.decoded_body_size, - message_parts.display_name, - message_parts.header, - message_parts.encoding, - message_parts.charset, - message_parts.data_location, - message_parts.data, - message_parts.preamble, - message_parts.epilogue, - message_parts.boundary, - message_parts.content_id, - message_parts.server_extra - FROM messages - JOIN message_parts ON (message_parts.root = messages.message_part_id) - WHERE messages.id = ? - ORDER BY message_parts.seq - """.trimIndent(), +SELECT + message_parts.id, + message_parts.type, + message_parts.root, + message_parts.parent, + message_parts.seq, + message_parts.mime_type, + message_parts.decoded_body_size, + message_parts.display_name, + message_parts.header, + message_parts.encoding, + message_parts.charset, + message_parts.data_location, + message_parts.data, + message_parts.preamble, + message_parts.epilogue, + message_parts.boundary, + message_parts.content_id, + message_parts.server_extra +FROM messages +JOIN message_parts ON (message_parts.root = messages.message_part_id) +WHERE messages.id = ? +ORDER BY message_parts.seq + """, arrayOf(messageId.toString()) ).use { cursor -> if (!cursor.moveToNext()) error("No message part found for message with ID $messageId") @@ -201,10 +201,8 @@ internal class CopyMessageOperations( private fun copyFulltextEntry(database: SQLiteDatabase, newMessageId: Long, messageId: Long) { database.execSQL( - """ - INSERT OR REPLACE INTO messages_fulltext (docid, fulltext) - SELECT ?, fulltext FROM messages_fulltext WHERE docid = ? - """.trimIndent(), + "INSERT OR REPLACE INTO messages_fulltext (docid, fulltext) " + + "SELECT ?, fulltext FROM messages_fulltext WHERE docid = ?", arrayOf(newMessageId.toString(), messageId.toString()) ) } diff --git a/app/storage/src/main/java/com/fsck/k9/storage/messages/DeleteFolderOperations.kt b/app/storage/src/main/java/com/fsck/k9/storage/messages/DeleteFolderOperations.kt index 3578f9cf97..c05c27fc3e 100644 --- a/app/storage/src/main/java/com/fsck/k9/storage/messages/DeleteFolderOperations.kt +++ b/app/storage/src/main/java/com/fsck/k9/storage/messages/DeleteFolderOperations.kt @@ -19,16 +19,16 @@ internal class DeleteFolderOperations( private fun SQLiteDatabase.deleteMessagePartFiles(folderServerId: String) { rawQuery( """ - SELECT message_parts.id - FROM folders - JOIN messages ON (messages.folder_id = folders.id) - JOIN message_parts ON ( - message_parts.root = messages.message_part_id - AND - message_parts.data_location = $DATA_LOCATION_ON_DISK - ) - WHERE folders.server_id = ? - """.trimIndent(), +SELECT message_parts.id +FROM folders +JOIN messages ON (messages.folder_id = folders.id) +JOIN message_parts ON ( + message_parts.root = messages.message_part_id + AND + message_parts.data_location = $DATA_LOCATION_ON_DISK +) +WHERE folders.server_id = ? + """, arrayOf(folderServerId) ).use { cursor -> while (cursor.moveToNext()) { diff --git a/app/storage/src/main/java/com/fsck/k9/storage/messages/DeleteMessageOperations.kt b/app/storage/src/main/java/com/fsck/k9/storage/messages/DeleteMessageOperations.kt index d015ae399c..d39150e992 100644 --- a/app/storage/src/main/java/com/fsck/k9/storage/messages/DeleteMessageOperations.kt +++ b/app/storage/src/main/java/com/fsck/k9/storage/messages/DeleteMessageOperations.kt @@ -38,12 +38,12 @@ internal class DeleteMessageOperations( return lockableDatabase.execute(false) { database -> database.rawQuery( """ - SELECT messages.id, messages.message_part_id, COUNT(threads2.id) - FROM messages - LEFT JOIN threads threads1 ON (threads1.message_id = messages.id) - LEFT JOIN threads threads2 ON (threads2.parent = threads1.id) - WHERE folder_id = ? AND uid = ? - """.trimIndent(), +SELECT messages.id, messages.message_part_id, COUNT(threads2.id) +FROM messages +LEFT JOIN threads threads1 ON (threads1.message_id = messages.id) +LEFT JOIN threads threads2 ON (threads2.parent = threads1.id) +WHERE folder_id = ? AND uid = ? + """, arrayOf(folderId.toString(), messageServerId) ).use { cursor -> if (cursor.moveToFirst()) { @@ -128,12 +128,12 @@ internal class DeleteMessageOperations( private fun SQLiteDatabase.getEmptyThreadParent(messageId: Long): Long? { return rawQuery( """ - SELECT messages.id - FROM threads threads1 - JOIN threads threads2 ON (threads1.parent = threads2.id) - JOIN messages ON (threads2.message_id = messages.id AND messages.empty = 1) - WHERE threads1.message_id = ? - """.trimIndent(), +SELECT messages.id +FROM threads threads1 +JOIN threads threads2 ON (threads1.parent = threads2.id) +JOIN messages ON (threads2.message_id = messages.id AND messages.empty = 1) +WHERE threads1.message_id = ? + """, arrayOf(messageId.toString()) ).use { cursor -> if (cursor.moveToFirst() && !cursor.isNull(0)) { @@ -151,11 +151,11 @@ internal class DeleteMessageOperations( private fun SQLiteDatabase.hasThreadChildren(messageId: Long): Boolean { return rawQuery( """ - SELECT COUNT(threads2.id) - FROM threads threads1 - JOIN threads threads2 ON (threads2.parent = threads1.id) - WHERE threads1.message_id = ? - """.trimIndent(), +SELECT COUNT(threads2.id) +FROM threads threads1 +JOIN threads threads2 ON (threads2.parent = threads1.id) +WHERE threads1.message_id = ? + """, arrayOf(messageId.toString()) ).use { cursor -> cursor.moveToFirst() && !cursor.isNull(0) && cursor.getLong(0) > 0L diff --git a/app/storage/src/main/java/com/fsck/k9/storage/messages/RetrieveFolderOperations.kt b/app/storage/src/main/java/com/fsck/k9/storage/messages/RetrieveFolderOperations.kt index 44bbba649c..ea04aa6b97 100644 --- a/app/storage/src/main/java/com/fsck/k9/storage/messages/RetrieveFolderOperations.kt +++ b/app/storage/src/main/java/com/fsck/k9/storage/messages/RetrieveFolderOperations.kt @@ -70,22 +70,22 @@ internal class RetrieveFolderOperations(private val lockableDatabase: LockableDa val query = """ - SELECT ${FOLDER_COLUMNS.joinToString()}, ( - SELECT COUNT(messages.id) - FROM messages - WHERE messages.folder_id = folders.id - AND messages.empty = 0 AND messages.deleted = 0 - AND (messages.read = 0 OR folders.id = ?) - ), ( - SELECT COUNT(messages.id) - FROM messages - WHERE messages.folder_id = folders.id - AND messages.empty = 0 AND messages.deleted = 0 - AND messages.flagged = 1 - ) - FROM folders - $displayModeSelection - """.trimIndent() +SELECT ${FOLDER_COLUMNS.joinToString()}, ( + SELECT COUNT(messages.id) + FROM messages + WHERE messages.folder_id = folders.id + AND messages.empty = 0 AND messages.deleted = 0 + AND (messages.read = 0 OR folders.id = ?) +), ( + SELECT COUNT(messages.id) + FROM messages + WHERE messages.folder_id = folders.id + AND messages.empty = 0 AND messages.deleted = 0 + AND messages.flagged = 1 +) +FROM folders +$displayModeSelection + """ db.rawQuery(query, arrayOf(outboxFolderIdOrZero.toString())).use { cursor -> val cursorFolderAccessor = CursorFolderAccessor(cursor) 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 45d8b4340c..d84480e44f 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 @@ -20,32 +20,32 @@ internal class RetrieveMessageListOperations(private val lockableDatabase: Locka return lockableDatabase.execute(false) { database -> database.rawQuery( """ - SELECT - messages.id AS id, - uid, - folder_id, - sender_list, - to_list, - cc_list, - date, - internal_date, - subject, - preview_type, - preview, - read, - flagged, - answered, - forwarded, - attachment_count, - root - FROM messages - JOIN threads ON (threads.message_id = messages.id) - LEFT JOIN FOLDERS ON (folders.id = messages.folder_id) - WHERE - ($selection) - AND empty = 0 AND deleted = 0 - ORDER BY $sortOrder - """.trimIndent(), +SELECT + messages.id AS id, + uid, + folder_id, + sender_list, + to_list, + cc_list, + date, + internal_date, + subject, + preview_type, + preview, + read, + flagged, + answered, + forwarded, + attachment_count, + root +FROM messages +JOIN threads ON (threads.message_id = messages.id) +LEFT JOIN FOLDERS ON (folders.id = messages.folder_id) +WHERE + ($selection) + AND empty = 0 AND deleted = 0 +ORDER BY $sortOrder + """, selectionArgs, ).use { cursor -> val cursorMessageAccessor = CursorMessageAccessor(cursor, includesThreadCount = false) @@ -72,60 +72,60 @@ internal class RetrieveMessageListOperations(private val lockableDatabase: Locka return lockableDatabase.execute(false) { database -> database.rawQuery( """ - SELECT - messages.id AS id, - uid, - folder_id, - sender_list, - to_list, - cc_list, - aggregated.date AS date, - aggregated.internal_date AS internal_date, - subject, - preview_type, - preview, - aggregated.read AS read, - aggregated.flagged AS flagged, - aggregated.answered AS answered, - aggregated.forwarded AS forwarded, - aggregated.attachment_count AS attachment_count, - root, - aggregated.thread_count AS thread_count - FROM ( - SELECT - threads.root AS thread_root, - MAX(date) AS date, - MAX(internal_date) AS internal_date, - MIN(read) AS read, - MAX(flagged) AS flagged, - MIN(answered) AS answered, - MIN(forwarded) AS forwarded, - SUM(attachment_count) AS attachment_count, - COUNT(threads.root) AS thread_count - FROM messages - JOIN threads ON (threads.message_id = messages.id) - JOIN folders ON (folders.id = messages.folder_id) - WHERE - threads.root IN ( - SELECT threads.root - FROM messages - JOIN threads ON (threads.message_id = messages.id) - WHERE messages.empty = 0 AND messages.deleted = 0 - ) - AND ($selection) - AND messages.empty = 0 AND messages.deleted = 0 - GROUP BY threads.root - ) aggregated - JOIN threads ON (threads.root = aggregated.thread_root) - JOIN messages ON ( - messages.id = threads.message_id - AND messages.empty = 0 AND messages.deleted = 0 - AND messages.date = aggregated.date - ) - JOIN folders ON (folders.id = messages.folder_id) - GROUP BY threads.root - ORDER BY $orderBy - """.trimIndent(), +SELECT + messages.id AS id, + uid, + folder_id, + sender_list, + to_list, + cc_list, + aggregated.date AS date, + aggregated.internal_date AS internal_date, + subject, + preview_type, + preview, + aggregated.read AS read, + aggregated.flagged AS flagged, + aggregated.answered AS answered, + aggregated.forwarded AS forwarded, + aggregated.attachment_count AS attachment_count, + root, + aggregated.thread_count AS thread_count +FROM ( + SELECT + threads.root AS thread_root, + MAX(date) AS date, + MAX(internal_date) AS internal_date, + MIN(read) AS read, + MAX(flagged) AS flagged, + MIN(answered) AS answered, + MIN(forwarded) AS forwarded, + SUM(attachment_count) AS attachment_count, + COUNT(threads.root) AS thread_count + FROM messages + JOIN threads ON (threads.message_id = messages.id) + JOIN folders ON (folders.id = messages.folder_id) + WHERE + threads.root IN ( + SELECT threads.root + FROM messages + JOIN threads ON (threads.message_id = messages.id) + WHERE messages.empty = 0 AND messages.deleted = 0 + ) + AND ($selection) + AND messages.empty = 0 AND messages.deleted = 0 + GROUP BY threads.root +) aggregated +JOIN threads ON (threads.root = aggregated.thread_root) +JOIN messages ON ( + messages.id = threads.message_id + AND messages.empty = 0 AND messages.deleted = 0 + AND messages.date = aggregated.date +) +JOIN folders ON (folders.id = messages.folder_id) +GROUP BY threads.root +ORDER BY $orderBy + """, selectionArgs, ).use { cursor -> val cursorMessageAccessor = CursorMessageAccessor(cursor, includesThreadCount = true) @@ -145,32 +145,32 @@ internal class RetrieveMessageListOperations(private val lockableDatabase: Locka return lockableDatabase.execute(false) { database -> database.rawQuery( """ - SELECT - messages.id AS id, - uid, - folder_id, - sender_list, - to_list, - cc_list, - date, - internal_date, - subject, - preview_type, - preview, - read, - flagged, - answered, - forwarded, - attachment_count, - root - FROM threads - JOIN messages ON (messages.id = threads.message_id) - LEFT JOIN FOLDERS ON (folders.id = messages.folder_id) - WHERE - root = ? - AND empty = 0 AND deleted = 0 - ORDER BY $sortOrder - """.trimIndent(), +SELECT + messages.id AS id, + uid, + folder_id, + sender_list, + to_list, + cc_list, + date, + internal_date, + subject, + preview_type, + preview, + read, + flagged, + answered, + forwarded, + attachment_count, + root +FROM threads +JOIN messages ON (messages.id = threads.message_id) +LEFT JOIN FOLDERS ON (folders.id = messages.folder_id) +WHERE + root = ? + AND empty = 0 AND deleted = 0 +ORDER BY $sortOrder + """, arrayOf(threadId.toString()), ).use { cursor -> val cursorMessageAccessor = CursorMessageAccessor(cursor, includesThreadCount = false) 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 52544b1f4b..21491c98fe 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 @@ -20,11 +20,11 @@ internal class ThreadMessageOperations { fun getMessageThreadHeaders(database: SQLiteDatabase, messageId: Long): ThreadHeaders { return database.rawQuery( """ - SELECT messages.message_id, message_parts.header - FROM messages - LEFT JOIN message_parts ON (messages.message_part_id = message_parts.id) - WHERE messages.id = ? - """.trimIndent(), +SELECT messages.message_id, message_parts.header +FROM messages +LEFT JOIN message_parts ON (messages.message_part_id = message_parts.id) +WHERE messages.id = ? + """, arrayOf(messageId.toString()), ).use { cursor -> if (!cursor.moveToFirst()) error("Message not found: $messageId") @@ -157,14 +157,14 @@ internal class ThreadMessageOperations { return db.rawQuery( """ - SELECT t.id, t.message_id, t.root, t.parent - FROM messages m - LEFT JOIN threads t ON (t.message_id = m.id) - WHERE m.folder_id = ? AND m.message_id = ? - ${if (onlyEmpty) "AND m.empty = 1 " else ""} - ORDER BY m.id - LIMIT 1 - """.trimIndent(), +SELECT t.id, t.message_id, t.root, t.parent +FROM messages m +LEFT JOIN threads t ON (t.message_id = m.id) +WHERE m.folder_id = ? AND m.message_id = ? +${if (onlyEmpty) "AND m.empty = 1 " else ""} +ORDER BY m.id +LIMIT 1 + """, arrayOf(folderId.toString(), messageIdHeader) ).use { cursor -> if (cursor.moveToFirst()) { -- GitLab From 2991b4b83ebc1fc0718d9308d1992d67feb7c774 Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 20 Sep 2022 20:30:17 +0200 Subject: [PATCH 19/26] Remove Iconics and FontAwesome --- app/ui/legacy/build.gradle | 2 -- .../account/AccountFallbackImageProvider.kt | 19 ++++++++----------- .../res/drawable/drawer_account_fallback.xml | 9 +++++++++ 3 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 app/ui/legacy/src/main/res/drawable/drawer_account_fallback.xml diff --git a/app/ui/legacy/build.gradle b/app/ui/legacy/build.gradle index 9e3a6ab374..8dd5f7aded 100644 --- a/app/ui/legacy/build.gradle +++ b/app/ui/legacy/build.gradle @@ -33,8 +33,6 @@ dependencies { implementation "com.splitwise:tokenautocomplete:4.0.0-beta01" implementation "de.cketti.safecontentresolver:safe-content-resolver-v21:1.0.0" implementation 'com.mikepenz:materialdrawer:8.4.5' - implementation 'com.mikepenz:materialdrawer-iconics:8.4.5' - implementation 'com.mikepenz:fontawesome-typeface:5.9.0.0-kotlin@aar' implementation 'com.github.ByteHamster:SearchPreference:v2.3.0' implementation "com.mikepenz:fastadapter:${versions.fastAdapter}" implementation "com.mikepenz:fastadapter-extensions-drag:${versions.fastAdapter}" diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/account/AccountFallbackImageProvider.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/account/AccountFallbackImageProvider.kt index 8454b28b3b..a25ee07d2e 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/account/AccountFallbackImageProvider.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/account/AccountFallbackImageProvider.kt @@ -2,24 +2,21 @@ package com.fsck.k9.ui.account import android.content.Context import android.graphics.drawable.Drawable +import androidx.core.content.ContextCompat +import androidx.core.graphics.BlendModeColorFilterCompat +import androidx.core.graphics.BlendModeCompat import com.fsck.k9.ui.R -import com.mikepenz.iconics.IconicsDrawable -import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesome -import com.mikepenz.iconics.utils.backgroundColorInt -import com.mikepenz.iconics.utils.colorRes -import com.mikepenz.iconics.utils.paddingDp -import com.mikepenz.iconics.utils.sizeDp /** * Provides a [Drawable] for the account using the account's color as background color. */ class AccountFallbackImageProvider(private val context: Context) { fun getDrawable(color: Int): Drawable { - return IconicsDrawable(context, FontAwesome.Icon.faw_user_alt).apply { - colorRes = R.color.material_drawer_profile_icon - backgroundColorInt = color - sizeDp = 56 - paddingDp = 12 + val drawable = ContextCompat.getDrawable(context, R.drawable.drawer_account_fallback) + ?: error("Error loading drawable") + + return drawable.mutate().apply { + colorFilter = BlendModeColorFilterCompat.createBlendModeColorFilterCompat(color, BlendModeCompat.DST_OVER) } } } diff --git a/app/ui/legacy/src/main/res/drawable/drawer_account_fallback.xml b/app/ui/legacy/src/main/res/drawable/drawer_account_fallback.xml new file mode 100644 index 0000000000..a3b91800c4 --- /dev/null +++ b/app/ui/legacy/src/main/res/drawable/drawer_account_fallback.xml @@ -0,0 +1,9 @@ + + + -- GitLab From ee3094d7fe72b075b70c7d7536af221e009c4262 Mon Sep 17 00:00:00 2001 From: cketti Date: Fri, 23 Sep 2022 11:11:32 +0200 Subject: [PATCH 20/26] Version 6.306 --- app/k9mail/build.gradle | 4 ++-- app/ui/legacy/src/main/res/raw/changelog_master.xml | 8 ++++++++ fastlane/metadata/android/en-US/changelogs/33006.txt | 6 ++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/33006.txt diff --git a/app/k9mail/build.gradle b/app/k9mail/build.gradle index 846334f415..19f4e5440c 100644 --- a/app/k9mail/build.gradle +++ b/app/k9mail/build.gradle @@ -50,8 +50,8 @@ android { applicationId "com.fsck.k9" testApplicationId "com.fsck.k9.tests" - versionCode 33005 - versionName '6.306-SNAPSHOT' + versionCode 33006 + versionName '6.306' // 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 efa4f2abf1..adf22b9b7e 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,14 @@ Locale-specific versions are kept in res/raw-/changelog.xml. --> + + Added a monochromatic app icon for Android 13 + Changed the UI component used for the message list; now changes to the list will be animated + Removed the volume key navigation for list views because it doesn't play nice with the above change + Fixed a bug that lead to the search input field being focused on app start on some devices + Restored the previous behavior of "show next message after delete" + A lot of internal changes and some minor performance improvements + Fixed a bug that could lead to a crash when opening the message list diff --git a/fastlane/metadata/android/en-US/changelogs/33006.txt b/fastlane/metadata/android/en-US/changelogs/33006.txt new file mode 100644 index 0000000000..f03b46b82e --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/33006.txt @@ -0,0 +1,6 @@ +- Added a monochromatic app icon for Android 13 +- Changed the UI component used for the message list; now changes to the list will be animated +- Removed the volume key navigation for list views because it doesn't play nice with the above change +- Fixed a bug that lead to the search input field being focused on app start on some devices +- Restored the previous behavior of "show next message after delete" +- A lot of internal changes and some minor performance improvements -- GitLab From ecf52376ecad05c507f9e1ee3103df2150841daa Mon Sep 17 00:00:00 2001 From: cketti Date: Fri, 23 Sep 2022 13:54:37 +0200 Subject: [PATCH 21/26] Prepare for version 6.307 --- 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 19f4e5440c..a152b3f2fd 100644 --- a/app/k9mail/build.gradle +++ b/app/k9mail/build.gradle @@ -51,7 +51,7 @@ android { testApplicationId "com.fsck.k9.tests" versionCode 33006 - versionName '6.306' + versionName '6.307-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 3dc9dd2629399a2996e90ef13d354f1aeef7b84e Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 20 Sep 2022 15:22:34 +0200 Subject: [PATCH 22/26] Enable nonTransitiveRClass=true --- .../com/fsck/k9/external/MessageInfoHolder.java | 3 ++- .../notification/K9NotificationResourceProvider.kt | 2 +- .../fsck/k9/resources/K9AutocryptStringProvider.kt | 2 +- .../fsck/k9/resources/K9CoreResourceProvider.kt | 2 +- .../widget/list/MessageListRemoteViewFactory.java | 2 +- .../k9/widget/list/MessageListWidgetProvider.java | 2 +- .../unread/UnreadWidgetConfigurationActivity.kt | 3 ++- .../unread/UnreadWidgetConfigurationFragment.kt | 11 ++++++----- .../k9/widget/unread/UnreadWidgetDataProvider.kt | 4 ++-- .../java/com/fsck/k9/account/AccountCreator.kt | 2 +- .../src/main/java/com/fsck/k9/ui/K9Drawer.kt | 14 ++++++++------ .../settings/account/OpenPgpAppSelectDialog.java | 9 +++++---- .../ui/settings/general/GeneralSettingsFragment.kt | 3 ++- .../k9/ui/settings/general/LanguagePreference.kt | 2 +- .../src/test/java/com/fsck/k9/ui/K9DrawerTest.kt | 1 + gradle.properties | 1 + 16 files changed, 36 insertions(+), 27 deletions(-) diff --git a/app/k9mail/src/main/java/com/fsck/k9/external/MessageInfoHolder.java b/app/k9mail/src/main/java/com/fsck/k9/external/MessageInfoHolder.java index a1142f9bd1..16f7bc573a 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/external/MessageInfoHolder.java +++ b/app/k9mail/src/main/java/com/fsck/k9/external/MessageInfoHolder.java @@ -1,5 +1,6 @@ package com.fsck.k9.external; + import java.util.Date; import android.content.Context; @@ -7,13 +8,13 @@ import android.text.SpannableStringBuilder; import com.fsck.k9.Account; import com.fsck.k9.K9; -import com.fsck.k9.R; import com.fsck.k9.helper.Contacts; import com.fsck.k9.helper.MessageHelper; import com.fsck.k9.mail.Address; import com.fsck.k9.mail.Flag; import com.fsck.k9.mail.Message.RecipientType; import com.fsck.k9.mailstore.LocalMessage; +import com.fsck.k9.ui.R; class MessageInfoHolder { public Date compareDate; 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 033030e8d0..aac16b241e 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 @@ -1,7 +1,7 @@ package com.fsck.k9.notification import android.content.Context -import com.fsck.k9.R +import com.fsck.k9.ui.R class K9NotificationResourceProvider(private val context: Context) : NotificationResourceProvider { override val iconWarning: Int = R.drawable.notification_icon_warning diff --git a/app/k9mail/src/main/java/com/fsck/k9/resources/K9AutocryptStringProvider.kt b/app/k9mail/src/main/java/com/fsck/k9/resources/K9AutocryptStringProvider.kt index a24958e15e..411ad4eaba 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/resources/K9AutocryptStringProvider.kt +++ b/app/k9mail/src/main/java/com/fsck/k9/resources/K9AutocryptStringProvider.kt @@ -1,8 +1,8 @@ package com.fsck.k9.resources import android.content.Context -import com.fsck.k9.R import com.fsck.k9.autocrypt.AutocryptStringProvider +import com.fsck.k9.ui.R class K9AutocryptStringProvider(private val context: Context) : AutocryptStringProvider { override fun transferMessageSubject(): String = context.getString(R.string.ac_transfer_msg_subject) diff --git a/app/k9mail/src/main/java/com/fsck/k9/resources/K9CoreResourceProvider.kt b/app/k9mail/src/main/java/com/fsck/k9/resources/K9CoreResourceProvider.kt index 270736c3ee..d2ec95094c 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/resources/K9CoreResourceProvider.kt +++ b/app/k9mail/src/main/java/com/fsck/k9/resources/K9CoreResourceProvider.kt @@ -2,8 +2,8 @@ package com.fsck.k9.resources import android.content.Context import com.fsck.k9.CoreResourceProvider -import com.fsck.k9.R import com.fsck.k9.notification.PushNotificationState +import com.fsck.k9.ui.R class K9CoreResourceProvider(private val context: Context) : CoreResourceProvider { override fun defaultSignature(): String = context.getString(R.string.default_signature) diff --git a/app/k9mail/src/main/java/com/fsck/k9/widget/list/MessageListRemoteViewFactory.java b/app/k9mail/src/main/java/com/fsck/k9/widget/list/MessageListRemoteViewFactory.java index 3d9af2ea24..5ebc411574 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/widget/list/MessageListRemoteViewFactory.java +++ b/app/k9mail/src/main/java/com/fsck/k9/widget/list/MessageListRemoteViewFactory.java @@ -147,7 +147,7 @@ public class MessageListRemoteViewFactory implements RemoteViewsService.RemoteVi @Override public RemoteViews getLoadingView() { RemoteViews loadingView = new RemoteViews(context.getPackageName(), R.layout.message_list_widget_loading); - loadingView.setTextViewText(R.id.loadingText, context.getString(R.string.mail_list_widget_loading)); + loadingView.setTextViewText(R.id.loadingText, context.getString(com.fsck.k9.ui.R.string.mail_list_widget_loading)); loadingView.setViewVisibility(R.id.loadingText, View.VISIBLE); return loadingView; } diff --git a/app/k9mail/src/main/java/com/fsck/k9/widget/list/MessageListWidgetProvider.java b/app/k9mail/src/main/java/com/fsck/k9/widget/list/MessageListWidgetProvider.java index f6c799b7ee..c7a9ac0073 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/widget/list/MessageListWidgetProvider.java +++ b/app/k9mail/src/main/java/com/fsck/k9/widget/list/MessageListWidgetProvider.java @@ -46,7 +46,7 @@ public class MessageListWidgetProvider extends AppWidgetProvider { private void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId) { RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.message_list_widget_layout); - views.setTextViewText(R.id.folder, context.getString(R.string.integrated_inbox_title)); + views.setTextViewText(R.id.folder, context.getString(com.fsck.k9.ui.R.string.integrated_inbox_title)); Intent intent = new Intent(context, MessageListWidgetService.class); intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId); diff --git a/app/k9mail/src/main/java/com/fsck/k9/widget/unread/UnreadWidgetConfigurationActivity.kt b/app/k9mail/src/main/java/com/fsck/k9/widget/unread/UnreadWidgetConfigurationActivity.kt index d3a617f9df..fa1662b0db 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/widget/unread/UnreadWidgetConfigurationActivity.kt +++ b/app/k9mail/src/main/java/com/fsck/k9/widget/unread/UnreadWidgetConfigurationActivity.kt @@ -6,6 +6,7 @@ import com.fsck.k9.R import com.fsck.k9.ui.base.K9Activity import com.fsck.k9.ui.fragmentTransaction import timber.log.Timber +import com.fsck.k9.ui.R as UiR /** * Activity to select an account for the unread widget. @@ -15,7 +16,7 @@ class UnreadWidgetConfigurationActivity : K9Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setLayout(R.layout.activity_unread_widget_configuration) - setTitle(R.string.unread_widget_select_account) + setTitle(UiR.string.unread_widget_select_account) var appWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID val extras = intent.extras diff --git a/app/k9mail/src/main/java/com/fsck/k9/widget/unread/UnreadWidgetConfigurationFragment.kt b/app/k9mail/src/main/java/com/fsck/k9/widget/unread/UnreadWidgetConfigurationFragment.kt index 92a3a75647..5c9a19f73b 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/widget/unread/UnreadWidgetConfigurationFragment.kt +++ b/app/k9mail/src/main/java/com/fsck/k9/widget/unread/UnreadWidgetConfigurationFragment.kt @@ -18,6 +18,7 @@ import com.fsck.k9.search.SearchAccount import com.fsck.k9.ui.choosefolder.ChooseFolderActivity import com.takisoft.preferencex.PreferenceFragmentCompat import org.koin.android.ext.android.inject +import com.fsck.k9.ui.R as UiR class UnreadWidgetConfigurationFragment : PreferenceFragmentCompat() { private val preferences: Preferences by inject() @@ -48,7 +49,7 @@ class UnreadWidgetConfigurationFragment : PreferenceFragmentCompat() { unreadFolderEnabled = findPreference(PREFERENCE_UNREAD_FOLDER_ENABLED)!! unreadFolderEnabled.onPreferenceChangeListener = Preference.OnPreferenceChangeListener { _, _ -> - unreadFolder.summary = getString(R.string.unread_widget_folder_summary) + unreadFolder.summary = getString(UiR.string.unread_widget_folder_summary) selectedFolderId = null selectedFolderDisplayName = null true @@ -116,7 +117,7 @@ class UnreadWidgetConfigurationFragment : PreferenceFragmentCompat() { selectedAccountUuid = accountUuid selectedFolderId = null selectedFolderDisplayName = null - unreadFolder.summary = getString(R.string.unread_widget_folder_summary) + unreadFolder.summary = getString(UiR.string.unread_widget_folder_summary) if (SearchAccount.UNIFIED_INBOX == selectedAccountUuid) { handleSearchAccount() } else { @@ -126,7 +127,7 @@ class UnreadWidgetConfigurationFragment : PreferenceFragmentCompat() { private fun handleSearchAccount() { if (SearchAccount.UNIFIED_INBOX == selectedAccountUuid) { - unreadAccount.setSummary(R.string.unread_widget_unified_inbox_account_summary) + unreadAccount.setSummary(UiR.string.unread_widget_unified_inbox_account_summary) } unreadFolderEnabled.isEnabled = false unreadFolderEnabled.isChecked = false @@ -168,10 +169,10 @@ class UnreadWidgetConfigurationFragment : PreferenceFragmentCompat() { private fun validateWidget(): Boolean { if (selectedAccountUuid == null) { - Toast.makeText(requireContext(), R.string.unread_widget_account_not_selected, Toast.LENGTH_LONG).show() + Toast.makeText(requireContext(), UiR.string.unread_widget_account_not_selected, Toast.LENGTH_LONG).show() return false } else if (unreadFolderEnabled.isChecked && selectedFolderId == null) { - Toast.makeText(requireContext(), R.string.unread_widget_folder_not_selected, Toast.LENGTH_LONG).show() + Toast.makeText(requireContext(), UiR.string.unread_widget_folder_not_selected, Toast.LENGTH_LONG).show() return false } return true diff --git a/app/k9mail/src/main/java/com/fsck/k9/widget/unread/UnreadWidgetDataProvider.kt b/app/k9mail/src/main/java/com/fsck/k9/widget/unread/UnreadWidgetDataProvider.kt index 4766a43beb..78df3d9cf5 100644 --- a/app/k9mail/src/main/java/com/fsck/k9/widget/unread/UnreadWidgetDataProvider.kt +++ b/app/k9mail/src/main/java/com/fsck/k9/widget/unread/UnreadWidgetDataProvider.kt @@ -4,7 +4,6 @@ import android.content.Context import android.content.Intent import com.fsck.k9.Account import com.fsck.k9.Preferences -import com.fsck.k9.R import com.fsck.k9.activity.MessageList import com.fsck.k9.controller.MessagingController import com.fsck.k9.mailstore.FolderRepository @@ -13,6 +12,7 @@ import com.fsck.k9.search.SearchAccount import com.fsck.k9.ui.folders.FolderNameFormatterFactory import com.fsck.k9.ui.messagelist.DefaultFolderProvider import timber.log.Timber +import com.fsck.k9.ui.R as UiR class UnreadWidgetDataProvider( private val context: Context, @@ -68,7 +68,7 @@ class UnreadWidgetDataProvider( val accountName = account.displayName val folderDisplayName = getFolderDisplayName(account, folderId) - val title = context.getString(R.string.unread_widget_title, accountName, folderDisplayName) + val title = context.getString(UiR.string.unread_widget_title, accountName, folderDisplayName) val unreadCount = messagingController.getFolderUnreadMessageCount(account, folderId) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/account/AccountCreator.kt b/app/ui/legacy/src/main/java/com/fsck/k9/account/AccountCreator.kt index e3f49d16a9..db6c0824d2 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/account/AccountCreator.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/account/AccountCreator.kt @@ -3,9 +3,9 @@ package com.fsck.k9.account import android.content.res.Resources import com.fsck.k9.Account.DeletePolicy import com.fsck.k9.Preferences +import com.fsck.k9.core.R import com.fsck.k9.mail.ConnectionSecurity import com.fsck.k9.preferences.Protocols -import com.fsck.k9.ui.R import com.fsck.k9.ui.helper.MaterialColors /** 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 7a8e4feaa0..33ea62825a 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 @@ -56,6 +56,8 @@ import org.koin.androidx.viewmodel.ext.android.viewModel import org.koin.core.component.KoinComponent import org.koin.core.component.inject import org.koin.core.parameter.parametersOf +import com.fsck.k9.core.R as CoreR +import com.mikepenz.materialdrawer.R as MaterialDrawerR private const val UNREAD_SYMBOL = "\u2B24" private const val STARRED_SYMBOL = "\u2605" @@ -466,8 +468,8 @@ class K9Drawer(private val parent: MessageList, savedInstanceState: Bundle?) : K } private fun getDarkThemeAccentColor(color: Int): Int { - val lightColors = resources.getIntArray(R.array.account_colors) - val darkColors = resources.getIntArray(R.array.drawer_account_accent_color_dark_theme) + val lightColors = resources.getIntArray(CoreR.array.account_colors) + val darkColors = resources.getIntArray(CoreR.array.drawer_account_accent_color_dark_theme) val index = lightColors.indexOf(color) return if (index == -1) color else darkColors[index] } @@ -537,11 +539,11 @@ class K9Drawer(private val parent: MessageList, savedInstanceState: Bundle?) : K private fun Context.obtainDrawerTextColor(): Int { val styledAttributes = obtainStyledAttributes( null, - R.styleable.MaterialDrawerSliderView, - R.attr.materialDrawerStyle, - R.style.Widget_MaterialDrawerStyle + MaterialDrawerR.styleable.MaterialDrawerSliderView, + MaterialDrawerR.attr.materialDrawerStyle, + MaterialDrawerR.style.Widget_MaterialDrawerStyle ) - val textColor = styledAttributes.getColor(R.styleable.MaterialDrawerSliderView_materialDrawerPrimaryText, 0) + val textColor = styledAttributes.getColor(MaterialDrawerR.styleable.MaterialDrawerSliderView_materialDrawerPrimaryText, 0) styledAttributes.recycle() return textColor diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/OpenPgpAppSelectDialog.java b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/OpenPgpAppSelectDialog.java index 18af4fcf6d..512f385ddc 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/OpenPgpAppSelectDialog.java +++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/account/OpenPgpAppSelectDialog.java @@ -110,8 +110,8 @@ public class OpenPgpAppSelectDialog extends K9Activity { Context context = getActivity(); OpenPgpProviderEntry noneEntry = new OpenPgpProviderEntry(null, - context.getString(R.string.openpgp_list_preference_none), - getResources().getDrawable(R.drawable.ic_action_cancel_launchersize_light)); + context.getString(org.openintents.openpgp.R.string.openpgp_list_preference_none), + getResources().getDrawable(org.openintents.openpgp.R.drawable.ic_action_cancel_launchersize_light)); openPgpProviderList.add(noneEntry); // search for OpenPGP providers... @@ -144,8 +144,9 @@ public class OpenPgpAppSelectDialog extends K9Activity { Drawable icon = resolveInfo.activityInfo.loadIcon(context.getPackageManager()); String marketName = String.valueOf(resolveInfo.activityInfo.applicationInfo .loadLabel(context.getPackageManager())); - String simpleName = String.format(context.getString(R.string - .openpgp_install_openkeychain_via), marketName); + String simpleName = String.format( + context.getString(org.openintents.openpgp.R.string.openpgp_install_openkeychain_via), + marketName); openPgpProviderList.add(new OpenPgpProviderEntry(OPENKEYCHAIN_PACKAGE, simpleName, icon, marketIntent)); } diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsFragment.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsFragment.kt index f8d31ccab3..bf27905f46 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsFragment.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/general/GeneralSettingsFragment.kt @@ -14,6 +14,7 @@ import com.google.android.material.snackbar.Snackbar import com.takisoft.preferencex.PreferenceFragmentCompat import org.koin.android.ext.android.inject import org.koin.androidx.viewmodel.ext.android.viewModel +import com.fsck.k9.core.R as CoreR class GeneralSettingsFragment : PreferenceFragmentCompat() { private val viewModel: GeneralSettingsViewModel by viewModel() @@ -74,7 +75,7 @@ class GeneralSettingsFragment : PreferenceFragmentCompat() { (findPreference(PREFERENCE_THEME) as? ListPreference)?.apply { if (Build.VERSION.SDK_INT < 28) { setEntries(R.array.theme_entries_legacy) - setEntryValues(R.array.theme_values_legacy) + setEntryValues(CoreR.array.theme_values_legacy) } } } diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/general/LanguagePreference.kt b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/general/LanguagePreference.kt index f83487f81b..8884c2f730 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/general/LanguagePreference.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/ui/settings/general/LanguagePreference.kt @@ -5,7 +5,7 @@ import android.content.Context import android.util.AttributeSet import androidx.core.content.res.TypedArrayUtils import androidx.preference.ListPreference -import com.fsck.k9.ui.R +import com.fsck.k9.core.R class LanguagePreference @JvmOverloads diff --git a/app/ui/legacy/src/test/java/com/fsck/k9/ui/K9DrawerTest.kt b/app/ui/legacy/src/test/java/com/fsck/k9/ui/K9DrawerTest.kt index 48c04348c1..7db67cbf5b 100644 --- a/app/ui/legacy/src/test/java/com/fsck/k9/ui/K9DrawerTest.kt +++ b/app/ui/legacy/src/test/java/com/fsck/k9/ui/K9DrawerTest.kt @@ -1,6 +1,7 @@ package com.fsck.k9.ui import com.fsck.k9.RobolectricTest +import com.fsck.k9.core.R import org.junit.Assert.assertEquals import org.junit.Test import org.robolectric.RuntimeEnvironment diff --git a/gradle.properties b/gradle.properties index 3628962fa2..2d5e8441c2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,3 +2,4 @@ android.useAndroidX=true android.enableJetifier=false org.gradle.jvmargs=-Xmx1400m org.gradle.parallel=true +android.nonTransitiveRClass=true -- GitLab From c7c0b0aa23205f07f0d98c64a9139d50b3d29f4a Mon Sep 17 00:00:00 2001 From: cketti Date: Thu, 22 Sep 2022 17:02:12 +0200 Subject: [PATCH 23/26] Update the message list when the "more messages" value of a folder changes --- .../main/java/com/fsck/k9/mailstore/NotifierMessageStore.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/core/src/main/java/com/fsck/k9/mailstore/NotifierMessageStore.kt b/app/core/src/main/java/com/fsck/k9/mailstore/NotifierMessageStore.kt index 488dbbffd3..0a63f3076a 100644 --- a/app/core/src/main/java/com/fsck/k9/mailstore/NotifierMessageStore.kt +++ b/app/core/src/main/java/com/fsck/k9/mailstore/NotifierMessageStore.kt @@ -58,6 +58,11 @@ class NotifierMessageStore( notifyChange() } + override fun setMoreMessages(folderId: Long, moreMessages: MoreMessages) { + messageStore.setMoreMessages(folderId, moreMessages) + notifyChange() + } + private fun notifyChange() { localStore.notifyChange() } -- GitLab From 11c27d7fe99ed66c5cc8f7b56d65c091f012ed2a Mon Sep 17 00:00:00 2001 From: cketti Date: Mon, 26 Sep 2022 11:12:50 +0200 Subject: [PATCH 24/26] Use proper theme attribute for the background of regular message list items --- .../src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt index 9f150ffbd5..f9ee7cf1e4 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt @@ -55,7 +55,7 @@ class MessageListAdapter internal constructor( private val previewTextColor: Int = theme.resolveColorAttribute(R.attr.messageListPreviewTextColor) private val activeItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListActiveItemBackgroundColor) private val selectedItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListSelectedBackgroundColor) - private val regularItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListUnreadItemBackgroundColor) + private val regularItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListRegularItemBackgroundColor) private val readItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListReadItemBackgroundColor) private val unreadItemBackgroundColor: Int = theme.resolveColorAttribute(R.attr.messageListUnreadItemBackgroundColor) -- GitLab From ef23c076e40506e358a4541e17416f95bc593515 Mon Sep 17 00:00:00 2001 From: cketti Date: Mon, 26 Sep 2022 17:58:24 +0200 Subject: [PATCH 25/26] Update translations --- .../legacy/src/main/res/values-ar/strings.xml | 1 - .../legacy/src/main/res/values-be/strings.xml | 3 - .../legacy/src/main/res/values-bg/strings.xml | 3 - .../legacy/src/main/res/values-br/strings.xml | 3 - .../legacy/src/main/res/values-ca/strings.xml | 3 - .../legacy/src/main/res/values-cs/strings.xml | 5 +- .../legacy/src/main/res/values-cy/strings.xml | 3 - .../legacy/src/main/res/values-da/strings.xml | 3 - .../legacy/src/main/res/values-de/strings.xml | 4 +- .../legacy/src/main/res/values-el/strings.xml | 98 +++++++++++++------ .../legacy/src/main/res/values-eo/strings.xml | 3 - .../legacy/src/main/res/values-es/strings.xml | 4 +- .../legacy/src/main/res/values-et/strings.xml | 3 - .../legacy/src/main/res/values-eu/strings.xml | 3 - .../legacy/src/main/res/values-fa/strings.xml | 3 - .../legacy/src/main/res/values-fi/strings.xml | 4 +- .../legacy/src/main/res/values-fr/strings.xml | 3 - .../legacy/src/main/res/values-fy/strings.xml | 4 +- .../legacy/src/main/res/values-gd/strings.xml | 3 - .../src/main/res/values-gl-rES/strings.xml | 3 - .../legacy/src/main/res/values-gl/strings.xml | 3 - .../legacy/src/main/res/values-hr/strings.xml | 3 - .../legacy/src/main/res/values-hu/strings.xml | 3 - .../legacy/src/main/res/values-in/strings.xml | 3 - .../legacy/src/main/res/values-is/strings.xml | 3 - .../legacy/src/main/res/values-it/strings.xml | 3 - .../legacy/src/main/res/values-iw/strings.xml | 3 - .../legacy/src/main/res/values-ja/strings.xml | 4 +- .../legacy/src/main/res/values-ko/strings.xml | 3 - .../legacy/src/main/res/values-lt/strings.xml | 3 - .../legacy/src/main/res/values-lv/strings.xml | 3 - .../legacy/src/main/res/values-ml/strings.xml | 3 - .../legacy/src/main/res/values-nb/strings.xml | 3 - .../legacy/src/main/res/values-nl/strings.xml | 4 +- .../legacy/src/main/res/values-pl/strings.xml | 4 +- .../src/main/res/values-pt-rBR/strings.xml | 3 - .../src/main/res/values-pt-rPT/strings.xml | 3 - .../legacy/src/main/res/values-ro/strings.xml | 27 +++-- .../legacy/src/main/res/values-ru/strings.xml | 3 - .../legacy/src/main/res/values-sk/strings.xml | 3 - .../legacy/src/main/res/values-sl/strings.xml | 3 - .../legacy/src/main/res/values-sq/strings.xml | 3 - .../legacy/src/main/res/values-sr/strings.xml | 3 - .../legacy/src/main/res/values-sv/strings.xml | 4 +- .../legacy/src/main/res/values-tr/strings.xml | 3 - .../legacy/src/main/res/values-uk/strings.xml | 3 - .../src/main/res/values-zh-rCN/strings.xml | 4 +- .../src/main/res/values-zh-rTW/strings.xml | 35 +++---- 48 files changed, 113 insertions(+), 191 deletions(-) diff --git a/app/ui/legacy/src/main/res/values-ar/strings.xml b/app/ui/legacy/src/main/res/values-ar/strings.xml index bc50f68e22..a417f3f7ea 100644 --- a/app/ui/legacy/src/main/res/values-ar/strings.xml +++ b/app/ui/legacy/src/main/res/values-ar/strings.xml @@ -567,7 +567,6 @@ 500 مجلد 1000 مجلد الحركة - التصفح عبر أزرار التحكم في الصوت البريد الوارد الموحَّد كل الرسائل في مجلدات موحَّدة التوحيد diff --git a/app/ui/legacy/src/main/res/values-be/strings.xml b/app/ui/legacy/src/main/res/values-be/strings.xml index 429a82aaf1..19abf2bbdb 100644 --- a/app/ui/legacy/src/main/res/values-be/strings.xml +++ b/app/ui/legacy/src/main/res/values-be/strings.xml @@ -628,9 +628,6 @@ K-9 Mail - шматфункцыянальны свабодны паштовы к 1000 каталогаў Анімацыя Анімацыя інтэрфейсу - Навігацыя клавішамі гучнасці - У лісце - У спісе Агульная скрыня ўваходных лістоў для ўсіх акаўнтаў Усе атрыманыя Усе лісты са ўсіх каталогаў 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 e91d059336..70821881ff 100644 --- a/app/ui/legacy/src/main/res/values-bg/strings.xml +++ b/app/ui/legacy/src/main/res/values-bg/strings.xml @@ -625,9 +625,6 @@ K-9 Mail е мощен, безплатен имейл клиент за Андр 1000 папки Анимация Изплозване на ярки виулани ефекти - Навигация с клавиш за звука - В преглед на съобщението - В списъка със съобщения Покажи унифицирана папка Входящи Обща входяща кутия Всички съобщения в общата входяща кутия 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 1209c736f1..9e6631affe 100644 --- a/app/ui/legacy/src/main/res/values-br/strings.xml +++ b/app/ui/legacy/src/main/res/values-br/strings.xml @@ -597,9 +597,6 @@ Danevellit beugoù, kenlabourit war keweriusterioù nevez ha savit goulennoù wa 1000 teuliad Bliverezh Ober gant efedoù gwel gaudy - Merdeiñ dre afelloù an ampled - Er gwel kemennadenn - Er gwel roll Boest degemer unanet Holl gemennadennoù an teuliadoù unanet Unanañ 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 e0a179622f..8ef8f542b6 100644 --- a/app/ui/legacy/src/main/res/values-ca/strings.xml +++ b/app/ui/legacy/src/main/res/values-ca/strings.xml @@ -682,9 +682,6 @@ Si us plau, envieu informes d\'errors, contribuïu-hi amb noves millores i feu p 1000 carpetes Animació Utilitza efectes visuals cridaners - Navegació amb botons de volum - Vista del missatge - A la vista de llistes Mostra la safata d\'entrada unificada Mostra el recompte de destacats. Bústia unificada 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 f5303c07ac..8593a196f4 100644 --- a/app/ui/legacy/src/main/res/values-cs/strings.xml +++ b/app/ui/legacy/src/main/res/values-cs/strings.xml @@ -95,7 +95,7 @@ Hlášení o chyb, úpravy pro nové funkce a dotazy zadávejte prostřednictví Odeslat… Přesměrovat… Hotovo - Zrušit + Zahodit Uložit jako koncept Zkontrolovat poštu Odeslat zprávy @@ -686,9 +686,6 @@ Hlášení o chyb, úpravy pro nové funkce a dotazy zadávejte prostřednictví 1000 složek Animace Používat okázalé vizuální efekty - Navigace tlačítky hlasitosti - Zobrazení zpráv - Různá zobrazení seznamů Ukázat sjednocený pohled na doručenou poštu Zobrazit počet označených hvězdičkou Integrovaná doručená pošta 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 8d54430916..b534b01fe7 100644 --- a/app/ui/legacy/src/main/res/values-cy/strings.xml +++ b/app/ui/legacy/src/main/res/values-cy/strings.xml @@ -680,9 +680,6 @@ Plîs rho wybod am unrhyw wallau, syniadau am nodweddion newydd, neu ofyn cwesti 1000 o ffolderi Animeiddiad Defnyddio effeithiau gweledol dros ben llestri - Pori gyda\'r botymau sain - Wrth edrych ar neges - Wrth edrych ar restr Dangos mewnflwch unedig Mewnflwch Unedig Holl negeseuon pob cyfrif mewn un ffolder unedig 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 e4c3ecb9f7..b0d0213034 100644 --- a/app/ui/legacy/src/main/res/values-da/strings.xml +++ b/app/ui/legacy/src/main/res/values-da/strings.xml @@ -654,9 +654,6 @@ Rapporter venligst fejl, forslag til nye funktioner eller stil spørgsmål på: 1000 mapper Animation Anvend visuelle effekter - Volume-knap navigation - Mail-visning - Diverse listevisninger Vis Fælles Indbakke Fælles indbakke Alle mails i fælles mapper 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 900c5f9a61..32e2be4162 100644 --- a/app/ui/legacy/src/main/res/values-de/strings.xml +++ b/app/ui/legacy/src/main/res/values-de/strings.xml @@ -682,9 +682,7 @@ Bitte senden Sie Fehlerberichte, Ideen für neue Funktionen und stellen Sie Frag 1000 Ordner Animationen Aufwendige visuelle Effekte benutzen - Lauter/Leiser-Navigation - Nachrichtenansicht - Diverse Listenansichten + Navigation per Lautstärketasten in der Nachrichtenansicht Gemeinsamen Posteingang anzeigen Anzahl der Sterne anzeigen Gemeinsamer Posteingang diff --git a/app/ui/legacy/src/main/res/values-el/strings.xml b/app/ui/legacy/src/main/res/values-el/strings.xml index 1df7496674..7d5f4d51ba 100644 --- a/app/ui/legacy/src/main/res/values-el/strings.xml +++ b/app/ui/legacy/src/main/res/values-el/strings.xml @@ -9,10 +9,12 @@ The K-9 Dog Walkers Πηγαίος κώδικας - Άδεια χρήσης Apache, έκδοση 2.0. - Έργο Ανοιχτού Κώδικα + Άδεια χρήσης Apache, έκδοση 2.0 + Έργο ανοικτού κώδικα Ιστότοπος - Χώρος συζητήσεων χρηστών + Οδηγός χρήστη + Λήψη βοήθειας + Φόρουμ χρηστών Fediverse Twitter Βιβλιοθήκες @@ -71,12 +73,14 @@ Προώθηση ως συνημμένο Επιλογή Λογαριασμού Επιλογή φακέλου + Μετακίνηση σε… + Αντιγραφή σε… %d επιλέχθηκαν Επόμενο Προηγούμενο OK - Άκυρο + Ακύρωση Αποστολή Το θέμα είναι κενό, πατήστε επανάληψη για αποστολή Απάντηση @@ -103,17 +107,19 @@ Αναζήτηση Αναζήτηση παντού Αποτελέσματα αναζήτησης + Νέα μηνύματα Ρυθμίσεις Διαχείριση φακέλων Ρυθμίσεις λογαριασμού Διαγραφή λογαριασμού Σήμανση ως αναγνωσμένου - Διανομή + Κοινοποίηση Επιλογή αποστολέα Προσθήκη αστεριού Αφαίρεση αστεριού Αντιγραφή - Προβολή επικεφαλίδων + Κατάργηση συνδρομής + Προβολή κεφαλίδων Η διεύθυνση αντιγράφηκε στο πρόχειρο Οι διευθύνσεις αντιγράφηκαν στο πρόχειρο @@ -126,19 +132,19 @@ Θα ζητηθεί απόδειξη ανάγνωσης Δε θα ζητηθεί αποδεικτικό ανάγνωσης Προσθήκη συνημμένου - Άδειασμα σκουπιδιών + Άδειασμα απορριμμάτων Εξάλειψη - Περί + Πληροφορίες Ρυθμίσεις (Χωρίς θέμα) Χωρίς αποστολέα Φόρτωση μηνυμάτων\u2026 Σφάλμα σύνδεσης - Δε βρέθηκε το μήνυμα - Σφάλμα φόρτωση μηνύματος - Φόρτωση - έως %d περισσότερων + Δεν βρέθηκε το μήνυμα + Σφάλμα φόρτωσης μηνύματος + Φόρτωση έως + %d περισσότερων %.1f GB %.1f MB %.1f kB @@ -151,19 +157,22 @@ %1$d μη αναγνωσμένα (%2$s) + %1$d περισσότερα για %2$s Απάντηση - Ανάγνωση - Σήμανση όλων των αναγνωσμένων + Σήμανση ως αναγνωσμένο + Σήμανση όλων ως αναγνωσμένων Διαγραφή Διαγραφή όλων - Αρχειοθήκη + Αρχειοθέτηση Αρχειοθέτηση όλων Ανεπιθύμητα + Σφάλμα πιστοποιητικού Σφάλμα πιστοποιητικού για %s - Ελέγξτε τις ρυθμίσεις του εξυπηρετητή + Ελέγξτε τις ρυθμίσεις του διακομιστή σας Αποτυχία πιστοποίησης Αποτυχία πιστοποίησης %s. Ενημερώστε τις ρυθμίσεις του εξυπηρετητή σας. + Σφάλμα ειδοποίησης + Σφάλμα στην προσπάθεια δημιουργίας ειδοποίησης συστήματος για νέο μήνυμα. Η ατία είναι μάλλον λείπει ο ήχος της ειδοπίησης.\n\nΠατήστε για να ανοίξετε τις ρυθμίσεων των ειδοποιήσεων. Έλεγχος μηνύματος: %1$s:%2$s Έλεγχος μηνύματος Αποστολή μηνύματος: %s @@ -186,6 +195,9 @@ Καταγραφή πρόσθετων διαγνωστικών πληροφοριών Καταγραφή ευαίσθητων πληροφοριών Συνθηματικά μπορεί να εμφανιστούν στις καταγραφές. + Καταγραφές εξαγωγών + Επιτυχής εξαγωγή. Οι καταγραφές ίσως περιέχουν ευαίσθητες πληροφορίες. Προσέχετε σε ποιον/ποια τις στέλνετε. + Αποτυχία εξαγωγής Φόρτωση περισσότερων μηνυμάτων Προς:%s Θέμα @@ -197,11 +209,11 @@ Από: Προς: Κοιν: - %s έγραψε: + Ο/Η %s έγραψε: Στις %1$s, ο/η %2$s έγραψε: - Πρέπει να συμπεριλάβετε τουλάχιστον έναν παραλήπτη. + Πρέπει να προσθέσετε τουλάχιστον έναν παραλήπτη. Το πεδίο παραλήπτη περιέχει ελλιπή στοιχεία! - Δε βρέθηκαν διευθύνσεις ηλεκτρονικού ταχυδρομείου. + Δεν βρέθηκαν διευθύνσεις ηλεκτρονικού ταχυδρομείου. Μερικά συνημμένα δεν μπορούν να προωθηθούν γιατί δεν έχουν ληφθεί. Το μήνυμα δεν μπορεί να προωθηθεί επειδή μερικά συνημμένα δεν έχουν ληφθεί. Συμπερίληψη του παραθετιμένου μηνύματος @@ -211,19 +223,19 @@ Από: %1$s <%2$s> Προς: Κοιν: - Κρυφή Κοιν: + Κρυφή κοιν: Αδυναμία αποθήκευσης συνημμένου. - Προβολή εικόνων + Εμφάνιση εικόνων Δεν υπάρχει πρόγραμμα προβολής για %s. Λήψη πλήρους μηνύματος μέσω %1$s Από τον ίδιο αποστολέα Από %s - Το μήνυμα αγνοήθηκε. - Το μήνυμα αποθηκεύτηκε στα πρόχειρα. - Προβολή αστεριών + Το μήνυμα απορρίφθηκε + Το μήνυμα αποθηκεύτηκε ως πρόχειρο + Εμφάνιση αστεριών Τα αστέρια υποδηλώνουν σημαντικά μηνύματα - Προεπισκόπηση μηνυμάτων + Γραμμές προεπισκόπησης Εμφάνιση ονομάτων επιστολογράφων Εμφάνιση των ονομάτων των επιστολογράφων αντί των διευθύνσεων ηλεκτρονικού ταχυδρομείου Αποστολέας πάνω από το θέμα @@ -232,14 +244,15 @@ Χρήση ονομάτων επιστολογράφων από Επαφές όταν είναι διαθέσιμο Χρωματισμός Επαφών Να χρωματίζονται τα ονόματα στη λίστα επαφών + Χρώμα ονόματος επαφής Γραμματοσειρά σταθερού πλάτους Να χρησιμοποιείται γραμματοσειρά σταθερού πλάτους όταν προβάλλονται μηνύματα απλού κειμένου Αυτόματη προσαρμογή Ρύθμιση μεγέθους μηνύματος για να χωρά στην οθόνη Επιστροφή στη λίστα Επιστροφή στη λίστα μηνυμάτων μετά τη διαγραφή ενός μηνύματος - Προβολή επόμενου - Προβολή επόμενου μηνύματος μετά τη διαγραφή ενός μηνύματος + Εμφάνιση επόμενου μηνύματος μετά τη διαγραφή + Εμφάνιση επόμενου μηνύματος μετά τη διαγραφή ενός μηνύματος Επιβεβαίωση ενεργειών Προβολή διαλόγου όποτε εκτελούνται επιλεγμένες ενέργειες Διαγραφή @@ -255,13 +268,14 @@ Εμφάνιση κουμπιού «Διαγραφή» Ποτέ Για ειδοποίηση ενός μηνύματος - Πάντοτε + Πάντα Ειδοποιήσεις οθόνης κλειδώματος Χωρίς ειδοποιήσεις οθόνης κλειδώματος Όνομα εφαρμογής + Αριθμός νέων μηνυμάτων Αριθμός μηνυμάτων και αποστολείς Ομοίως με τότε που η οθόνη είναι ξεκλείδωτη - Ώρες Ησυχίας + Ώρες ησυχίας Απενεργοποιηση κουδουνίσματος, βουητού και αναβοσβησίματος τη νύχτα Απενεργοποίηση ειδοποιήσεων Πλήρης απενεργοποίηση ειδοποιήσεων για όσο διαρκούν οι Ώρες Ησυχίας @@ -270,8 +284,11 @@ Ρύθμιση νέου λογαριασμού Διεύθυνση ηλ. ταχυδρομείου Συνθηματικό + Αν θέλετε να χρησιμοποιήσετε αυτόν τον λογαριασμό ηλεκτρονικού ταχυδρομείου με το K-9 Mail πρέπει να συνδεθείτε και να παραχωρήσετε στην εφαρμογή πρόσβαση στα ηλεκτρονικά μηνύματά σας. + Σύνδεση + Σύνδεση μέσω Google Για να δείτε τον κωδικό σας εδώ, ενεργοποιήστε το κλείδωμα οθόνης σε αυτή την συσκευή. Επαλήθευση ταυτότητας @@ -295,6 +312,7 @@ Συνθηματικό, μεταβιβασμένο χωρίς ασφάλεια Κρυπτογραφημένο συνθηματικό Πιστοποιητικό πελάτη + OAuth 2.0 Ρυθμίσεις εισερχόμενης αλληλογραφίας Όνομα χρήστη Συνθηματικό @@ -313,6 +331,7 @@ Να μη διαγράφεται στον εξυπηρετητή Να διαγράφεται άμεσα από τον εξυπηρετητή Επισήμανση ως αναγνωσμένο στον εξυπηρετητή + Χρήση συμπίεσης Εξάλειψη διαγραμμένων μηνυμάτων Αμέσως Κατά την ενημέρωση @@ -377,6 +396,9 @@ Το όνομα χρήστη ή ο κωδικός πρόσβασης δεν είναι σωστά.\n(%s) Ο εξυπηρετητής παρουσίασε ένα μη εγκυρο πιστοποιητικό SSL. Κάποιες φορές αυτό συμβαίνει λόγω κακής ρύθμισής του. Άλλες φορές γιατί κάποιος προσπαθεί να επιτεθεί σε εσάς ή τον εξυπηρετητή ταχυδρομείου σας. Αν δεν είστε βέβαιοι τι συμβαίνει, επιλέξτε Απόρριψη και επικοινωνήστε με τους διαχειριστές του εξυπηρετητή ταχυδρομείου σας.\n\n(%s) Αδύνατη η σύνδεση στον εξυπηρετητή.\n(%s) + Η εξακρίβωση ακυρώθηκε + Η εξακρίβωση απέτυχε με το εξής σφάλμα: %s + Το πρωτόκολο OAuth 2.0 αυτή τη στιγμή δεν υποστηρίζεται από τον συγκεκριμένο πάροχο. Διόρθωση λεπτομερειών Συνέχεια Προχωρημένα @@ -531,11 +553,24 @@ Όνομα λογαριασμού Το όνομά σου Ειδοποιήσεις + Δόνηση Δόνηση + Μοτίβο δόνησης Εξ ορισμού + Μοτίβο 1 + Μοτίβο 2 + Μοτίβο 3 + Μοτίβο 4 + Μοτίβο 5 Επανάληψη δόνησης Κουδούνισμα με νέο μήνυμα Χρώμα λογαριασμού + Προεπιλεγμένο χρώμα συστήματος + Λευκό + Κόκκινο + Πράσινο + Μπλε + Κίτρινο Επιλογές σύνθεσης μηνύματος Εξ ορισμού σύνθεση Ορισμός εξ ορισμού Αποστολέα, Ιδιωτικής κοινοποίησης και υπογραφής @@ -642,9 +677,6 @@ 1000 φάκελοι Κινούμενα σχέδια Χρήση οπτικών εφέ gaudy - Πλοήγηση με πλήκτρο έντασης - Προβολή μηνύματος - Διάφορες προβολές λίστας Εμφάνιση Ενιαία Εισερχόμενα Εμφάνιση πλήθους επιλεγμένων Ενιαία Εισερχόμενα @@ -745,6 +777,7 @@ Η εισαγωγή ολοκληρώθηκε με επιτυχία Απαιτείται κωδικός πρόσβασης + Απαιτείται σύνδεση Δεν έχει εισαχθεί Αποτυχία εισαγωγής Αργότερα @@ -851,6 +884,7 @@ Κρυφή Κοιν: Προς Από: + Απάντηση σε <Άγνωστος Παραλήπτης> <Άγνωστος Αποστολέας> Οικία diff --git a/app/ui/legacy/src/main/res/values-eo/strings.xml b/app/ui/legacy/src/main/res/values-eo/strings.xml index c33bed3792..3dcfb1f9f3 100644 --- a/app/ui/legacy/src/main/res/values-eo/strings.xml +++ b/app/ui/legacy/src/main/res/values-eo/strings.xml @@ -642,9 +642,6 @@ Bonvolu raporti erarojn, kontribui novajn eblojn kaj peti pri novaj funkcioj per Maksimume 1000 mesaĝujoj Movbildoj Uzas afablajn vidajn efektojn - Navigado per sonfortecaj butonoj - En vido de mesaĝoj - En vidoj de listoj Montri unuigitan ricevujon Montri nombron da steletoj Unuigita ricevujo diff --git a/app/ui/legacy/src/main/res/values-es/strings.xml b/app/ui/legacy/src/main/res/values-es/strings.xml index 557a2e1769..d9aadd052f 100644 --- a/app/ui/legacy/src/main/res/values-es/strings.xml +++ b/app/ui/legacy/src/main/res/values-es/strings.xml @@ -682,9 +682,7 @@ Puedes informar de fallos, contribuir con su desarrollo y hacer preguntas en 1000 carpetas Animaciones Utilizar animaciones - Navegación con teclas de volumen - Vista de mensaje - Listas de mensajes + Navegar con las teclas de volumen al leer el correo Mostrar bandeja de entrada unificada Mostrar número de mensajes destacados Entrada unificada diff --git a/app/ui/legacy/src/main/res/values-et/strings.xml b/app/ui/legacy/src/main/res/values-et/strings.xml index f27f31c26d..499cfeca37 100644 --- a/app/ui/legacy/src/main/res/values-et/strings.xml +++ b/app/ui/legacy/src/main/res/values-et/strings.xml @@ -685,9 +685,6 @@ Veateated saad saata, kaastööd teha ning küsida teavet järgmisel lehel: 1000 kausta Animatsioon Kasuta erinevaid visuaalseid efekte - Helitugevuse nupuga liikumine - Kirjade vaadetes - Nimekirja vaadetes Näita koondsisendkausta Näita tärniga tähistatud kirjade arvu Koondsisendkaust diff --git a/app/ui/legacy/src/main/res/values-eu/strings.xml b/app/ui/legacy/src/main/res/values-eu/strings.xml index 68dbc4b69d..5299b46d11 100644 --- a/app/ui/legacy/src/main/res/values-eu/strings.xml +++ b/app/ui/legacy/src/main/res/values-eu/strings.xml @@ -681,9 +681,6 @@ Mesedez akatsen berri emateko, ezaugarri berriak gehitzeko eta galderak egiteko 1000 karpeta Animazioak Erabili bistaratze efektu nabarmenak - Bolumen teklekin nabigatu - Mezu barruko ikuspegiak - Zerrenda barruko ikuspegiak Erakutsi Sarrera Ontzi Bateratua Erakutsi kontu izardunak Sarrerako ontzi bateratua diff --git a/app/ui/legacy/src/main/res/values-fa/strings.xml b/app/ui/legacy/src/main/res/values-fa/strings.xml index a8871947a5..f6ffec11a7 100644 --- a/app/ui/legacy/src/main/res/values-fa/strings.xml +++ b/app/ui/legacy/src/main/res/values-fa/strings.xml @@ -682,9 +682,6 @@ ۱۰۰۰ پوشه پویانمایی استفاده از جلوه‌های پُرزرق‌وبرق - جابه‌جایی با کلیدهای تنظیم صدا - در نماهای پیام - در نماهای لیستی نمایش صندوق یکپارچه نمایش تعداد ستاره‌دارها صندوق ورودی یکپارچه diff --git a/app/ui/legacy/src/main/res/values-fi/strings.xml b/app/ui/legacy/src/main/res/values-fi/strings.xml index 5277c42495..c0648b137f 100644 --- a/app/ui/legacy/src/main/res/values-fi/strings.xml +++ b/app/ui/legacy/src/main/res/values-fi/strings.xml @@ -681,9 +681,7 @@ Ilmoita virheistä, ota osaa sovelluskehitykseen ja esitä kysymyksiä osoittees 1000 kansiota Animaatio Käytä koreita visuaalisia tehosteita - Navigointi äänenvoimakkuusnäppäimillä - Viestinäkymä - Erilaisia listanäkymiä + Liikkuminen äänipainikkeilla viestinäkymässä Näytä \"Yhdistetty saapuneet\" Näytä tähdellä merkittyjen viestien määrä Yhdistetty saapuneet diff --git a/app/ui/legacy/src/main/res/values-fr/strings.xml b/app/ui/legacy/src/main/res/values-fr/strings.xml index eb7a2be1b6..b60744a694 100644 --- a/app/ui/legacy/src/main/res/values-fr/strings.xml +++ b/app/ui/legacy/src/main/res/values-fr/strings.xml @@ -685,9 +685,6 @@ Rapportez les bogues, recommandez de nouvelles fonctions et posez vos questions 1 000 dossiers Animation Utiliser des effets visuels voyants - Navigation à l’aide de la touche de volume - Dans les vues des courriels - Dans les vues en liste Afficher la boîte de réception unifiée Afficher le compte d’étoilés Boîte de réception unifiée diff --git a/app/ui/legacy/src/main/res/values-fy/strings.xml b/app/ui/legacy/src/main/res/values-fy/strings.xml index b28849f4ec..250163e325 100644 --- a/app/ui/legacy/src/main/res/values-fy/strings.xml +++ b/app/ui/legacy/src/main/res/values-fy/strings.xml @@ -677,9 +677,7 @@ Graach flaterrapporten stjoere, bydragen foar nije funksjes en fragen stelle op 1000 mappen Animaasje Opsichtige fisuele effekten brûke - Folumetoetsnavigaasje - Berjochtbyld - Fariabele listwerjefte + Folumetoetsnavigaasje yn berjochtbyld Kombinearre Postfek Yn werjaan It oantal berjochten mei in stjer werjaan Kombinearre Postfek Yn diff --git a/app/ui/legacy/src/main/res/values-gd/strings.xml b/app/ui/legacy/src/main/res/values-gd/strings.xml index 1b3c63b25d..8edda28a2c 100644 --- a/app/ui/legacy/src/main/res/values-gd/strings.xml +++ b/app/ui/legacy/src/main/res/values-gd/strings.xml @@ -617,9 +617,6 @@ 1,000 pasgan Beòthachadh Cleachd èifeachdan lèirsinneach leòmach - Seòladaireachd le putanan àirde na fuaime - Ann an seallaidhean theachdaireachdan - Ann an seallaidhean liostaichean Seall an t-oll-bhogsa An t-oll-bhogsa Na h-uile teachdaireachd ann am pasganan co-aonaichte diff --git a/app/ui/legacy/src/main/res/values-gl-rES/strings.xml b/app/ui/legacy/src/main/res/values-gl-rES/strings.xml index 3b3d1436b1..8ea246da6d 100644 --- a/app/ui/legacy/src/main/res/values-gl-rES/strings.xml +++ b/app/ui/legacy/src/main/res/values-gl-rES/strings.xml @@ -496,9 +496,6 @@ 1000 cartafoles Animación Utilizar animacións - Navegación coas teclas de volume - Na vista de mensaxes - Nas listaxes Caixa de entrada unificada Todas as mensaxes en cartafoles unificados Unificar diff --git a/app/ui/legacy/src/main/res/values-gl/strings.xml b/app/ui/legacy/src/main/res/values-gl/strings.xml index c7bf0b8df5..30eef14ad7 100644 --- a/app/ui/legacy/src/main/res/values-gl/strings.xml +++ b/app/ui/legacy/src/main/res/values-gl/strings.xml @@ -648,9 +648,6 @@ Por favor envíen informes de fallos, contribúa con novas características e co 1000 carpetas Animacións Usar animacións - Navegación con teclas de volume - Vista de mensaxe - Listas de mensaxes Amosar a caixa de entrada unificada Amosar o reconto das estrelas Entrada unificada diff --git a/app/ui/legacy/src/main/res/values-hr/strings.xml b/app/ui/legacy/src/main/res/values-hr/strings.xml index 080d0d50ab..4427150361 100644 --- a/app/ui/legacy/src/main/res/values-hr/strings.xml +++ b/app/ui/legacy/src/main/res/values-hr/strings.xml @@ -588,9 +588,6 @@ 1000 mapa Animacija Koristi šarolike vizualne efekte - Navigacija tipkama glasnoće - U pregledu poruka - U pregledu popisa Objedinjena Dolazna Pošta Sve poruke u objedinjenim mapama Objedini diff --git a/app/ui/legacy/src/main/res/values-hu/strings.xml b/app/ui/legacy/src/main/res/values-hu/strings.xml index b57ec77d29..ddecc9b337 100644 --- a/app/ui/legacy/src/main/res/values-hu/strings.xml +++ b/app/ui/legacy/src/main/res/values-hu/strings.xml @@ -680,9 +680,6 @@ Hibajelentések beküldésével közreműködhet az új funkciókban, és kérd 1000 mappa Animációk Rikító látható hatások használata - Hangerő gomb navigáció - Üzenetnézetekben - Listanézetekben Egységes beérkezett üzenetek megjelenítése Csillagszámláló megjelenítése Egységes beérkezett üzenetek diff --git a/app/ui/legacy/src/main/res/values-in/strings.xml b/app/ui/legacy/src/main/res/values-in/strings.xml index 46da466ebc..2305e6a6f4 100644 --- a/app/ui/legacy/src/main/res/values-in/strings.xml +++ b/app/ui/legacy/src/main/res/values-in/strings.xml @@ -623,9 +623,6 @@ Kirimkan laporan bug, kontribusikan fitur baru dan ajukan pertanyaan di 1000 folder Animasi Gunakan efek visual mencolok - Navigasi tombol volume - Dalam tampilan pesan - Dalam tampilan daftar Tampilkan Kotak Masuk Terpadu Inbox terpadu Semua pesan dalam folder terpadu diff --git a/app/ui/legacy/src/main/res/values-is/strings.xml b/app/ui/legacy/src/main/res/values-is/strings.xml index 28c7d9c8a0..6e15bd79f7 100644 --- a/app/ui/legacy/src/main/res/values-is/strings.xml +++ b/app/ui/legacy/src/main/res/values-is/strings.xml @@ -643,9 +643,6 @@ Sendu inn villuskýrslur, leggðu fram nýja eiginleika og spurðu spurninga á 1000 möppur Hreyfingar Nota skrautlegar sjónbrellur - Flakk með hljóðstyrkshnöppum - Í skilaboðasýnum - Í listasýnum Birta sameinað innhólf Birta fjölda stjarna Sameinað innhólf diff --git a/app/ui/legacy/src/main/res/values-it/strings.xml b/app/ui/legacy/src/main/res/values-it/strings.xml index 1ac4657b53..d5d87239f4 100644 --- a/app/ui/legacy/src/main/res/values-it/strings.xml +++ b/app/ui/legacy/src/main/res/values-it/strings.xml @@ -685,9 +685,6 @@ Invia segnalazioni di bug, contribuisci con nuove funzionalità e poni domande s 1000 cartelle Animazione Utilizza effetti visivi vistosi - Navigazione con tasti volume - In visualizzazione messaggi - In visualizzazione elenco Mosta posta in arrivo combinata Mostra il numero dei messaggi con stella Posta in arrivo combinata diff --git a/app/ui/legacy/src/main/res/values-iw/strings.xml b/app/ui/legacy/src/main/res/values-iw/strings.xml index 4cb5040e4f..cdd01608f8 100644 --- a/app/ui/legacy/src/main/res/values-iw/strings.xml +++ b/app/ui/legacy/src/main/res/values-iw/strings.xml @@ -498,9 +498,6 @@ 1000 תיקיות אנימציה השתמש באפקטים חזותיים ססגונים - נייוט באמצעות מקשי הווליום - הצגת הודעה - רשימת תצוגות שונות תיבת דואר נכנס אחידה כל ההודעות בתיקיות המאוחדות לאחד diff --git a/app/ui/legacy/src/main/res/values-ja/strings.xml b/app/ui/legacy/src/main/res/values-ja/strings.xml index 1ba09ea6a5..b039e215f8 100644 --- a/app/ui/legacy/src/main/res/values-ja/strings.xml +++ b/app/ui/legacy/src/main/res/values-ja/strings.xml @@ -680,9 +680,7 @@ K-9 は大多数のメールクライアントと同様に、ほとんどのフ 1000 フォルダ アニメーション 派手な視覚効果を使用する - ボリュームキー操作 - メッセージ表示 - 一覧表示 + メッセージビューでの音量キー操作 統合フォルダを表示 フラグの数を表示する 統合フォルダ diff --git a/app/ui/legacy/src/main/res/values-ko/strings.xml b/app/ui/legacy/src/main/res/values-ko/strings.xml index ae22e84f83..f6a31f3d05 100644 --- a/app/ui/legacy/src/main/res/values-ko/strings.xml +++ b/app/ui/legacy/src/main/res/values-ko/strings.xml @@ -539,9 +539,6 @@ 1000개 폴더 애니메이션 매끄러운 시각 효과 사용 - 볼륨 키 탐색 - 메시지 뷰 - 다양한 리스트 뷰 통합 편지함 통합된 폴더의 모든 이메일 통합 diff --git a/app/ui/legacy/src/main/res/values-lt/strings.xml b/app/ui/legacy/src/main/res/values-lt/strings.xml index f2b3f14140..f8f59f6c4b 100644 --- a/app/ui/legacy/src/main/res/values-lt/strings.xml +++ b/app/ui/legacy/src/main/res/values-lt/strings.xml @@ -681,9 +681,6 @@ Pateikite pranešimus apie klaidas, prisidėkite prie naujų funkcijų kūrimo i 1000 aplankų Animacija Naudoti įmantrius vizualinius efektus - Navigacija garso klavišais - Pranešimų rodinyje - Sąrašo rodiniuose Rodyti suvestinius gautuosius Rodyti žvaigždučių skaičių Suvestiniai gautieji diff --git a/app/ui/legacy/src/main/res/values-lv/strings.xml b/app/ui/legacy/src/main/res/values-lv/strings.xml index abd2cefa32..50c24ecd70 100644 --- a/app/ui/legacy/src/main/res/values-lv/strings.xml +++ b/app/ui/legacy/src/main/res/values-lv/strings.xml @@ -649,9 +649,6 @@ pat %d vairāk 1000 mapes Animācija Izmantot spilgtus vizuālos efektus - Skaļuma pogas navigācija - Vēstuļu skatā - Saraksta skatā Rādīt apvienoto pastkasti Parādīt atzīmēto vēstuļu skaitu Apvienotā pastkaste diff --git a/app/ui/legacy/src/main/res/values-ml/strings.xml b/app/ui/legacy/src/main/res/values-ml/strings.xml index 391203a794..eec6d08c87 100644 --- a/app/ui/legacy/src/main/res/values-ml/strings.xml +++ b/app/ui/legacy/src/main/res/values-ml/strings.xml @@ -651,9 +651,6 @@ 1000 ഫോൾഡറുകൾ ആനിമേഷൻ ഭംഗിയുള്ള വിഷ്വൽ ഇഫക്റ്റുകൾ ഉപയോഗിക്കുക - ശബ്ദ കീ നാവിഗേഷൻ - സന്ദേശ കാഴ്‌ചകളിൽ - ലിസ്റ്റ് കാഴ്‌ചകളിൽ ഏകീകൃത ഇൻ‌ബോക്സ് കാണിക്കുക ഏകീകൃത ഇൻ‌ബോക്സ് ഏകീകൃത ഫോൾഡറുകളിലെ എല്ലാ സന്ദേശങ്ങളും diff --git a/app/ui/legacy/src/main/res/values-nb/strings.xml b/app/ui/legacy/src/main/res/values-nb/strings.xml index f0c7cc0e46..cf18e0372d 100644 --- a/app/ui/legacy/src/main/res/values-nb/strings.xml +++ b/app/ui/legacy/src/main/res/values-nb/strings.xml @@ -623,9 +623,6 @@ til %d flere 1000 mapper Animering Bruk glorete visuelle effekter - Navigering med lydstyrkeknapp - I meldingsvisninger - I listevisninger Samlet innboks Alle meldinger i samlede mapper Samle diff --git a/app/ui/legacy/src/main/res/values-nl/strings.xml b/app/ui/legacy/src/main/res/values-nl/strings.xml index 50c3e15084..3333e1a6ba 100644 --- a/app/ui/legacy/src/main/res/values-nl/strings.xml +++ b/app/ui/legacy/src/main/res/values-nl/strings.xml @@ -677,9 +677,7 @@ Graag foutrapporten sturen, bijdragen voor nieuwe functies en vragen stellen op 1000 mappen Animatie Gebruik opzichtige visuele effecten - Volume op/neer navigatie - Berichtbeeld - Variabele lijstweergave + Volumetoetsnavigatie in berichtbeeld Gecombineerde postvak-in weergeven Het aantal berichten met een ster weergeven Gecombineerde postvak-in diff --git a/app/ui/legacy/src/main/res/values-pl/strings.xml b/app/ui/legacy/src/main/res/values-pl/strings.xml index b19bc90c97..8be8b32c89 100644 --- a/app/ui/legacy/src/main/res/values-pl/strings.xml +++ b/app/ui/legacy/src/main/res/values-pl/strings.xml @@ -686,9 +686,7 @@ Wysłane z urządzenia Android za pomocą K-9 Mail. Proszę wybaczyć moją zwi Do 1000 folderów Animacje Używaj efektów wizualnych - Nawigacja przyciskiem głośności - Wygląd wiadomości - Różne widoki list + Nawigacja klawiszem głośności w widoku wiadomości Pokaż zintegrowaną skrzynkę odbiorczą Pokaż liczbę oznaczonych gwiazdką Zintegrowana odbiorcza diff --git a/app/ui/legacy/src/main/res/values-pt-rBR/strings.xml b/app/ui/legacy/src/main/res/values-pt-rBR/strings.xml index bbd9eb6719..029fa880a6 100644 --- a/app/ui/legacy/src/main/res/values-pt-rBR/strings.xml +++ b/app/ui/legacy/src/main/res/values-pt-rBR/strings.xml @@ -683,9 +683,6 @@ Por favor encaminhe relatórios de bugs, contribua com novos recursos e tire dú 1000 pastas Animação Utilizar efeitos visuais extravagantes - Navegação com os botões de volume - Nas visualizações das mensagens - Nas visualizações das listas Exibir a caixa de entrada unificada Mostrar a contagem de sinalizadas Caixa de Entrada Unificada diff --git a/app/ui/legacy/src/main/res/values-pt-rPT/strings.xml b/app/ui/legacy/src/main/res/values-pt-rPT/strings.xml index 2532006e67..abe6d6d06f 100644 --- a/app/ui/legacy/src/main/res/values-pt-rPT/strings.xml +++ b/app/ui/legacy/src/main/res/values-pt-rPT/strings.xml @@ -618,9 +618,6 @@ Por favor envie relatórios de falhas, contribua com novas funcionalidades e col 1000 pastas Animação Usar efeitos visuais exuberantes - Navegação com as teclas de volume - Na vista de mensagens - Nas vistas em lista Caixa de entrada unificada Todas as mensagens em pastas unificadas Unificar diff --git a/app/ui/legacy/src/main/res/values-ro/strings.xml b/app/ui/legacy/src/main/res/values-ro/strings.xml index 2112899ac3..3840c2aafe 100644 --- a/app/ui/legacy/src/main/res/values-ro/strings.xml +++ b/app/ui/legacy/src/main/res/values-ro/strings.xml @@ -9,15 +9,17 @@ K-9 Dog Walkers Codul sursă - Licență Apache, Versiune 2.0 + Licență Apache, Versiunea 2.0 Proiect Open Source Website + Manualul utilizatorului + Obțineți ajutor Forum utilizatori Fediverse Twitter Biblioteci Licență - Jurnal de schimbări + Jurnal de modificări Nu s-a putut încărca jurnalul de modificări. Versiune %s Ce este nou @@ -115,6 +117,7 @@ Vă rugăm să ne raportați defecte, să contribuiți cu funcționalități noi Adaugă steluță Șterge steluță Copiază + Dezabonare Arată antete Adresa a fost copiată în clipboard @@ -168,7 +171,9 @@ cel mult încă %d Autentificarea a eșuat Authentificare eșuată pentru %s. Actualizează setările serverului. + Eroare de notificare + S-a produs o eroare în timpul încercării de a crea o notificare de sistem pentru un mesaj nou. Motivul este cel mai probabil lipsa unui sunet de notificare.\n\nApăsați pentru a deschide setările de notificare. Se verifică emailul: %1$s:%2$s Se verifică emailul Se trimite emailul: %s @@ -280,8 +285,11 @@ cel mult încă %d Configurarează un cont nou Adresa e-mail Parolă + Pentru a utiliza acest cont de e-mail cu K-9 Mail, trebuie să vă conectați și să acordați aplicației acces la e-mailurile dumneavoastră. + Conectați-vă + Conectați-vă cu Google Pentru a vă vedea parola aici, activați blocarea ecranului pe acest dispozitiv. Verifică-ți identitatea @@ -305,6 +313,7 @@ cel mult încă %d Parolă, transmisă nesecurizat Parolă criptată Certificat client + OAuth 2.0 Setări server de primire Utilizator Parolă @@ -323,6 +332,7 @@ cel mult încă %d Nu şterge de pe server Şterge de pe server Marchează ca citit pe server + Utilizați compresia Elimină mesajele şterse de pe server Imediat Când interoghează @@ -389,6 +399,10 @@ cel mult încă %d Uneori acest lucru se întâmplă din cauza unei erori de configurare pe sever. Uneori datorită faptului că cineva încearcă să te atace pe tine sau serverul tău de mail. Dacă nu ești sigur ce se întâmplă, apasă Respinge și contactează-i pe cei care iți administrează serverul de mail.\n\n(%s) Nu se poate conecta cu serverul.\n(%s) + Autorizație anulată + Autorizarea a eșuat cu următoarea eroare: %s + OAuth 2.0 nu este acceptat în prezent cu acest furnizor. + Aplicația nu a putut găsi un browser pe care să îl folosească pentru a vă acorda acces la cont. Modifică detalii Continuă Avansat @@ -672,9 +686,7 @@ Uneori datorită faptului că cineva încearcă să te atace pe tine sau serveru 1000 de dosare Animații Folosește efecte vizuale gaudi - Navigare prin butonu de volum - Vizualizări în mesaj - Vizualizări în listă + Navigarea prin butoanele de volum in afișarea tip mesaj Afișați Cutia poștală de intrare unificată Afișați numărul de stele Căsuță poștală unificată @@ -770,13 +782,16 @@ Uneori datorită faptului că cineva încearcă să te atace pe tine sau serveru Te rog introduce parolele + Vă rugăm să vă înregistrați + Vă rugăm să vă conectați și să introduceți parolele Importarea setărilor a eșuat Citirea fișierului cu setări a eșuat Importarea unor setări a eșuat Importat cu succes Parola necesară + Înregistrare necesară Nu a fost importat Eșuare la import Mai târziu @@ -1001,7 +1016,7 @@ Uneori datorită faptului că cineva încearcă să te atace pe tine sau serveru Eroare internă: Cont invalid! Eroare la conectarea la %s! Trimite Mesaj Setare Autocriptare - Împarte în siguranță setarea punct-la-punct cu alte dispozitive + Distribuie în siguranță setarea punct-la-punct cu alte dispozitive Mesaj Setare Autocriptare Un Mesaj Setare Autocriptare împarte în siguranță setările tale punct-la-punct cu alte dispozitive. Trimite Mesaj Setare diff --git a/app/ui/legacy/src/main/res/values-ru/strings.xml b/app/ui/legacy/src/main/res/values-ru/strings.xml index ef85ff26e3..6fed27454a 100644 --- a/app/ui/legacy/src/main/res/values-ru/strings.xml +++ b/app/ui/legacy/src/main/res/values-ru/strings.xml @@ -681,9 +681,6 @@ K-9 Mail — почтовый клиент для Android. 1000 папок Анимация Анимация интерфейса - Прокрутка кнопками Vol+/- - В сообщении - В списке Показывать общий ящик для входящих Cчетчик важных Входящие 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 da5ff48a84..1483a55a0d 100644 --- a/app/ui/legacy/src/main/res/values-sk/strings.xml +++ b/app/ui/legacy/src/main/res/values-sk/strings.xml @@ -629,9 +629,6 @@ Prosím, nahlasujte prípadné chyby, prispievajte novými funkciami a pýtajte 1000 priečinkov Animácie Používať krikľavý vizuálny efekt - Navigácia tlačidlami hlasitosti - V zobrazení správ - V zobrazení zoznamu Ukázať jednotnú schránku Jednotná schránka Všetky správy v zjednotených priečinkoch 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 ca99d8e8b3..3113318372 100644 --- a/app/ui/legacy/src/main/res/values-sl/strings.xml +++ b/app/ui/legacy/src/main/res/values-sl/strings.xml @@ -686,9 +686,6 @@ dodatnih %d sporočil 1000 map Pokaži animirane učinke vmesnika Prehodi dejanj in različni učinki delovanja vmesnika so animirani - Dovoli upravljanje programa s tipko za glasnost - V pogledu sporočil - V pogledu seznamov Pokaži skupno mapo prejetih sporočil Pokaži število označb z zvezdico Skupna mapa prejetih sporočil 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 d7ac024845..8174cdf98f 100644 --- a/app/ui/legacy/src/main/res/values-sq/strings.xml +++ b/app/ui/legacy/src/main/res/values-sq/strings.xml @@ -683,9 +683,6 @@ Ju lutemi, parashtrim njoftimesh për të meta, kontribute për veçori të reaj 1000 dosje Animacion Përdor efekteve pamore Gaudy - Lëvizje me buton volumi - Në skenë mesazhi - Në skenë liste Shfaq Kuti Poste të Njësuar Shfaq llogari me yll Kuti Poste e Njësuar 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 1b488fcc6b..88c0defb98 100644 --- a/app/ui/legacy/src/main/res/values-sr/strings.xml +++ b/app/ui/legacy/src/main/res/values-sr/strings.xml @@ -627,9 +627,6 @@ 1000 фасцикли Анимација Користи гиздаве визуелне ефекте - Навигација тастерима за јачину звука - у приказу порука - у приказу спискова Прикажи обједињено сандуче Обједињено сандуче Све поруке у једном сандучету 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 8c84fcb8a3..0c95f3bc1d 100644 --- a/app/ui/legacy/src/main/res/values-sv/strings.xml +++ b/app/ui/legacy/src/main/res/values-sv/strings.xml @@ -682,9 +682,7 @@ Skicka in felrapporter, bidra med nya funktioner och ställ frågor på 1000 mappar Animering Använd snygga visuella effekter - Navigering med volymknapp - I meddelandelistor - I listvyer + Volymknappnavigering i meddelandevyn Visa samlad inkorg Visa antalet stjärnmarkerade Samlad inkorg 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 30fa3080d7..4d720488c2 100644 --- a/app/ui/legacy/src/main/res/values-tr/strings.xml +++ b/app/ui/legacy/src/main/res/values-tr/strings.xml @@ -664,9 +664,6 @@ Microsoft Exchange ile konuşurken bazı tuhaflıklar yaşadığını not ediniz 1000 klasör Animasyon Gösterişli görsel efektleri kullan - Ses Düğmesi ile dolaşma - İleti görünümlerinde - liste görünümlerinde Birleşik Gelen Kutusunu Göster Yıldızlanan sayısını göster Birleşik Gelen Kutusu 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 b10ee2e88a..295655f201 100644 --- a/app/ui/legacy/src/main/res/values-uk/strings.xml +++ b/app/ui/legacy/src/main/res/values-uk/strings.xml @@ -687,9 +687,6 @@ K-9 Mail — це вільний клієнт електронної пошти 1000 тек Анімація Використовувати яскраві візуальні ефекти - Навігація кнопками зміни гучності - при перегляді повідомлень - у списках Показувати Об\'єднані Вхідні Показати лічильник зірочок Об\'єднані Вхідні 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 7a6970834b..f476464ff2 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 @@ -680,9 +680,7 @@ K-9 Mail 是 Android 上一款功能强大的免费邮件客户端。 1000 个文件夹 动画 使用绚丽的视觉特效 - 音量键导航 - 信息视图 - 不同的列表视图 + 消息视图中音量键导航 显示全局收件箱 显示星标邮件数 全局收件箱 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 e310125842..f9868439fc 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 @@ -404,8 +404,8 @@ K-9 Mail 是 Android 上一款功能強大,免費的電子郵件用戶端。 新郵件通知 通知信件匣 全部 - 僅上層信件匣 - 上層與下層信件匣 + 僅第一類信件匣 + 第一類與第二類信件匣 不包括下層信件匣 同步通知 @@ -498,25 +498,25 @@ K-9 Mail 是 Android 上一款功能強大,免費的電子郵件用戶端。 一年內 顯示的信件匣 全部 - 僅上層信件匣 - 上層與下層信件匣 + 僅第一類信件匣 + 第一類與第二類信件匣 不包括下層文件匣 檢查信件匣 全部 - 僅上層信件匣 - 上層與下層信件匣 + 僅第一類信件匣 + 第一類與第二類信件匣 不包括下層信件匣 推送信件匣 全部 - 僅上層信件匣 - 上層與下層信件匣 + 僅第一類信件匣 + 第一類與第二類信件匣 不包括下層信件匣 可以移動/複製到的文件匣 全部 - 僅上層信件匣 - 上層與下層信件匣 + 僅第一類信件匣 + 第一類與第二類信件匣 不包括下層信件匣 同步伺服器上的刪除 刪除在伺服器上被刪除的郵件的本地複製 @@ -526,21 +526,21 @@ K-9 Mail 是 Android 上一款功能強大,免費的電子郵件用戶端。 顯示在置頂的組之後 信件匣顯示層別 不分類 - 上層 + 第一類 下層 提取分類信件匣 - 上層 + 第一類 下層 使用與顯示層別相同的層別 信件匣推送層別 不分類 - 上層 + 第一類 下層 與分類層別相同 信件匣提醒層別 不分類 - 上層 + 第一類 下層 與推送層別相同 清除本地郵件 @@ -636,8 +636,8 @@ K-9 Mail 是 Android 上一款功能強大,免費的電子郵件用戶端。 信件匣名稱包括 信件匣 顯示全部信件匣 - 只顯示上層信件匣 - 顯示上層和下層信件匣 + 只顯示第一類信件匣 + 顯示第一類和第二類信件匣 不包括下層信件匣 簽名位置 在引用的本文之前 @@ -680,9 +680,6 @@ K-9 Mail 是 Android 上一款功能強大,免費的電子郵件用戶端。 1000個信件匣 動畫 使用絢麗的視覺特效 - 音量鍵導航 - 訊息檢視 - 不同的訊息檢視列表 顯示全域收件匣 顯示有標記星號的數量 全域收件匣 -- GitLab From f0bdda63ff2c0eaca13df30e288595b88de050a2 Mon Sep 17 00:00:00 2001 From: cketti Date: Mon, 26 Sep 2022 18:50:23 +0200 Subject: [PATCH 26/26] Version 6.307 --- app/k9mail/build.gradle | 4 ++-- app/ui/legacy/src/main/res/raw/changelog_master.xml | 5 +++++ fastlane/metadata/android/en-US/changelogs/33007.txt | 3 +++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/33007.txt diff --git a/app/k9mail/build.gradle b/app/k9mail/build.gradle index a152b3f2fd..f8503a196d 100644 --- a/app/k9mail/build.gradle +++ b/app/k9mail/build.gradle @@ -50,8 +50,8 @@ android { applicationId "com.fsck.k9" testApplicationId "com.fsck.k9.tests" - versionCode 33006 - versionName '6.307-SNAPSHOT' + versionCode 33007 + versionName '6.307' // 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 adf22b9b7e..fc8c273fc7 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,11 @@ Locale-specific versions are kept in res/raw-/changelog.xml. --> + + Fixed the message list background color in the dark theme + Fixed a small display issue where "Load up to X more" could have been displayed when it shouldn't have been + Updated translations + Added a monochromatic app icon for Android 13 Changed the UI component used for the message list; now changes to the list will be animated diff --git a/fastlane/metadata/android/en-US/changelogs/33007.txt b/fastlane/metadata/android/en-US/changelogs/33007.txt new file mode 100644 index 0000000000..8292b473fc --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/33007.txt @@ -0,0 +1,3 @@ +- Fixed the message list background color in the dark theme +- Fixed a small display issue where "Load up to X more" could have been displayed when it shouldn't have been +- Updated translations -- GitLab