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
cketti
51457a6859
Simplify LocalStore.searchForMessages()
2022-02-24 20:28:03 +01:00
cketti
4bed7a595b
Remove unused method parameters
2022-02-24 19:56:50 +01:00
cketti
e59f57f602
Remove unused callbacks from MessageRetrievalListener
2022-02-24 19:42:01 +01:00
cketti
065f98cfdd
Remove unnecessary method parameters
2022-02-24 19:24:17 +01:00
cketti
dea6bf1f01
Don't create notifications when manually refreshing the message list
2022-02-24 00:05:51 +01:00
cketti
58709b156a
Remove commented out code
2022-02-22 22:14:21 +01:00
cketti
e1c43beee1
Remove 'new message' notification when user deletes the message
...
We already handled the case where the deletion was synced from the server. This handles the case where the user locally deletes the message.
2022-02-22 19:22:21 +01:00
cketti
7a784f1fcd
Remove 'new message' notification when user marks the message as read
...
We already handled the case where the message was marked as read on the server. This handles the case where the user marks the message as read locally.
2022-02-22 19:22:21 +01:00
cketti
c0f8c43baa
Add logging for summary notifications
...
These are the notifications responsible for sound/vibration/light.
2022-02-22 17:44:01 +01:00
cketti
48caeffe10
More logging when recreating a NotificationChannel
2022-02-22 17:44:01 +01:00
cketti
91239f92d2
Update StrictMode policy
2022-02-21 18:43:01 +01:00
cketti
8847e30cb7
Add appropriate mutability flags to PendingIntents
2022-02-21 18:42:27 +01:00
cketti
ad18dc2f74
Create Outbox if necessary when attempting to send a message
2022-02-21 16:58:43 +01:00
cketti
9cf0708683
Display "New mail ringtone" setting on Android 8+
...
Some vendors don't support changing the notification sound via the system's user interface to configure notification categories.
2022-02-15 21:21:18 +01:00
cketti
55e0288ffe
Hold accountLock
while saving an account
2022-02-12 00:00:11 +01:00
cketti
ffa0ebb5bb
Change the Storage class to be immutable
...
Also make sure the in-memory state and the database are modified together while a lock is being held.
2022-02-12 00:00:11 +01:00
cketti
56ac6ab0bd
Rework notification light setting
2022-02-11 23:56:12 +01:00
cketti
4d0bbd1e8a
Remove rows from 'notifications' table when clearing notifications
2022-02-10 01:49:53 +01:00
cketti
d087fde125
Change NotificationSettings
into a data class
2022-02-09 19:36:33 +01:00
cketti
0fb6bd9198
Add a proper type for the vibration pattern the user can select
2022-02-09 19:36:33 +01:00
cketti
c58e357030
Convert 'NotificationSettings' to Kotlin
2022-02-09 19:36:33 +01:00
cketti
6256ec6d89
Rename .java to .kt
2022-02-09 19:36:33 +01:00
cketti
b91c902247
Rename class NotificationSetting
to NotificationSettings
2022-02-09 19:36:33 +01:00
cketti
f923da4487
Convert 'Account' to Kotlin
2022-02-09 19:36:33 +01:00
cketti
2dbdca0fc4
Rename .java to .kt
2022-02-09 19:36:33 +01:00
cketti
f196b8ca5e
Convert 'SearchAccount' to Kotlin
2022-02-09 19:36:33 +01:00
cketti
566be079c9
Rename .java to .kt
2022-02-08 17:07:38 +01:00
cketti
dee2ca345d
Convert 'BaseAccount' to Kotlin
2022-02-08 16:54:15 +01:00
cketti
4583218750
Rename .java to .kt
2022-02-08 16:54:15 +01:00
cketti
eff9f1bf5e
Improve support for empty account name
2022-02-08 02:23:04 +01:00
cketti
bfc708df19
Use Account.getDisplayName() when appropriate
2022-02-08 02:05:05 +01:00
cketti
19829eb2a2
Rename Account.getDescription() to Account.getName()
2022-02-08 01:13:30 +01:00
cketti
1d601c5c59
Rename Account.getName() to Account.getSenderName()
2022-02-08 00:50:26 +01:00
cketti
ff97264c08
Use Account.toString() in log messages
...
Have Account.toString() only return the account name when sensitive debug logging is enabled. Otherwise return the account UUID.
2022-02-08 00:16:33 +01:00
cketti
deecc9ea16
Fix NotificationChannel recreation avoidance logic
2022-02-07 19:22:03 +01:00
cketti
d161f7972d
Merge pull request #5895 from k9mail/vibration_pattern
...
Unify settings to configure notification vibration
2022-02-07 18:29:52 +01:00
cketti
64c6bcd48f
Unify settings to configure notification vibration
2022-02-04 06:52:52 +01:00
cketti
4c875027a6
Crash app when trying to add duplicate notification on debug builds
...
This is not a critical error. So we're not crashing release builds. We could skip the duplicate notification in release builds. But the hope is that users will notice them and report a bug, allowing us to find and fix the root cause rather than the symptom.
2022-02-03 02:16:06 +01:00
cketti
a4e1a77892
Switch to mockito-inline
2022-02-03 01:10:52 +01:00
cketti
587e964e87
Merge pull request #5885 from k9mail/html_cleaner_cli
...
Add command line application to sanitize HTML files
2022-01-28 16:53:10 +01:00
cketti
6e9a8f9559
Move HtmlProcessor into a separate module
2022-01-28 04:40:30 +01:00
parkerfath
1265d0724b
Open Outbox from 'send failed' notification ( #5887 )
2022-01-28 03:33:06 +01:00
cketti
f74d1c0fee
Change HtmlProcessor to retrieve custom <head> contents from an interface
2022-01-26 03:19:48 +01:00
cketti
7c05ec5b21
Don't use dependency injection for HtmlSanitizer
2022-01-26 03:12:11 +01:00
cketti
013e0dc788
Convert 'HtmlProcessor' to Kotlin
2022-01-26 03:05:42 +01:00
cketti
f84ebecd73
Rename .java to .kt
2022-01-26 02:57:01 +01:00
cketti
4f7bda0c29
Convert 'HeadCleaner' to Kotlin
2022-01-26 02:44:57 +01:00
cketti
2dd2b7492c
Rename .java to .kt
2022-01-26 02:44:04 +01:00
parkerfath
fda4e8243a
Allow remote search by default ( #5867 )
2022-01-20 00:20:22 +01:00
schlagi123
e8a798c9de
Change default color for registered contacts ( #5865 )
...
Change default value of `registeredNameColor` to have enough contrast in both the light and dark theme.
2022-01-20 00:10:05 +01:00
cketti
6e6fd8623a
Only remove notifications for messages currently displayed
...
This only works for the Unified Inbox, the "new messages" view, and when viewing a single folder. Search views are currently not supported.
2022-01-11 01:46:01 +01:00
cketti
2dff253d43
Change code to remove notifications to accept a selector function
2022-01-10 22:01:13 +01:00
cketti
d68b326994
Trigger folder list update when a message has been sent
2022-01-09 08:12:29 +01:00
cketti
17e69419b8
Remove now unused BackendFolder.getLastUid()
2022-01-05 20:21:58 +01:00
schlagi123
30f5cac95e
Make ThemeManager listen to theme setting changes ( #5833 )
...
This way importing settings will automatically apply the imported theme value.
2021-12-29 23:03:49 +01:00
cketti
955b22b970
Add support for setting the notification vibration pattern on Android 8+
2021-12-22 02:59:27 +01:00
cketti
448439609f
Change UI to configure the notification vibration pattern
2021-12-22 01:32:23 +01:00
cketti
69490a2c43
Add support for changing the notification light color on Android 8+
...
Android doesn't support changing this setting on an existing NotificationChannel. So we delete the existing NotificationChannel and create a new one with the same settings as the old one and the new notification light color.
2021-12-15 19:05:59 +01:00
cketti
36364f0463
Display notification light color picker on API 26+ devices
2021-12-15 19:05:59 +01:00
cketti
fc5aa0a004
Specify which colors to display in notification LED color picker
2021-12-14 01:38:48 +01:00
cketti
3298a8e90d
Add message notification channel versioning
2021-12-13 21:23:51 +01:00
cketti
fd920971b8
Mark all messages as "not new" when summary notification is dismissed
2021-12-11 18:56:02 +01:00
cketti
a8937a2a2d
Mark all messages as "not new" when leaving the "New messages" view
2021-12-11 15:41:15 +01:00
cketti
4e3d8789e3
Mark a message as "not new" when opening it for viewing
2021-12-11 15:41:15 +01:00
cketti
8e12d05a1d
Update summary notification click behavior
...
Open "New messages" view when tapping the summary notification and not all messages either belong to the Unified Inbox or to a single folder.
2021-12-11 15:41:15 +01:00
cketti
386dd9073f
Update 'new_message' column when adding and removing notifications
2021-12-11 15:41:15 +01:00
cketti
c289c74238
Update summary notification click behavior
...
When tapping the summary notification and all new messages belong to folders that are included in the Unified Inbox, we display the Unified Inbox.
2021-12-09 22:21:55 +01:00
cketti
3d04523429
Set account color on status/error notifications
2021-12-08 17:46:35 +01:00
cketti
4da9e023be
Create public version for authentication error notifications
...
Don't expose account name or error details when Android is configured to hide sensitive information on the lock screen.
2021-12-08 02:37:21 +01:00
cketti
57d7616d5a
Create public version for certificate error notifications
...
Don't expose account name or error details when Android is configured to hide sensitive information on the lock screen.
2021-12-08 02:37:21 +01:00
cketti
c47d79094c
Create public version for send failed notifications
...
Don't expose error details when Android is configured to hide sensitive information on the lock screen.
2021-12-08 02:37:21 +01:00
cketti
725c32ea0c
Create public versions for sync/sending notifications
...
When Android is configured to not show sensitive notification content, we no longer display account and folder names on the lock screen.
2021-12-08 02:22:18 +01:00
cketti
f042e2babd
Merge pull request #5812 from k9mail/fix_vibrate_on_notification
...
Only set vibration pattern if vibration is enabled
2021-12-07 20:23:40 +01:00
cketti
0964d50f2d
Only set vibration pattern if vibration is enabled
2021-12-07 02:11:53 +01:00
cketti
229eaa6350
Restore notifications when the app is restarted
2021-12-05 21:51:32 +01:00
cketti
14be46389f
Persist data about notifications
2021-12-04 21:59:06 +01:00
cketti
443a1d5d04
Create NotificationDataStore and make NotificationData immutable
2021-12-02 21:54:58 +01:00
cketti
d4887866c1
Remove unused @JvmStatic and @JvmName annotations
2021-11-30 22:56:09 +01:00
cketti
aee9088874
Save the timestamp when a notification was created for the first time
2021-11-30 01:46:53 +01:00
cketti
c9be254f0a
Get rid of Range lint warnings
2021-11-26 21:38:49 +01:00
cketti
a3033d1983
Use Timber for logging
2021-11-26 15:52:11 +01:00
cketti
878400c15f
Explicitly specify locale in case conversion or string formatting
2021-11-26 15:43:28 +01:00
cketti
9074d6c570
Remove unused strings
2021-11-26 15:23:57 +01:00
cketti
230d0f4a84
Remove unused code (K9.Intents.Share.EXTRA_FROM)
2021-11-26 02:46:58 +01:00
cketti
1fe6b454cd
Add support for properly importing/exporting "Auto-expand folder" = "None"
2021-11-24 22:34:46 +01:00
cketti
835eb6a7cc
Use the inbox for the auto-expand folder by default
2021-11-24 22:34:46 +01:00
cketti
04c114bbca
Merge pull request #5788 from k9mail/notification_refactoring
...
Separate notification UI/UX logic from notification creation
2021-11-24 21:17:36 +01:00
cketti
b7526588c7
Separate notification UI/UX logic from notification creation
2021-11-24 17:49:14 +01:00
Tobias Preuss
f0d3f371f0
Avoid leaking CountingOutputStream.
...
+ Affects com.fsck.k9.mail.filter.CountingOutputStream.
2021-11-23 09:45:05 +01:00
Tobias Preuss
2db95470db
Avoid leaking CountingOutputStream.
...
+ Affects org.apache.commons.io.output.CountingOutputStream.
2021-11-23 09:44:27 +01:00
cketti
63364b5c30
Refactor code to export the debug log
2021-11-15 16:29:39 +01:00
cketti
61046ef0fd
Update Mockito (Kotlin) to version 4.0.0
2021-10-30 05:32:51 +02:00
cketti
80f29f9b3b
Update Koin to version 3.1.3
2021-10-30 05:32:51 +02:00
cketti
ac8e61b6e9
Update AndroidX WorkManager to version 2.7.0
2021-10-30 04:22:16 +02:00
cketti
96f9b3bdd6
Update AppCompat to version 1.3.1
...
Update AndroidX Core to version 1.7.0
Update AndroidX Activity to version 1.4.0
Update Androidx Fragment to version 1.3.6
Update Androidx Lifecycle to version 2.4.0
2021-10-30 03:28:36 +02:00
cketti
a951e07fed
Merge pull request #5752 from k9mail/clock
...
Convert class 'Clock' to an interface
2021-10-25 18:10:20 +02:00
cketti
20dfc9a75b
Convert class 'Clock' to an interface
2021-10-23 04:00:15 +02:00
cketti
bbe015eea8
Rename .java to .kt
2021-10-23 03:53:19 +02:00
cketti
0f278ebfe2
Set subject when forwarding a message as attachment
2021-10-22 19:46:31 +02:00
cketti
01f3be62dd
Don't set notification priority to high for starred messages
...
This is an obscure feature I doubt was used much. It only worked on Android versions prior to 8.0 anyway.
2021-10-18 17:26:24 +02:00