Commit graph

345 commits

Author SHA1 Message Date
cketti
51457a6859 Simplify LocalStore.searchForMessages() 2022-02-24 20:28:03 +01:00
cketti
5d102ec610 Set targetSdkVersion to 31 2022-02-21 18:43:01 +01:00
cketti
13b57b7eba Use android:exported="false" when possible 2022-02-21 18:42:27 +01:00
cketti
8847e30cb7 Add appropriate mutability flags to PendingIntents 2022-02-21 18:42:27 +01:00
cketti
f6e03ff040 Don't expose MessageProvider to third-party apps
If this was an important feature to you, please contact us and tell us a little bit about your use case.
2022-02-17 20:56:31 +01:00
cketti
dee2ca345d Convert 'BaseAccount' to Kotlin 2022-02-08 16:54:15 +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
a4e1a77892 Switch to mockito-inline 2022-02-03 01:10:52 +01:00
cketti
91c0787fa5 Open message from notification in Unified Inbox if possible 2022-01-09 23:10:04 +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
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
514802e010 Make sure the message list widget reuses an existing MessageList activity 2021-12-09 02:01:40 +01:00
cketti
6c54b324d6 Switch back to using launchMode="singleTop" for MessageList
We previously removed it because using the default launcher intent would open the default folder instead of just bringing the app to the foreground. We now handle that case by ignoring the default launcher intent in MessageList.onNewIntent().

See 97a75a54ef
2021-12-09 01:50:56 +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
981e7fbe70 Improve support for RTL languages in layouts 2021-11-26 22:45:48 +01:00
cketti
1071f3b9dd Fix warnings in AndroidManifest.xml 2021-11-26 16:11:39 +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
b7526588c7 Separate notification UI/UX logic from notification creation 2021-11-24 17:49:14 +01:00
cketti
80f29f9b3b Update Koin to version 3.1.3 2021-10-30 05:32:51 +02:00
cketti
086ce98f44 Add sample data and various tools attributes to layouts 2021-10-27 14:38:18 +02:00
cketti
7209dc0ff2 Set theme in ui-legacy module so the IDE preview picks it up 2021-10-27 04:37:51 +02:00
cketti
e1aef32042
Merge pull request #5703 from k9mail/choose_folder_ui
Tweak toolbar in 'choose folder' screen
2021-09-30 14:11:14 +02:00
cketti
8ae5378942 Remove Flag from MessageReference 2021-09-29 15:27:45 +02:00
cketti
4eb0c692d3 Change title of ChooseFolderActivity for copy/move operations 2021-09-28 18:48:53 +02:00
cketti
799917d5b8
Merge pull request #5697 from k9mail/demo_backend
Add "demo" backend
2021-09-28 15:28:35 +02:00
cketti
c6936043c6 Remove unused functionality from StorageManager and StorageProvider 2021-09-24 18:39:20 +02:00
cketti
eae910fe8f Add "demo" backend 2021-09-23 22:43:02 +02:00
cketti
fb8f98486f Remove Account.isAvailable() 2021-09-17 10:47:03 +02:00
cketti
219648f142 Get rid of mount/unmount receivers for external storage
We no longer support storing the database on "external storage". Even when migrating old databases chances are very slim "external storage" actually is a removable storage device.
2021-09-17 10:01:14 +02:00
cketti
f2f8e4d0f3 Remove FolderRepositoryManager
Instead we use one FolderRepository instance and pass Account as parameter to individual functions.
2021-08-26 22:34:57 +02:00
cketti
5bba535699 Convert notification classes to Kotlin 2021-08-26 01:36:25 +02:00
cketti
ed6cbe1c4b Rename .java to .kt 2021-08-26 01:35:18 +02:00
cketti
652d52b6a6 Add setting to suppress notifications for chat messages
Messages containing a 'Chat-Version' header field will not generate notifications when this setting is enabled.
2021-08-18 11:17:06 +02:00
cketti
ac4cb37ea7 Add network security config to allow user-installed CAs 2021-07-29 11:45:17 +02:00
cketti
26c64806f2 Add "Push Info" screen 2021-07-15 00:20:48 +02:00
cketti
cac4874f25 Fix AndroidAlarmManager dropping alarms
It was possible that the 'callback' property was set to 'null' after another alarm was already scheduled. This meant the callback function wasn't called when the next alarm went off.
2021-07-08 18:49:30 +02:00
cketti
0073913279 Show snackbar in MessageList to get to "What's new" when the app was updated 2021-07-03 14:32:40 +02:00
cketti
ebbe02c057 Add ImapPushConfigProvider 2021-06-23 15:34:31 +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
7a940240c3 Add BootCompleteReceiver to start PushController on device boot 2021-06-18 19:34:28 +02:00
cketti
a74c206a0c Add implementation for BackendIdleRefreshManager 2021-06-16 15:04:01 +02:00
cketti
c8808ae447 Add ImapBackendPusher that manages multiple ImapFolderPusher instances 2021-06-13 00:51:23 +02:00
cketti
46a2c351d5 Add foreground service for Push 2021-06-12 17:04:45 +02:00
cketti
f3b7cd7d14 Add notification channel for a Push foreground service 2021-06-11 18:33:09 +02:00
cketti
296ba92221
Merge pull request #5333 from k9mail/imap_interfaces 2021-06-10 21:28:01 +02:00
cketti
94f630cf88 Introduce ImapStore interface 2021-06-10 21:00:58 +02:00
cketti
db0bd06f21 Re-apply the locale override to the configuration if necessary 2021-06-05 14:18:00 +02:00
cketti
2598d3e199 Remove "Notification opens unread messages" option 2021-06-01 09:45:12 +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
a61429e8c5 Rewrite custom app language feature
Add AppLanguageManager that notifies listeners when the app language has been changed. K9Activity uses this mechanism to restart() on language changes. The Application object will update its configuration.

Instead of using the deprecated Resources.updateConfiguration() we now use LocaleContextWrapper (in combination with AppCompat) to override the locale in the configuration.
2021-04-20 21:41:18 +02:00
cketti
370481236a Convert 'Preferences' to Kotlin 2021-03-22 22:57:33 +01:00
cketti
9b53ae26d6 Rename 'NotificationDeleteConfirmation' to 'DeleteConfirmationActivity' 2021-03-01 22:21:50 +01:00
cketti
6c3d71c0fa Move 'NotificationDeleteConfirmation' to new package 2021-03-01 22:21:12 +01:00
cketti
c296a0d8d0 Clean up code 2021-02-20 15:32:34 +01:00
ByteHamster
973c5ed02b Show message headers in fragment 2021-02-20 13:28:15 +01:00
cketti
08d6d9bebc Delete remaining store/transport URI functionality 2021-02-01 17:30:21 +01:00
cketti
de2560b90b Remove Account.storeUri and Account.transportUri
The URIs are still used as serialization format when saving settings
2021-02-01 12:54:02 +01:00
cketti
fae9255bca Update/fix notification icons 2021-01-23 04:26:39 +01:00
cketti
5eeb4b56be Unify icon vector drawables for dark and light themes 2021-01-23 04:26:39 +01:00
cketti
1873593dc5 Format Kotlin code 2020-10-16 16:41:19 +02:00
cketti
5f05b8bb07 Show sender/recipient name in message list based on folder
The recipient name is shown for messages in the Sent, Drafts, and Outbox folders. For messages in all other folders the sender name is shown.
2020-10-12 01:48:36 +02:00
cketti
3133573139 Rewrite Share functionality in message view screen
The shared text now contains subject, date, sender, and recipients in addition to the message body text.
2020-10-05 05:38:54 +02:00
Alex Dawson
c671c84191 Persist state in unread widget configuration during screen rotation 2020-10-03 18:11:14 +02:00
cketti
988966d190 Update Glide to 4.11.0 2020-07-17 23:37:17 +02:00
Tobias Preuss
117af49699 Keep cascaded if because code is easier to read. 2020-07-08 19:22:29 +02:00
Tobias Preuss
9c6d08142a Infer type. 2020-07-08 13:58:23 +02:00
cketti
1a96ef4641 Remove Folder.serverId property 2020-06-13 02:02:56 +02:00
cketti
e5d6bf1cc6 Change UnreadWidgetDataProvider to not get FolderDetails 2020-06-13 02:02:56 +02:00
cketti
00fc6708cc Change MessagingController.deleteMessagesSynchronous() to use folder ID 2020-06-12 18:53:11 +02:00
cketti
4976d4e178 Change MessagingListener.folderStatusChanged() to use folder ID 2020-06-12 18:53:11 +02:00
cketti
3ffa488e6c
Merge pull request #4823 from k9mail/always_notify_for_inbox
Don't skip notifications if the Inbox is configured as another special folder
2020-06-12 17:03:26 +02:00
NITIN DUDIA
32a6c8fde1
Update unread_widget_configuration.xml
Allow folder selection only after a account is selected.
2020-06-05 19:57:27 +05:30
cketti
20b473b4d8 Don't skip notifications if the Inbox is configured as another special folder 2020-06-05 01:39:44 +02:00
cketti
f1a08e54f6 Add logging to K9NotificationStrategy 2020-06-02 13:21:32 +02:00
cketti
21c14c49bd Add :app:ui:base module and move K9Activity to it 2020-05-19 18:16:15 +02:00
cketti
981e12965a Add isLocalOnly property to Folder 2020-05-15 19:55:26 +02:00
cketti
5857f18203 Fix displaying the folder name in unread widget title 2020-05-07 17:10:12 +02:00
cketti
d15bfab01c Rewrite unread widget configurations created by old app versions 2020-05-07 17:10:10 +02:00
cketti
8b5055ec40 Update unread widgets from a background thread 2020-05-07 11:36:08 +02:00
cketti
7f80947740 Replace Account.getSentFolder() with Account.getSentFolderId() 2020-05-04 16:31:00 +02:00
cketti
253f4c85ff Replace Account.getSpamFolder() with Account.getSpamFolderId() 2020-05-04 16:31:00 +02:00
cketti
c943c03879 Replace Account.getDraftsFolder() with Account.getDraftsFolderId() 2020-05-04 16:31:00 +02:00
cketti
c56ae6dcab Replace Account.getTrashFolder() with Account.getTrashFolderId() 2020-05-04 16:31:00 +02:00
cketti
c6d96b2b34 Replace Account.getInboxFolder() with Account.getInboxFolderId()
In some instances the check for the Inbox folder could be removed.
We no longer allow one folder to have multiple roles, e.g. Inbox + Drafts.
2020-05-04 16:31:00 +02:00
cketti
010c0b42ef Remove folderServerId from MessageReference 2020-05-04 16:31:00 +02:00
cketti
9291881b6b Switch LocalSearch and everything connected to it to using folder IDs 2020-05-04 16:31:00 +02:00
cketti
dde0ef9820 Change MessageProvider delete URI to use folder ID instead of server ID 2020-05-04 15:01:29 +02:00
cketti
70841e40d7 Change K-9 Mail message URI to use folder ID instead of server ID 2020-05-04 15:01:29 +02:00
cketti
1c55ffda51 Change MessageReference to also store folder database ID 2020-05-04 15:01:29 +02:00
cketti
767f7e0efe Remove StoreConfig 2020-05-01 05:42:50 +02:00
cketti
02049c5882 Create DraftsFolderProvider 2020-05-01 05:38:37 +02:00
cketti
82db38bd08 Create ImapStoreConfig 2020-05-01 05:30:34 +02:00
cketti
e0b1d77650 Remove BootReceiver 2020-04-06 19:22:19 +02:00
cketti
2a78418911 Remove old Push code 2020-04-05 20:08:29 +02:00
cketti
defb055472 Remove code to mark contacts as read and WRITE_CONTACTS permission
See https://source.android.com/devices/tech/config/contacts-affinities
2020-03-19 17:31:14 +01:00
cketti
84558bd2d7 Add UnreadWidgetConfigurationFragment 2020-03-12 03:54:26 +01:00
cketti
c4ab630161 Remove 'androidTest' tests
We don't regularly run them and most of them don't even compile anymore.
2020-03-11 18:01:41 +01:00
cketti
17967c1af9
Merge pull request #4590 from k9mail/integrate_font_size_settings
Integrate font size settings into general_settings.xml
2020-03-06 15:45:48 +01:00
cketti
3a4d170755 Integrate font size settings into general_settings.xml 2020-03-05 15:19:17 +01:00
cketti
0e13c58550 Extract 'folder settings' screen to FolderSettingsFragment 2020-03-04 21:49:10 +01:00
cketti
00086bd15e Update Koin to 2.1.1 2020-03-04 14:39:30 +01:00
cketti
085332896e
Merge pull request #4556 from ByteHamster/metrics-opt-out
Opt out of WebView metrics
2020-02-21 15:07:15 +01:00
ByteHamster
f8cf52a59c Opt out of WebView metrics 2020-02-20 21:58:26 +01:00
cketti
99b5f38a9c Make SizeFormatter.formatSize() an instance method 2020-02-09 00:20:49 +01:00
cketti
aa08570a45 Make sure FolderNameFormatter uses the correct Resources instance
This is necessary so special folder names are displayed in the language
configured by the user under general settings.
2020-01-28 17:22:12 +01:00
cketti
9845b76338 Only use K9 themes in AndroidManifest.xml 2020-01-27 02:39:28 +01:00
cketti
aeef338efd Remove unread count from MessagingListener.folderStatusChanged() 2020-01-22 17:02:16 +01:00
cketti
0cd7164c2e Remove MessagingListener.messageDeleted()
Only home screen widgets used the callback to update themselves. But
they're also updating when folderStatusChanged() is invoked. So we can
safely get rid of messageDeleted().
2020-01-22 16:52:25 +01:00
Henry
28b8cabb2c
Add intent filter to main activity to provide default email application setting.
Adds intent filter [`CATEGORY_APP_EMAIL`] in order to provide the app's activity as possible default email application. This must be interpreted by Android and [set by the user outside of the application][1].

The new intent-filter for `APP_EMAIL` was added to activity `MessageList`.

[`CATEGORY_APP_EMAIL`]: https://developer.android.com/reference/android/content/Intent.html#CATEGORY_APP_EMAIL
[1]: https://github.com/k9mail/k-9/issues/3231#issuecomment-515759615
2020-01-21 17:14:10 +01:00
cketti
9b2b82eee6 Update Mockito to 3.2.4 and Mockito-Kotlin to 2.2.0 2020-01-19 16:27:53 +01:00
cketti
5870861b6b Rename styles.xml to unread_widget_styles.xml 2020-01-12 23:28:59 +01:00
cketti
95c927b9f7 Remove Theme.K9Dialog 2020-01-12 19:37:41 +01:00
cketti
13bc16caf8 Remove Message.getFolder() 2020-01-08 23:30:03 +01:00
Marcus Hoffmann
c1bdd9ee09 add background color to adaptive icons
This adds a desaturated version of K9-Mails envelope color as the
adaptive icon background color.

This should look a lot better than a plain white background.

Also slightly enlarge the icon shape.
2020-01-02 16:19:39 +01:00
cketti
617624c84e
Merge pull request #4390 from k9mail/keep_message_list_state
Remove launchMode attribute from 'MessageList'
2019-12-19 14:07:06 +01:00
cketti
97a75a54ef Remove launchMode attribute from 'MessageList'
Without this change backgrounding the app and then going back to it will
call onNewIntent(), which in turn will open the default folder.
2019-12-18 18:34:07 +01:00
cketti
399f0bab41 Add method to build 'ChooseFolderActivity' launch intent 2019-12-18 14:50:17 +01:00
cketti
a7510bcec5 Clean up 'ChooseFolderActivity' 2019-12-18 04:33:16 +01:00
cketti
af304dbd6a Use 'FoldersLiveData' in 'ChooseFolderActivity' 2019-12-18 03:18:14 +01:00
cketti
04734e7055 Create new package for 'ChooseFolderActivity' 2019-12-18 02:44:24 +01:00
cketti
c015b1e22a Create new package for 'ManageFoldersActivity' 2019-12-13 14:30:43 +01:00
cketti
df2711d520 Add DefaultFolderProvider to decide which folder to display by default 2019-12-12 00:47:58 +01:00
cketti
93d0e14b68 Fix code style issues found by ktlint 2019-11-29 13:44:00 +01:00
cketti
60377c1285 Update PendingIntent used when clicking the unread widget 2019-11-22 17:09:21 +01:00
cketti
6c96642dba Move UnreadWidgetProvider back to old location 2019-11-22 16:22:29 +01:00
cketti
4f2e199267 Don't send broadcast Intents for new/deleted messages 2019-11-21 18:31:39 +01:00
cketti
3030d0ec0e Remove 'RemoteControlService' 2019-11-21 18:26:45 +01:00
cketti
9655216606 Update to Koin 2.0.1 2019-11-20 15:38:11 +01:00
cketti
1335296b65 Replace color references for layout preview 2019-11-18 02:41:39 +01:00
cketti
18c62f15af Don't use theme attribute in layout used by message list widget 2019-11-18 02:09:23 +01:00
cketti
347d33849c Remove AccountStats 2019-11-06 17:59:31 +01:00
cketti
3114c6ef90 Replace MessagingController.getSearchAccountStatsSynchronous()…
…with getUnreadMessageCount()
2019-11-06 17:59:04 +01:00
cketti
24a22beccc Replace MessagingController.getAccountStats() with getUnreadMessageCount() 2019-11-06 17:59:04 +01:00
cketti
c41382e3d4 Remove MessagingListener.searchStats() 2019-11-06 17:59:04 +01:00
cketti
7f02272ae0 Remove unused MessagingListener.accountStatusChanged() 2019-11-06 17:59:04 +01:00
cketti
0168789047
Merge pull request #4235 from k9mail/remove_folder_list_activity
Remove 'FolderList' activity
2019-11-06 15:49:37 +01:00
cketti
570c478dd4 Fix activity-alias so there aren't two launcher entries 2019-11-06 04:31:26 +01:00
cketti
828e851dc6 Rename 'FolderList' to 'ManageFoldersActivity' 2019-11-05 23:08:08 +01:00
cketti
c1d338e213 Don't launch 'FolderList' from 'UnreadWidgetDataProvider' 2019-11-05 23:08:08 +01:00
cketti
2fcef664aa Remove 'Accounts' activity 2019-11-03 18:23:09 +01:00
cketti
5aa3afc5e8 Change 'K9NotificationActionCreator' to always launch 'MessageList' 2019-11-03 18:23:09 +01:00
cketti
2a96e5d339
Merge pull request #4232 from k9mail/remove_all_messages_account
Remove special account "All messages"
2019-11-03 17:05:14 +01:00
cketti
99b44bd5ca Remove special account "All messages" 2019-11-01 03:21:43 +01:00
cketti
9a197840e2 Replace WelcomeMessage with OnboardingActivity
Make use of new SettingsImportFragment from WelcomeFragment.
2019-11-01 01:58:22 +01:00
cketti
79301489e9 Convert AboutActivity to a fragment 2019-10-20 05:08:41 +02:00