Commit graph

91 commits

Author SHA1 Message Date
cketti
1da164bed4 Code style cleanup 2018-11-28 05:16:01 +01:00
cketti
c76d85adde Use request permission rationale mechanism instead of showing toast 2018-11-28 05:16:01 +01:00
cketti
4a79664139 Move common permissions code to K9Activity 2018-11-28 04:26:05 +01:00
cketti
9cc5b0f179 Don't request permission when recreating Activity from saved state 2018-11-28 03:15:56 +01:00
hstrobel
40143ae207 Addressed Review feedback, extracted EmptyCursor to a own class to reduce duplicated code 2018-11-28 01:24:09 +01:00
hstrobel
72c3ac5ad0 Addressed Review feedback 2018-11-27 23:16:37 +01:00
Henry
455228f182 Added mime4j-dom dependency in app:ui to make sure the package is available. Without it DefaultAddressParser is not found in the RecipentLoaderTest even though the dependecy is declared in common. Looks like a gradle bug to me. 2018-11-27 23:16:37 +01:00
GoneUp
249512e367 Implements runtime permissions for contacts, rebase of #3176
A thing to note is that the permission request will only show up when the targetsdk is upped >23.

Old commit message that explains the change:
--
The approach was to make it so that any K9Activity can easily request
whatever permission in the future.

The Contacts permission is now requested in two locations:

1.  When a list of Messages is displayed
2.  When a new message is first started to be composed.

The permission request is displayed ONCE per onCreate(). Any more than this
and it got really annoying.  A typical user who reads or writes emails
WILL see the request, trust me.  Once they see the message 2x, they
also have the option to block the requests from appearing.

If they DECLINE the request (or decline + DENY any further attempts),
the app should continues to work, albeit without incorporating contact data
(thumbnails, autocomplete, etc.). Contacts may still be added to the
Contacts app, as this uses an Intent and does not require any permission.

Once the Read Contacts permission is enabled, the app immediately begins
to use it.

To add other permissions in the future (such as External Storage access),
the request can be made in a similar way and the permission request result
handled appropriately by just adding it to K9Activity (or overriding in
a particular Activity).
2018-11-27 23:16:36 +01:00
cketti
7736d3610e
Merge pull request #3643 from williamvds/master
Use an adaptive icon
2018-11-24 18:33:26 +01:00
cketti
f3686a3ff3
Merge pull request #3740 from morckx/fix-uninitialized-drawer-use
Don't try to operate on an uninitialized drawer
2018-11-24 18:25:18 +01:00
morckx
ed7ca86b04 Don't forget to set actionBarSubTitle visibility when drawer is null 2018-11-23 21:26:37 +01:00
Vincent Breitmoser
33261885e9
Merge pull request #3742 from k9mail/selectableItemBackground
use native selectableItemBackground
2018-11-23 15:44:09 +01:00
Vincent Breitmoser
88a3167b25 use native selectableItemBackground 2018-11-23 15:42:23 +01:00
Marc K
7f8894c8f9 Don't try to operate on an uninitialized drawer
This is necessary whenever the account list is configured as default
starting view.

Fixes #3716
2018-11-22 12:14:05 +01:00
Vincent Breitmoser
81f496b7f3 Refresh OpenPGP provider setting onResume, and small cosmetic changes 2018-11-21 14:25:34 +01:00
Wiktor Kwapisiewicz
54d71ac54a
Remove partially constructed accounts on resume
Resuming account setup activity when the account has been partially
constructed (the setup has not been finished) resulted in having unsaved
account with ID = -1 in the accounts list. The application would then on
resume proceed to messages list but there won't be any folders as the
setup has been aborted.

The fix clears the list of accounts on resume and create so that the
application properly reacts to the event of no setup accounts.

Fixes #3717.
2018-11-20 15:10:06 +01:00
cketti
f168985b0b
Merge pull request #3709 from k9mail/automatic_special_folder_selection
Automatic special folder selection
2018-11-19 15:47:01 +01:00
cketti
c7a7bbfc8c Extract strings 2018-11-14 03:32:26 +01:00
cketti
05c091212c Rename NotificationChannelUtils to NotificationChannelManager 2018-11-14 02:30:55 +01:00
cketti
5e00abfaac Add support for SpecialFolderSelection to FolderListPreference 2018-11-13 20:38:45 +01:00
cketti
a519c91b64 Add SpecialFolderSelection to Account 2018-11-13 20:38:45 +01:00
cketti
fa1d6aab18 Remove EXTRA_SHOW_FOLDER_NONE from ChooseFolder 2018-11-11 23:28:41 +01:00
cketti
a1b48780fd Use null instead of special folder value K9.FOLDER_NONE ("-NONE-") 2018-11-11 23:28:41 +01:00
cketti
fe8d01dc32
Merge pull request #3699 from ojiofong/oji-notification-channel-from-ByteHamster
Add support for notification channels
2018-11-11 17:18:33 +01:00
Oji Ofong
a1b3cc8f1f Improve notification channel 2018-11-10 09:40:46 -05:00
cketti
9711b42412 Remove unused Folder.FolderType 2018-11-09 14:19:36 +01:00
ByteHamster
222fc0dcf8 Notification channels 2018-11-07 22:08:55 -05:00
williamvds
88475015ef
Provide adaptive icons 2018-11-04 14:50:14 +00:00
williamvds
424b71cdfc
Move app icons to mipmap directories 2018-11-03 14:02:39 +00:00
cketti
acf6e7c041
Merge pull request #3623 from ByteHamster/main-settings-page
Added icons to main settings screen
2018-11-01 04:20:50 +01:00
ByteHamster
23d0ab78cb Added icons to main settings 2018-11-01 04:08:35 +01:00
cketti
63b3379e5d Use TextQuoteCreator instances instead of static method 2018-10-25 01:41:00 +02:00
cketti
224174273c
Merge pull request #3650 from williamvds/drawer
Add preferences and unified inbox to drawer
2018-10-24 03:27:27 +02:00
cketti
387a668857 Fix item selection in drawer 2018-10-24 03:14:02 +02:00
cketti
a6040a90fc Don't mutate list of folders being passed to K9Drawer
When the same list is passed in again it will be reversed another time
and folders show up in the wrong order. This happens e.g. on orientation
changes.
2018-10-24 02:56:42 +02:00
cketti
edef1e16b5 Code cleanup and variable/field renaming 2018-10-24 02:52:06 +02:00
williamvds
02b253b0f1
Detect and select unified inbox in drawer 2018-10-21 13:31:58 +01:00
williamvds
58598c07cc
Add unified inbox to drawer 2018-10-21 13:09:00 +01:00
williamvds
e5a9580551
Add Settings to drawer 2018-10-21 11:18:56 +01:00
williamvds
d6daea3c12
Move drawer logic from MessageList into K9Drawer 2018-10-21 11:03:10 +01:00
cketti
a8d14c1dc7 Code cleanup 2018-10-18 22:01:10 +02:00
ByteHamster
b2c232e40a Search function for general settings 2018-10-18 20:57:43 +02:00
cketti
0351dc8694 Hide 'upload sent messages' setting when Backend doesn't support uploads 2018-09-04 18:05:03 +02:00
cketti
7af007ad2f Add setting to disable uploading of sent messages
Some providers automatically add messages sent via their outgoing
server to the Sent folder.
2018-09-04 18:05:03 +02:00
cketti
18bbd76783 Add a way to inject SchemaDefinition into LocalStore 2018-09-03 00:57:41 +02:00
cketti
24b2fbcc9d
Merge pull request #3592 from k9mail/remove_unnecessary_type_casts
[Cleanup] Remove unnecessary type casts
2018-09-03 00:42:39 +02:00
BO41
96be7af3f6 Remove unnecessary type casts 2018-09-03 00:31:12 +02:00
cketti
56882dc6c3 Fix unresolved references in Javadoc comments 2018-09-03 00:13:58 +02:00
BO41
c043eb0df4 Replace explicit type arguments with <> 2018-09-02 23:35:09 +02:00
cketti
ffd57c4e86
Merge pull request #3589 from k9mail/BO41_code_cleanup
[Cleanup] Improve accessibility, correctness and performance
2018-09-02 23:04:02 +02:00