Loading app/core/src/test/java/com/fsck/k9/message/html/GenericUriParserTest.kt +4 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,10 @@ class GenericUriParserTest { assertUriValid("xmpp:example-node@example.com?message") assertUriValid("xmpp:example-node@example.com?message;subject=Hello%20World") assertUriValid("xmpp:nasty!%23\$%25()*+,-.;=%3F%5B%5C%5D%5E_%60%7B%7C%7D~node@example.com") assertUriValid("xmpp:node@example.com/repulsive%20!%23%22\$%25&'()*+,-.%2F:;%3C=%3E%3F%40%5B%5C%5D%5E_%60%7B%7C%7D~resource") assertUriValid( "xmpp:node@example.com/repulsive" + "%20!%23%22\$%25&'()*+,-.%2F:;%3C=%3E%3F%40%5B%5C%5D%5E_%60%7B%7C%7D~resource", ) assertUriValid("xmpp:ji%C5%99i@%C4%8Dechy.example/v%20Praze") } Loading app/storage/src/main/java/com/fsck/k9/storage/migrations/MigrationTo70.kt +7 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,13 @@ internal class MigrationTo70(private val db: SQLiteDatabase) { private fun recreateFoldersTriggers() { db.execSQL("DROP TRIGGER IF EXISTS delete_folder") db.execSQL("CREATE TRIGGER delete_folder BEFORE DELETE ON folders BEGIN DELETE FROM messages WHERE old.id = folder_id; END;") db.execSQL( "CREATE TRIGGER delete_folder " + "BEFORE DELETE ON folders " + "BEGIN " + "DELETE FROM messages WHERE old.id = folder_id; " + "END;", ) db.execSQL("DROP TRIGGER IF EXISTS delete_folder_extra_values") db.execSQL( Loading app/storage/src/main/java/com/fsck/k9/storage/migrations/MigrationTo84.kt +2 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,8 @@ internal class MigrationTo84(private val db: SQLiteDatabase) { fun rewriteAddresses() { val addressSets = db.rawQuery( "SELECT id, to_list, cc_list, bcc_list, reply_to_list, sender_list FROM messages WHERE empty = 0 AND deleted = 0", "SELECT id, to_list, cc_list, bcc_list, reply_to_list, sender_list " + "FROM messages WHERE empty = 0 AND deleted = 0", null, ).use { cursor -> cursor.map { Loading app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/ComposeCryptoStatus.kt +4 −5 Original line number Diff line number Diff line Loading @@ -7,7 +7,6 @@ import com.fsck.k9.message.AutocryptStatusInteractor import com.fsck.k9.message.AutocryptStatusInteractor.RecipientAutocryptStatus import com.fsck.k9.message.CryptoStatus import com.fsck.k9.view.RecipientSelectView.Recipient import org.openintents.openpgp.OpenPgpApiManager import org.openintents.openpgp.OpenPgpApiManager.OpenPgpProviderState /** This is an immutable object which contains all relevant metadata entered Loading Loading @@ -76,10 +75,10 @@ data class ComposeCryptoStatus( val recipientAddressesAsArray = recipientAddresses.toTypedArray() private val displayTypeFromProviderError = when (openPgpProviderState) { OpenPgpApiManager.OpenPgpProviderState.OK -> null OpenPgpApiManager.OpenPgpProviderState.UNCONFIGURED -> CryptoStatusDisplayType.UNCONFIGURED OpenPgpApiManager.OpenPgpProviderState.UNINITIALIZED -> CryptoStatusDisplayType.UNINITIALIZED OpenPgpApiManager.OpenPgpProviderState.ERROR, OpenPgpApiManager.OpenPgpProviderState.UI_REQUIRED -> CryptoStatusDisplayType.ERROR OpenPgpProviderState.OK -> null OpenPgpProviderState.UNCONFIGURED -> CryptoStatusDisplayType.UNCONFIGURED OpenPgpProviderState.UNINITIALIZED -> CryptoStatusDisplayType.UNINITIALIZED OpenPgpProviderState.ERROR, OpenPgpProviderState.UI_REQUIRED -> CryptoStatusDisplayType.ERROR } private val displayTypeFromAutocryptError = when (recipientAutocryptStatusType) { Loading backend/jmap/src/main/java/com/fsck/k9/backend/jmap/JmapBackend.kt +5 −1 Original line number Diff line number Diff line Loading @@ -94,7 +94,11 @@ class JmapBackend( return messageServerIds.associateWith { it } } override fun moveMessagesAndMarkAsRead(sourceFolderServerId: String, targetFolderServerId: String, messageServerIds: List<String>): Map<String, String>? { override fun moveMessagesAndMarkAsRead( sourceFolderServerId: String, targetFolderServerId: String, messageServerIds: List<String>, ): Map<String, String>? { commandMove.moveMessagesAndMarkAsRead(targetFolderServerId, messageServerIds) return messageServerIds.associateWith { it } } Loading Loading
app/core/src/test/java/com/fsck/k9/message/html/GenericUriParserTest.kt +4 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,10 @@ class GenericUriParserTest { assertUriValid("xmpp:example-node@example.com?message") assertUriValid("xmpp:example-node@example.com?message;subject=Hello%20World") assertUriValid("xmpp:nasty!%23\$%25()*+,-.;=%3F%5B%5C%5D%5E_%60%7B%7C%7D~node@example.com") assertUriValid("xmpp:node@example.com/repulsive%20!%23%22\$%25&'()*+,-.%2F:;%3C=%3E%3F%40%5B%5C%5D%5E_%60%7B%7C%7D~resource") assertUriValid( "xmpp:node@example.com/repulsive" + "%20!%23%22\$%25&'()*+,-.%2F:;%3C=%3E%3F%40%5B%5C%5D%5E_%60%7B%7C%7D~resource", ) assertUriValid("xmpp:ji%C5%99i@%C4%8Dechy.example/v%20Praze") } Loading
app/storage/src/main/java/com/fsck/k9/storage/migrations/MigrationTo70.kt +7 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,13 @@ internal class MigrationTo70(private val db: SQLiteDatabase) { private fun recreateFoldersTriggers() { db.execSQL("DROP TRIGGER IF EXISTS delete_folder") db.execSQL("CREATE TRIGGER delete_folder BEFORE DELETE ON folders BEGIN DELETE FROM messages WHERE old.id = folder_id; END;") db.execSQL( "CREATE TRIGGER delete_folder " + "BEFORE DELETE ON folders " + "BEGIN " + "DELETE FROM messages WHERE old.id = folder_id; " + "END;", ) db.execSQL("DROP TRIGGER IF EXISTS delete_folder_extra_values") db.execSQL( Loading
app/storage/src/main/java/com/fsck/k9/storage/migrations/MigrationTo84.kt +2 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,8 @@ internal class MigrationTo84(private val db: SQLiteDatabase) { fun rewriteAddresses() { val addressSets = db.rawQuery( "SELECT id, to_list, cc_list, bcc_list, reply_to_list, sender_list FROM messages WHERE empty = 0 AND deleted = 0", "SELECT id, to_list, cc_list, bcc_list, reply_to_list, sender_list " + "FROM messages WHERE empty = 0 AND deleted = 0", null, ).use { cursor -> cursor.map { Loading
app/ui/legacy/src/main/java/com/fsck/k9/activity/compose/ComposeCryptoStatus.kt +4 −5 Original line number Diff line number Diff line Loading @@ -7,7 +7,6 @@ import com.fsck.k9.message.AutocryptStatusInteractor import com.fsck.k9.message.AutocryptStatusInteractor.RecipientAutocryptStatus import com.fsck.k9.message.CryptoStatus import com.fsck.k9.view.RecipientSelectView.Recipient import org.openintents.openpgp.OpenPgpApiManager import org.openintents.openpgp.OpenPgpApiManager.OpenPgpProviderState /** This is an immutable object which contains all relevant metadata entered Loading Loading @@ -76,10 +75,10 @@ data class ComposeCryptoStatus( val recipientAddressesAsArray = recipientAddresses.toTypedArray() private val displayTypeFromProviderError = when (openPgpProviderState) { OpenPgpApiManager.OpenPgpProviderState.OK -> null OpenPgpApiManager.OpenPgpProviderState.UNCONFIGURED -> CryptoStatusDisplayType.UNCONFIGURED OpenPgpApiManager.OpenPgpProviderState.UNINITIALIZED -> CryptoStatusDisplayType.UNINITIALIZED OpenPgpApiManager.OpenPgpProviderState.ERROR, OpenPgpApiManager.OpenPgpProviderState.UI_REQUIRED -> CryptoStatusDisplayType.ERROR OpenPgpProviderState.OK -> null OpenPgpProviderState.UNCONFIGURED -> CryptoStatusDisplayType.UNCONFIGURED OpenPgpProviderState.UNINITIALIZED -> CryptoStatusDisplayType.UNINITIALIZED OpenPgpProviderState.ERROR, OpenPgpProviderState.UI_REQUIRED -> CryptoStatusDisplayType.ERROR } private val displayTypeFromAutocryptError = when (recipientAutocryptStatusType) { Loading
backend/jmap/src/main/java/com/fsck/k9/backend/jmap/JmapBackend.kt +5 −1 Original line number Diff line number Diff line Loading @@ -94,7 +94,11 @@ class JmapBackend( return messageServerIds.associateWith { it } } override fun moveMessagesAndMarkAsRead(sourceFolderServerId: String, targetFolderServerId: String, messageServerIds: List<String>): Map<String, String>? { override fun moveMessagesAndMarkAsRead( sourceFolderServerId: String, targetFolderServerId: String, messageServerIds: List<String>, ): Map<String, String>? { commandMove.moveMessagesAndMarkAsRead(targetFolderServerId, messageServerIds) return messageServerIds.associateWith { it } } Loading