Commit graph

1150 commits

Author SHA1 Message Date
cketti
6d16698eeb Read account default colors from resources 2022-10-05 15:59:29 +02:00
cketti
d82bc5844e Create resource file for material colors 2022-10-05 15:59:29 +02:00
cketti
44f9efdfd5 Change 'background sync' default value to 'always' 2022-10-05 15:23:20 +02:00
cketti
6db5f09ddf Set app theme before the first Activity is started 2022-10-05 12:15:53 +02:00
cketti
c7c0b0aa23 Update the message list when the "more messages" value of a folder changes 2022-09-26 17:03:51 +02:00
cketti
b3c8e85918 Remove volume key navigation for list views 2022-09-22 12:30:24 +02:00
cketti
66739b4b70 Switch to using 'namespace' property in build.gradle 2022-09-20 14:53:19 +02:00
cketti
8b21092cc2 Convert :backend:* to JVM modules 2022-09-17 14:53:04 +02:00
cketti
8a73c93134 Move code to select message list items to MessageListAdapter 2022-09-12 13:51:47 +02:00
cketti
cd621d047f Rewrite MessagingController.deleteDraft() to not use LocalStore 2022-09-10 01:53:53 +02:00
cketti
0591ff7822 Rewrite MessagingController.loadMessageRemoteSynchronous() to not use LocalStore 2022-09-10 01:42:04 +02:00
cketti
95cfc85858 Use MessageStore to set folder status 2022-09-10 00:57:38 +02:00
cketti
0e56eb8072
Merge pull request #6283 from thundernest/outbox_logging
Fix error reporting for send failures
2022-09-08 11:57:29 +02:00
cketti
5e977f3aeb
Merge pull request #6282 from thundernest/fix_search_bug
Fix bug in SQL query used for search
2022-09-08 11:56:22 +02:00
cketti
c80254f3a5 Remove unnecessary code 2022-09-07 17:45:21 +02:00
cketti
53a08bcdee Fix mechanism to notify about messages that failed to send 2022-09-07 17:44:08 +02:00
cketti
2c94dc6d08 Use proper table name in SqlQueryBuilder 2022-09-07 17:10:05 +02:00
cketti
2fe289875e Add support for removing K-9 Mail signatures from HTML message parts 2022-09-07 16:29:15 +02:00
cketti
451f4df4b2 Convert HtmlSignatureRemoverTest to Kotlin 2022-09-07 13:37:34 +02:00
cketti
13a83d0be0 Rename .java to .kt 2022-09-07 13:36:33 +02:00
cketti
e74f0a5780 Convert HtmlSignatureRemover to Kotlin 2022-09-07 13:07:44 +02:00
cketti
fb44ff8f1f Rename .java to .kt 2022-09-07 13:07:44 +02:00
cketti
034eac8847 Add fast path to MessageListRepository to bypass an empty cache 2022-09-01 16:12:25 +02:00
cketti
5418f71fc5 Change API of MessageListCache to better match how it is used 2022-08-31 17:50:00 +02:00
cketti
cfa01261ae Rename EmailProviderCache to MessageListCache 2022-08-31 17:50:00 +02:00
cketti
7ea928bba5 Finally get rid of EmailProvider 2022-08-31 17:50:00 +02:00
cketti
6be1eb11dc Use MessageRepository instead of EmailProvider in MessageListLoader 2022-08-31 17:50:00 +02:00
cketti
dabb398e65 Add MessageListRepository.getThread() 2022-08-31 17:50:00 +02:00
cketti
4b03f99ff7 Add MessageListRepository.getThreadedMessages() 2022-08-31 17:50:00 +02:00
cketti
170f0dbecc Add MessageListRepository.getMessages() 2022-08-31 17:50:00 +02:00
cketti
b89f8c0e57 Convert EmailProviderCache to Kotlin 2022-08-31 17:50:00 +02:00
cketti
3345701471 Rename .java to .kt 2022-08-31 17:50:00 +02:00
cketti
a9d03a147d Fix EmailProviderCacheTest 2022-08-31 17:50:00 +02:00
cketti
4210237dff Rename .java to .kt 2022-08-31 17:50:00 +02:00
cketti
e9b91f3654 Add MessageListRepository
Remove the "message list changed" notification mechanism provided by `EmailProvider` and use a simple callback mechanism instead.
2022-08-31 17:50:00 +02:00
cketti
e14ce585a5 Add MessageStore.getThread()
This is more or less a copy of `EmailProvider.getThread()`.
2022-08-30 14:49:30 +02:00
cketti
9b90d18051 Add MessageStore.getMessages()
This is more or less a copy of `EmailProvider.getMessages()`.
2022-08-30 13:43:30 +02:00
cketti
be5867de83 Add MessageStore.getThreadedMessages()
This is more or less a copy of `EmailProvider.getThreadedMessages()`.
2022-08-30 12:39:57 +02:00
cketti
77396629cb Add MessageStore.hasMoreMessages() 2022-08-29 16:40:49 +02:00
cketti
03189fae46 Replace usages of the deprecated RuntimeEnvironment.application 2022-08-09 18:33:18 +02:00
cketti
46ca47facd Remove unused parameter 2022-08-09 18:18:31 +02:00
cketti
997d993413 Remove unnecessary safe calls 2022-08-09 17:33:54 +02:00
cketti
9328bd5dc7 Switch from using declaringClass to declaringJavaClass 2022-08-09 13:37:31 +02:00
cketti
1a27cfa475
Merge pull request #6231 from thundernest/autodiscovery_jvm_modules
Convert most of :app:autodiscovery to JVM projects
2022-08-09 11:34:11 +02:00
cketti
8156a3832b Move EmailHelper from :app:core to :mail:common 2022-08-08 20:58:54 +02:00
cketti
2d896196ad Add support for converting consecutive spaces to HTML
We use non-breaking space characters when necessary.
2022-08-08 11:56:20 +02:00
cketti
0c449eb70a Add (failing) tests for converting consecutive spaces to HTML
The tests demonstrate the behavior used by Thunderbird.
2022-08-08 11:23:28 +02:00
cketti
be649e3ba0 Update Koin to version 3.2.0 2022-08-05 23:51:32 +02:00
cketti
2bdc92b6df Update kotlinx.coroutines to version 1.6.4 2022-08-05 16:40:49 +02:00
cketti
6ca6c32c91 Clear folder_extra_values when using "clear local messages" 2022-08-05 12:01:18 +02:00
cketti
3e90e92b2e Only mark a message as read when it is the active message
Previously we marked a message as read when loading it for viewing. But with swiping between messages we could now load a message before it is considered the active message.
2022-08-03 21:37:05 +02:00
cketti
114af53c84 Convert HtmlConverterTest to Kotlin 2022-08-02 16:47:22 +02:00
cketti
7bed9b05b6 Rename .java to .kt 2022-08-02 16:42:58 +02:00
cketti
4b2c1d9961
Merge pull request #6192 from thundernest/more_notification_fixes
Fix bug when tapping a single message notification
2022-07-27 22:25:27 +02:00
cketti
f60f573f07 Don't auto-cancel new message notifications
On one of my test devices (Android 12), tapping a single message notification opens the message view, which leads to the notification being removed. If there's an inactive notification it will be promoted to an active notification and use the notification ID of the notification that was just removed. Due to auto-cancel being used, the delete intent of the first notification is then triggered. However, the system seems to use the notification ID to retrieve the delete intent. Because it will fetch the delete intent from the new notification, not the old one. (I made sure to check that it's not a PendingIntent reuse issue)

Since we remove the notification ourselves, we can simply stop using the (apparently buggy) auto-cancel mechanism.
2022-07-27 00:21:07 +02:00
cketti
bc7758b9cf Remove notificationId parameters from methods in NotificationActionCreator 2022-07-26 23:31:20 +02:00
cketti
7dbae49c8e Fix removing multiple notifications at once 2022-07-26 20:35:32 +02:00
cketti
fd006bdb2f Add Western Frisian translation 2022-07-26 12:51:17 +02:00
cketti
1ff327eda8 Display an error notification when creating a notification fails
When importing settings from another device, we could end up with a notification channel that references a non-existing notification sound. In that case creating a notification for a new message will lead to a `SecurityException`. We catch this case and display an error notification instead. This is fine because we create the "Miscellaneous" notification channel without a notification sound.
2022-07-11 18:06:22 +02:00
cketti
238a5cd181 Handle authentication failure when refreshing the folder list 2022-07-05 12:40:43 +02:00
cketti
00e0d8b35a Change server settings to use OAuth after an authentication failure 2022-07-05 12:40:43 +02:00
cketti
9a9c781eaa Flag existing Gmail accounts for OAuth upgrade 2022-06-17 14:40:23 +02:00
cketti
f96154f0b0 Display "authentication failed" notification when OAuth sign-in is required 2022-06-16 14:55:34 +02:00
cketti
451a74166b Fix bug when clearing all new message notifications of an account 2022-06-10 16:42:53 +02:00
Olivier Blin
4c937ad7a6 Move redirectUri in OAuthConfiguration
Not all providers accept the redirect URI Google requires Android apps to use.
2022-06-08 20:28:08 +02:00
cketti
9ae7d27e79 Add support for OAuth flow after settings import 2022-06-07 15:53:37 +02:00
cketti
94c61a7999
Merge pull request #6098 from k9mail/sasl_oauthbearer
Add support for the `OAUTHBEARER` SASL method
2022-06-06 22:30:29 +02:00
cketti
d3be6e249b Add support for the OAUTHBEARER SASL method (IMAP) 2022-06-05 22:49:30 +02:00
cketti
d08aa55853 Add proper way to retrieve OAuth credentials 2022-06-05 16:35:39 +02:00
cketti
5065afef88
Merge pull request #6082 from k9mail/oauth_setup_flow
Add support for OAuth 2.0 (Gmail)
2022-05-28 15:44:22 +02:00
Sylvia van Os
6081b58212 Add Unsubscribe toolbar option 2022-05-28 14:07:08 +02:00
cketti
14a7f1b0d3 Add support for OAuth 2.0 (Gmail) 2022-05-23 22:26:49 +02:00
cketti
fdb8655f3a Remove Robolectric from a lot of tests 2022-05-02 17:08:22 +02:00
cketti
ad337c0395 Move mime type utility functions to :k9mail:app:core 2022-05-02 14:41:55 +02:00
cketti
d69c1f4c46 Add simple logging abstraction
Once there's a JVM artifact for Timber, hopefully all we have to do is replace the imports again.
2022-05-02 02:44:35 +02:00
cketti
7f343e4fd1 Move DefaultTrustedSocketFactory 2022-04-28 22:18:14 +02:00
cketti
e2609f3a46 Move MailTo and ListHeaders classes 2022-04-28 18:56:53 +02:00
cketti
72e679dca0 Add migration for IMAP compression in settings file 2022-04-12 21:58:15 +02:00
cketti
903d0f43c4 Change Account to use a single setting for IMAP compression 2022-04-12 21:58:15 +02:00
cketti
391d45d52b Merge branch '6.0-MAINT' into main 2022-04-12 00:23:08 +02:00
cketti
f427326da6 Simplify error notifications 2022-04-11 20:15:51 +02:00
cketti
e815d318aa Don't set notification sound/vibration/light on Android 8+
On Android 8+ these values should be ignored anyway. But on some devices setting a notification sound could lead to a SecurityException (when the app doesn't have permission to access the notification sound URI).
2022-04-11 20:15:51 +02:00
cketti
31860a209e Fix usage of ContentResolver.openOutputStream() 2022-04-11 17:40:36 +02:00
cketti
6da9195179 Truncate file when overwriting existing settings file 2022-04-11 17:40:36 +02:00
cketti
d6f218b3ec
Merge pull request #6000 from k9mail/fix_update_notification_preferences
Fix reading notification settings from `NotificationChannel`
2022-04-06 15:59:45 +02:00
cketti
6721a15663 Fix importing multiple accounts 2022-04-04 19:30:15 +02:00
cketti
486593919e Don't use app vibration defaults in NotificationVibrationDecoder
The code didn't handle the case where vibration was enabled but the pattern was `null` (system default).
2022-04-04 18:53:10 +02:00
cketti
f30a8ca3bb Use NotificationSettingsUpdater in AccountSettingsFragment 2022-04-04 18:53:10 +02:00
cketti
aa842efea8 Set messagesNotificationChannelVersion on settings import
Avoid reusing previously created notification channels when restoring an account using settings import.
2022-03-15 00:39:28 +01:00
cketti
075324af14 Clean up code to update notification channels 2022-03-11 18:44:36 +01:00
cketti
8206cbce4c Update accounts with NotificationChannel configurations before exporting settings 2022-03-10 16:06:46 +01:00
cketti
803e388b90 Extract logic to convert system vibration pattern into NotificationVibrationDecoder 2022-03-10 16:06:46 +01:00
cketti
25c0e4af43 Extract vibration settings to separate class NotificationVibration 2022-03-09 22:35:13 +01:00
cketti
aa90f4369d Avoid race condition when recreating the messages NotificationChannel 2022-03-08 22:53:22 +01:00
cketti
d784151ef0 Add support for updating existing notifications 2022-03-08 18:29:27 +01:00
cketti
d5baa9982d Update Jsoup to version 1.14.3 2022-03-04 00:55:16 +01:00
cketti
e24d51a437 Remove @OptIn annotations that are now unnecessary 2022-03-03 16:55:36 +01:00
cketti
f66f7e5073 Use account settings when creating the NotificationChannel for messages 2022-03-01 16:42:33 +01:00
cketti
237a6024e4 Remove unused callbacks 2022-02-24 20:46:58 +01:00
cketti
c206af5ab0 Remove unnecessary method parameter 2022-02-24 20:34:45 +01:00