Commit graph

263 commits

Author SHA1 Message Date
David Hoppenbrouwers
0f33a43a8c Added colored chip in Unified Inbox widget items (#3759)
Add colored chip in Unified Inbox widget items
2018-11-29 17:15:01 +01:00
Vincent Breitmoser
213646d56c rename _is-reply attribute to _is-reply-to-encrypted
as per dkg's comment in https://github.com/autocrypt/autocrypt/pull/376#discussion_r194886487
2018-11-29 14:05:46 +01:00
Vincent Breitmoser
29874cf99f add unit tests for draft state header 2018-11-29 14:00:46 +01:00
Vincent Breitmoser
d0a1535547 only add draft header to drafts 2018-11-29 13:56:03 +01:00
Vincent Breitmoser
4c295e2f1b use @JvmStatic instead of Companion reference, code style 2018-11-29 13:56:03 +01:00
Vincent Breitmoser
825f06b1f3 fix unit tests 2018-11-29 13:56:03 +01:00
Vincent Breitmoser
7040f855a5 save plaintext subject for encrypted drafts 2018-11-29 13:56:03 +01:00
Vincent Breitmoser
d0e588fb9f Save draft state in message header for now
Apparently, storing the draft state header in the encrypted payload
introduces difficulties in Enigmail due to restrictions from
Thunderbird. To stay compatible, this commit keeps the draft state in
the outer header for now, but we should move it into the encrypted
payload if the issue with Thunderbird is somehow resolved.

see: https://github.com/autocrypt/autocrypt/pull/376#issuecomment-384293480
2018-11-29 13:56:03 +01:00
Vincent Breitmoser
39a732d0c3 Honor encrypt all drafts setting during message compose 2018-11-29 13:56:03 +01:00
Vincent Breitmoser
18ad00790a Add setting to store all drafts encrypted 2018-11-29 13:56:03 +01:00
Vincent Breitmoser
f9527b9e67 allow building drafts with no recipients in PgpMessageBuilder 2018-11-28 12:23:33 +01:00
Vincent Breitmoser
6a19eb3d3a convert ComposeCryptoStatus to kotlin 2018-11-28 12:23:33 +01:00
Vincent Breitmoser
e1015d325b Load draft state from AutocryptDraftState header 2018-11-28 12:23:32 +01:00
Vincent Breitmoser
07b272a161 Add Autocrypt-Draft-State header to saved drafts 2018-11-28 12:22:51 +01:00
Vincent Breitmoser
47451c89fe Enable encryption if editing an encrypted draft
This commit is a hack. It assumes that if a draft is encrypted, the user
chose to encrypt at some point and sets the status based on that
assumption. This is only an assumption though, which becomes a problem
e.g. if some other MUA encrypts all drafts. At some point we should
remember the actual user choice.
2018-11-28 12:22:51 +01:00
Vincent Breitmoser
f7fb48f53f Disable payload header mechanisms for pgp/inline mails 2018-11-28 12:22:51 +01:00
Vincent Breitmoser
10875134f4 Always use PGP/MIME for drafts 2018-11-28 12:22:51 +01:00
Vincent Breitmoser
d7649a4391 Use \Draft flag to find if message is a draft 2018-11-28 12:22:51 +01:00
Vincent Breitmoser
74a7094944 Move K9-Identity header into encrypted body for encrypted drafts 2018-11-28 12:22:51 +01:00
Vincent Breitmoser
108db7e8a4 Load draft text from correct part 2018-11-28 12:22:51 +01:00
Vincent Breitmoser
d55be9edc4 Encrypt drafts to self 2018-11-28 12:22:51 +01:00
Vincent Breitmoser
0455157eb7
Merge pull request #3632 from GoneUp/runtime_contacts
Runtime permissions for contacts
2018-11-28 10:56:27 +01:00
Vincent Breitmoser
94585ffd93
Merge pull request #3745 from morckx/add-accounts-header-to-drawer
Add accounts header to the drawer
2018-11-28 10:51:45 +01:00
cketti
0c911dbac3 Increase targetSdkVersion to 23 2018-11-28 05:16:01 +01:00
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
Marc K
e9d3c14ff8 Add a tinted background image to the drawer account header
... using the configured account color as tint color.

Thanks @ByteHamster
2018-11-27 21:19:24 +01:00
morckx
269656dbe3 Render message lists in the background after account switch 2018-11-26 23:53:56 +01:00
morckx
cced6e34f2 Move openRealAccount from Accounts to MessageList 2018-11-26 23:13:05 +01:00
morckx
455b0f2c6c Make MessageListViewModel.getFolders aware of account switches 2018-11-25 10:50:07 +01:00
morckx
63154d0602 Remove more leftovers 2018-11-25 10:41:11 +01:00
morckx
e5fbedb541 Don't forget to set the photo icon 2018-11-25 00:08:44 +01:00
morckx
98d92d9cf2 Use contact photos as account icons 2018-11-24 23:58:10 +01:00
morckx
f11d0e47ec Fix account selection and folder list not beeing updated 2018-11-24 23:51:02 +01:00
morckx
a5196ed2f6 Clean up leftovers 2018-11-24 23:51:02 +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
830535081a Use font awesome icon also also for normal account 2018-11-24 13:59:26 +01:00
morckx
ef5cbfb1ec Use faw-users icon for unified inbox in accounts header 2018-11-24 13:59:26 +01:00
morckx
e8e03b1635 Show detailed unified inbox description in accounts drawer header 2018-11-24 12:22:06 +01:00
Marc K
1e4c7510a6 Add accounts header to the drawer 2018-11-23 22:17:34 +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