Commit graph

143 commits

Author SHA1 Message Date
Vincent Breitmoser
a592b0dfba add reply button to message header 2018-12-03 04:34:31 +01:00
Marc K
ecd3238dd1 Update drawer when re-opened via intent (#3765)
Fixes #3764
2018-12-03 04:04:16 +01:00
cketti
1552c151a5
Merge pull request #3785 from wiktor-k/fix-notifications
Fix NPE when accessing settings screens
2018-12-02 18:25:12 +01:00
cketti
8f699ee542
Merge pull request #3771 from wiktor-k/app-compat-fixes
Add ActionBars to activities extending K9PreferenceActivity
2018-12-02 18:08:22 +01:00
Wiktor Kwapisiewicz
5c2bb43844
Fix NPE when accessing settings screens
Previous PR did not check if preferences to be removed exist on the
current screen and failed when the current screen was not the
notification settings.

Fixes #3782.
2018-12-02 17:50:46 +01:00
Meteor0id
aa8621cc58 Attempt to order menu items similar across views (#3511) 2018-12-02 02:24:28 +01:00
Wiktor Kwapisiewicz
e757e59156
Hide built-in notification settings on Android O
Resolves #3722.
2018-12-01 21:05:05 +01:00
Wiktor Kwapisiewicz
d9ddba4e60 Add an item that opens system notification settings
This item is displayed only on Oreo or higher and is hidden in previous
versions of Android.
2018-12-01 21:04:39 +01:00
Wiktor Kwapisiewicz
4578863118
Convert PreferenceScreens to Categories
Nested PreferenceScreens do not get the AppCompat Action Bar.
Converting them to categories works-around the issue.

Resolves #3753.
2018-11-30 13:27:36 +01:00
Wiktor Kwapisiewicz
3caa56a57e Add Action Bars to Preference activities 2018-11-30 13:26:11 +01:00
cketti
bb6427cec0
Merge pull request #3744 from k9mail/dumb-account-1
Move logic out of Account class (1)
2018-11-30 01:45:53 +01:00
cketti
55746ea3ff
Merge pull request #3760 from sgomin/master
Optionally enable web cache
2018-11-29 23:30:54 +01:00
Stan Gomin
959b022ee2 Enabling Web cache unconditionally 2018-11-30 09:05:36 +11:00
Vincent Breitmoser
47767b9e3f small code cleanup 2018-11-29 18:23:30 +01:00
Vincent Breitmoser
583c5b0432 extract Account.getLocalStore into LocalStoreProvider 2018-11-29 18:22:12 +01:00
Vincent Breitmoser
a42d1111ae move extensive setter logic out of Account into saveAccount() 2018-11-29 18:22:12 +01:00
Vincent Breitmoser
6276450c65 move loadAccount logic into AccountPreferenceSerializer 2018-11-29 18:22:12 +01:00
Vincent Breitmoser
86bc5ed823 extract "save" method from Account (and fix unit tests) 2018-11-29 18:19:07 +01:00
Vincent Breitmoser
6c71b13e9b extract move methods from Account 2018-11-29 18:19:07 +01:00
Vincent Breitmoser
912b5d70a4 extract AccountSearchConditions and LocalKeyStoreManager from Account 2018-11-29 18:19:07 +01:00
Vincent Breitmoser
7819045e1b Extract deletion and saving of accounts into AccountManager 2018-11-29 18:19:07 +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
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
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
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