Commit graph

784 commits

Author SHA1 Message Date
cketti
1bd3173f71 Don't start PushService if there are no Push-enabled accounts 2021-06-26 21:22:19 +02:00
cketti
ac131758b1 Make sure PushController only deals with Push accounts
We could end up with a non-Push-capable account that has `folderPushMode` set to something other than `NONE` due to missing checks in the settings import code. See issue #5363.
2021-06-24 15:22:10 +02:00
cketti
211ffb98df Set default value of 'Push folders' to 'None' 2021-06-24 14:22:00 +02:00
cketti
ebbe02c057 Add ImapPushConfigProvider 2021-06-23 15:34:31 +02:00
cketti
145eba5e2e
Merge pull request #5360 from k9mail/account_flow
Add AccountManager.getAccountFlow()
2021-06-23 12:59:59 +02:00
cketti
15bac4c18a Add AccountManager.getAccountFlow()
Instead of adding a custom callbackFlow() for each account property we're interested in, we can now use `AccountManager.getAccountFlow(accountUuid).map { it.relevantProperty }`.
2021-06-23 10:05:52 +02:00
cketti
a7f4093147 Remove unused K9JobManager.schedulePusherRefresh() 2021-06-22 16:04:20 +02:00
cketti
8fea80f14c Add PushController implementation 2021-06-22 15:30:23 +02:00
cketti
0b1a3a01fb
Merge pull request #5354 from k9mail/backend_changed_listener
Add listener mechanism to BackendManager
2021-06-21 14:16:29 +02:00
cketti
89d3cdbad5 Add listener mechanism to BackendManager 2021-06-21 14:03:45 +02:00
cketti
13caecad2d
Merge pull request #5353 from k9mail/connectivity_manager
Add ConnectivityManager to listen for changes in network availability
2021-06-21 13:58:53 +02:00
Art O Cathain
05c5319b45 Fix error when forwarding encrypted attachments
SafeContentResolver refuses to load encrypted attachments with an error:
"Content provider is not explicitly allowed:
com.fsck.k9.debug.decryptedfileprovider"

For internally provided attachments, there is no need to use
SafeContentResolver, so we use the default system ContentResolver
2021-06-21 21:08:24 +10:00
cketti
37c9ffbe90 Add ConnectivityManager to listen for changes in network availability 2021-06-19 16:11:51 +02:00
cketti
190242943c
Merge pull request #5352 from k9mail/alarm_manager
Add implementation for AndroidAlarmManager
2021-06-19 16:06:37 +02:00
cketti
f7277c911e Add implementation for AndroidAlarmManager 2021-06-18 20:29:35 +02:00
cketti
bf21572b57 Add AlarmManagerCompat 2021-06-18 19:47:00 +02:00
cketti
78ad10e3df Remove unused K9AlarmManager 2021-06-18 19:46:48 +02:00
cketti
7a940240c3 Add BootCompleteReceiver to start PushController on device boot 2021-06-18 19:34:28 +02:00
cketti
be17063212
Merge pull request #5348 from k9mail/account_push_controller
Add AccountPushController
2021-06-17 22:15:20 +02:00
cketti
bf1d528972 Add AccountPushController 2021-06-17 21:49:23 +02:00
cketti
e4af588431 Honor expunge policy when deleting messages
Previously, we didn't expunge messages when the expunge policy was set to 'immediately' (default) and no Trash folder was configured.
2021-06-16 19:47:01 +02:00
cketti
ac0f01c206
Merge pull request #5338 from k9mail/push_service
Add foreground service for Push
2021-06-13 00:09:02 +02:00
cketti
f45b8a2317 Add AutoSyncManager to listen for changes to the "auto sync" system setting 2021-06-12 23:53:15 +02:00
cketti
46a2c351d5 Add foreground service for Push 2021-06-12 17:04:45 +02:00
cketti
fb55ee76f9
Merge pull request #5337 from k9mail/notification_ids_test
Rewrite tests for NotificationIds
2021-06-12 16:00:28 +02:00
cketti
f3b7cd7d14 Add notification channel for a Push foreground service 2021-06-11 18:33:09 +02:00
cketti
5df81c2908 Rewrite tests for NotificationIds
Check the properties we actually care about instead of testing implementation details.
2021-06-11 13:52:01 +02:00
cketti
295b9d8d28
Merge pull request #5327 from k9mail/issue_4407_unifiedInbox 2021-06-04 21:38:15 +02:00
plan3d
4b488d9cbf Issue #4407: Fixed localized unified inbox title if app language was changed 2021-06-04 11:30:38 +02:00
cketti
63e6c61368 Make sure BodyTextExtractor.getBodyTextFromMessage() never returns null 2021-06-02 00:32:35 +02:00
cketti
2598d3e199 Remove "Notification opens unread messages" option 2021-06-01 09:45:12 +02:00
plan3d
1066cf84b0 Removed dead code 2021-05-31 16:30:53 +02:00
cketti
11c85017e2
Merge pull request #5313 from k9mail/push_folders_flow
Add FolderRepository.getPushFoldersFlow()
2021-05-29 13:23:08 +02:00
cketti
6862b737ed Add FolderRepository.getPushFoldersFlow()
This method returns a flow that emits the list of folders to sync via Push. It will automatically update when the account's 'Push folders' setting or a folder's Push class is changed.
2021-05-28 14:15:48 +02:00
cketti
fdaf91cd2e Remove 'Poll when connecting for push' setting 2021-05-28 12:28:54 +02:00
cketti
72b1ab5ac5 Remove message list update mechanism that no longer works
The adapter in MessageListFragment used a complicated mechanism that allowed for changing the displayed list by changing the cache and not reading the data from the database again. With the latest change to the adapter this no longer works. And so the associated "notification" mechanism can be removed.
2021-05-23 10:01:10 +02:00
cketti
769d658e5a Correctly persist message download state
Add the flag X_DOWNLOADED_FULL when the message has been downloaded completely, the flag X_DOWNLOADED_PARTIAL when only the text of a message has been downloaded, and set no additional flag when only the envelope and structure of the message has been downloaded. The latter happens when we fetch remote search results.
2021-05-10 00:47:27 +02:00
cketti
a389c1860f Move notification mechanism from K9MessageStore to NotifierMessageStore 2021-04-24 01:09:37 +02:00
cketti
8d45e9cdd3 Remove now unused code from LocalFolder 2021-04-23 22:28:40 +02:00
cketti
c204c24c23 Use new implementation in MessageStore to copy messages 2021-04-23 22:28:40 +02:00
cketti
e05bc461b5 Re-implement copy message functionality in MessageStore
Instead of loading a message into memory and then saving it to the new folder the new code copies the database entries and data files.
2021-04-23 22:28:40 +02:00
cketti
5444d8be3a Remove explicit dependency on Kotlin's standard library 2021-04-22 03:54:15 +02:00
cketti
632d8f3cb7 Upgrade Mockito-Kotlin to 3.1.0 2021-04-22 03:54:15 +02:00
cketti
0e7ec3846d Upgrade Koin to 2.2.2 2021-04-22 03:54:15 +02:00
cketti
c43f27a9ff
Merge pull request #5259 from k9mail/save_messages 2021-04-20 21:23:47 +02:00
cketti
abd336addb Save message in Outbox folder using MessageStore 2021-04-18 02:28:33 +02:00
cketti
903babe917 Save drafts using MessageStore 2021-04-17 23:26:46 +02:00
cketti
f58860f8bb
Merge pull request #5257 from k9mail/save_messages
Split Backend.fetchMessage() into two methods
2021-04-17 21:45:00 +02:00
cketti
127e311385 Change FolderDetailsAccessor to better support local folders
For "local-only" folders the server ID column in the database is NULL.
2021-04-17 17:54:25 +02:00
cketti
428ae60a58 Split Backend.fetchMessage() into two methods
The two new methods now also save the downloaded message data instead of returning a Message instance.
MessageStore.saveRemoteMessage() will now replace a message if it already exists.
2021-04-17 00:04:58 +02:00