Commit graph

623 commits

Author SHA1 Message Date
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
68405c91b4
Merge pull request #4991 from k9mail/signature_detection_fix
Fix bug in signature detection
2020-10-07 16:54:44 +02:00
cketti
1a58f4d4f0 Fix bug in signature detection
When SignatureWrapper detected a signature it would exclude the last character of the text. This lead to an exception being thrown when the signature ended with a URL and the HtmlModification instance for the URL would not be fully contained within the one for the signature.
2020-10-07 15:43:29 +02:00
cketti
5312c3d1ca Treat all whitespace as separator when detecting URIs 2020-10-06 22:39:04 +02:00
cketti
0c77513407
Merge pull request #4986 from k9mail/GH-4984_fix_preview_text_extraction
Fix preview text extraction
2020-10-06 16:11:40 +02:00
cketti
b8edb11eea
Merge pull request #4983 from k9mail/signature_display
De-emphasize signature when displaying text/plain part
2020-10-06 16:10:07 +02:00
cketti
e3b8855bdd Catch unexpected exceptions in MessagePreviewCreator 2020-10-06 15:15:19 +02:00
cketti
15ca949698 Make PreviewTextExtractor work with empty string 2020-10-06 15:11:02 +02:00
cketti
ca5a044247 De-emphasize signature when displaying text/plain part 2020-10-05 18:27:10 +02:00
cketti
7d6ca63cf2 Add support for nested HtmlModifications to TextToHtml 2020-10-05 18:13:55 +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
cketti
a1e9a521e3 Replace somewhat complex regular expression with code
Apparently the regular expression \n*(?:[^\n]+\n?)+:\n+$ is complex enough so matching takes the regex engine on Android forever on non-trivial inputs.
2020-10-03 02:28:48 +02:00
cketti
99ce09f19d Improve preview text extraction
Using 'EmailSectionExtractor' provides the necessary context to reliably detect quote headers, i.e. text like "On $date $sender wrote:". The regular expression previously used would remove almost any line ending with ":".
2020-10-03 02:28:48 +02:00
cketti
6a25709e09 Convert 'PreviewTextExtractorTest' to Kotlin 2020-09-30 03:00:20 +02:00
cketti
4c08c964e7 Rename 'PreviewTextExtractorTest' prior to conversion to Kotlin 2020-09-30 03:00:20 +02:00
cketti
bb4ed7a15c Convert 'PreviewTextExtractor' to Kotlin 2020-09-29 23:31:24 +02:00
cketti
ab4e0229dc Rename 'PreviewTextExtractor' prior to conversion to Kotlin 2020-09-29 23:22:15 +02:00
cketti
b82be6f374 Retain some attributes of <body> element during HTML sanitization 2020-09-20 18:01:00 +02:00
cketti
10ce58d603 Add <title> tag to allow list 2020-09-20 17:42:35 +02:00
cketti
ec34b96bfa Convert 'HtmlSanitizerTest' to Kotlin 2020-09-20 17:42:35 +02:00
cketti
796eabb705 Rename 'HtmlSanitizerTest' prior to conversion to Kotlin 2020-09-20 17:42:35 +02:00
cketti
fc45e059fc Update to targetSdkVersion 29 2020-09-20 01:29:50 +02:00
cketti
391d8e403c Use mocked QuoteDateFormatter in TextQuoteCreatorTest 2020-09-20 01:08:39 +02:00
cketti
fd9d6f8d95 Use default Locale in QuoteDateFormatter 2020-09-20 01:04:33 +02:00
cketti
2db24bec08 Change QuoteHelper into QuoteDateFormatter 2020-09-19 20:44:54 +02:00
cketti
075fb35cd9 Get rid of QuoteHelper.QUOTE_BUFFER_LENGTH 2020-09-19 19:51:13 +02:00
cketti
e79dacd126 Use buildString() helper in TextQuoteCreator 2020-09-19 19:27:56 +02:00
cketti
0c97e2a4e0 Update Robolectric to 4.4
Replace usage of classes from transitive dependencies that are no longer available.
2020-09-18 03:14:46 +02:00
cketti
3211e3942c Show image previews even when wrong MIME type is used
More precisely, show image preview when the MIME type is application/octet-stream and the file extension maps to a supported image MIME type.
2020-09-09 12:16:03 +02:00
cketti
fefe183d9a
Merge pull request #4921 from k9mail/decode_encrypted_subject
Decode encrypted subject
2020-08-25 17:31:56 +02:00
cketti
bdbd8d98b2 Decode encrypted subject 2020-08-25 17:15:00 +02:00
Tobias Preuss
f8e6e59fd6 Use io extension functions to make code more concise.
+ This change replaces a few usages of BufferedWriter, ByteArrayInputStream,
  OutputStreamWriter with their equivalent Kotlin extension functions.
2020-08-24 19:22:29 +02:00
cketti
4a92388ed4 Refactor code for readability and consistency 2020-08-13 17:56:55 +02:00
Victor Frandsen
009050567d Don't show standard message actions for messages in the Outbox 2020-08-13 17:42:16 +02:00
cketti
28387c685e Add missing Koin definitions to TestApp 2020-08-13 17:04:12 +02:00
Tobias Preuss
4beee75b32 Use "isNotEmpty" convenience function. 2020-07-08 14:04:37 +02:00
Tobias Preuss
35b1d17244 Use property access syntax. 2020-07-08 14:00:23 +02:00
Tobias Preuss
9c6d08142a Infer type. 2020-07-08 13:58:23 +02:00
cketti
c71c6bc230 Automatically update folder list
Refresh list of folders before syncing an individual folder if the last time the folder list was refreshed was more than 30 minutes ago.
2020-06-26 23:56:07 +02:00
cketti
ccf9004090 Remove unused Contacts from MessagingController 2020-06-26 21:43:16 +02:00
cketti
7acab6cb33 Use injected Preferences instance in MessagingController 2020-06-26 21:42:53 +02:00
cketti
b87521ade4 Inject Preferences into MessagingController 2020-06-26 21:42:51 +02:00
cketti
ace8bc1244
Merge pull request #4847 from runningcode/no/api
Use api instead of implementation.
2020-06-24 03:22:35 +02:00
Nelson Osacky
907106bfdc Use api instead of implementation.
This improves the build times when making incremental changes.
See [this slide](https://speakerdeck.com/runningcode/beyond-modularization-scaling-your-android-build-with-gradle?slide=97)
for the performance improvements.
2020-06-23 11:27:39 +02:00
cketti
925bb66ea5 Remove failed pending commands 2020-06-19 19:43:33 +02:00
cketti
74942150e5
Merge pull request #4839 from k9mail/local_only_operations
Don't attempt to perform remote operations on local-only folders
2020-06-19 16:57:47 +02:00
Mehdi Sadeghi
dfbcbad458 Let WebView handle bidirectional text 2020-06-19 16:25:21 +02:00
cketti
5c5f2409be Don't upload draft message if not supported 2020-06-17 22:48:20 +02:00
cketti
be5b16040e Don't upload sent message if Sent folder is local-only 2020-06-17 15:46:57 +02:00
cketti
f7ee43bc3d Don't upload messages deleted from Outbox if not supported
When deleting a message from the local Outbox don't attempt to upload it to the (remote) Trash folder if the backend doesn't support that (POP3).
2020-06-17 15:39:51 +02:00