Commit Graph

2586 Commits

Author SHA1 Message Date
Zorica Stojchevska 30e5087084 Update copyright
MAILAND-2696
2022-05-23 21:01:57 +00:00
Maciej Surmacz 990b6d3b1a Refetches the pgp mime messages to get the attachments
As the pgp/mime messages are encrypted together with the message body,
the handling of those attachments needs to be different. The
LocalAttachment objects will contain all the attachment data and can't
be passed around between the activities.

The blocking call is far from perfect but making it async lead to race
conditions- the attachments sometimes would fail to be uploaded
correctly and not show in the attachments screen. As this is a rather
rare type of message, it should not have too much of an impact.

MAILAND-2894
2022-05-03 11:24:41 +02:00
Stefanija Boshkovska 845c7b1488 Update metrics sent when user switches between light/dark mode in details screen
MAILAND-2892
2022-04-29 14:48:20 +02:00
Davide Farella d2a4191332 Remove ProtonInput label from EditContactDetailsActivity.java
MAILAND-2897
2022-04-28 18:36:04 +02:00
Davide Farella 485c0dfac8 Fix crash on click on Birthday while editing contact
MAILAND-2897
2022-04-28 18:36:04 +02:00
Davide Farella eb09dff196 Remove usages of AppUtil.decorInAppIntent from
EditContactDetailsActivity.java

MAILAND-2897
2022-04-28 18:36:04 +02:00
Maciej Surmacz b57eb65696 Introduces a retry mechanism for embedded image download
MAILAND-2879
2022-04-21 13:33:29 +00:00
Stefanija Boshkovska c72bb87103 Fix injecting dark style in sent messages when the app is in dark mode
The problem was that we were sending a message that was styled according
to what we show in the app. Instead, for the sending, we need the clean
HTML message body of the parent message when we reply/forward. Initial
message content is the holder of the quoted text (parent message) and
the solution included setting its value to be the clean HTML body of the
parent message.

MAILAND-2847
2022-04-20 17:45:34 +02:00
Maciej Surmacz 970e334547 Fixes downloading of the pgp/mime message attachments
The pgp/mime messages are encrypted together with the attachments.
What that means is once we have decrypted the message, we already
have the attachments in memory, so there's no need to try to fetch
and decrypt them again.

MAILAND-2848
2022-04-15 14:31:49 +00:00
Maciej Surmacz 3449fdea4f Fixes the contacts not showing in suggestions in composer
Observe the 'set up complete' value before fetching the contacts
and don't use a lateinit var for contact groups- as the value would
usually be uninitialised the first time around it was being accessed.

MAILAND-2866
2022-04-15 10:25:14 +02:00
M. Thiercelin b2dc0d154a
Use only the primary address key when uploading attachments for sending
The code was using all the address keys instead of only the primary key
to encrypt the attachments to upload.
This caused the key packet to contain several key packets (since the change in gopenpgp v2.4.3),
which was not accepted by the backend.
2022-04-14 17:05:00 +02:00
Maciej Surmacz 72bf6db4e8 Reviews the logs as a first step to clean up sentry
Removes some of the logging when not really needed and adds
filtering function to ignore a number of exceptions we do not care about
2022-04-14 09:59:36 +00:00
Zorica Stojchevska aa55a9d7cb Sender defaults to wrong address on reply/forward
We were using a wrongly sorted list to choose the correct address from,
now we use the address list inside the correct user and since the keys
start from 1 and positions from 0 that is why we had to subtract 1.

MAILAND-2846
2022-04-13 19:11:12 +02:00
Stefanija Boshkovska 1c02c7aa76 Upate core to version 7.1.11 2022-04-13 12:08:50 +02:00
Zorica Stojchevska db61d7a2cc Crash updating a contact
Worker has limitation of how much data can be passed to it and the
 encryptedData we were passing has a tendency to be heavy now we get the
  encryptedData of the contact from DB from withing the Worker to avoid
  having to pass the data..

MAILAND-2840
2022-04-12 17:55:35 +00:00
Stefanija Boshkovska 07e2e6924e Stop showing trashed items in Drafts and Sent folders
This is to minimise confusion when it comes to draft/sent messages being
moved to another location and still showing up in the Drafts/Sent
folders.

MAILAND-2845
2022-04-12 13:29:06 +00:00
Davide Farella 8ca80f902e Create single string for Quote sender header
We were using 2 strings, which was problematic translation for language
which has a different order of the words

L10N-557
2022-04-12 14:10:37 +02:00
Maciej Surmacz 1e4f970d8c Fixes the hyperlink confirmation settings
The setting was saved and read from different preferences. Fixed
by introducing an account settings repo, to have a single place
of accessing those and hide the shared prefs implementation detail.

MAILAND-2843
2022-04-11 14:01:44 +00:00
Stefanija Boshkovska f11dfd2056 Replace usage of deprecated startActivityForResult with registerForActivityResult
MAILAND-2832
2022-04-08 10:35:22 +02:00
Stefanija Boshkovska 6dfcf4d59c Save the draft when exiting composer instead of showing a dialog with a question
Remove the dialog that asks whether to save the draft or not and save
the draft automatically when there are changes in the composer. After
saving it show a snackbar that the draft has been saved and offer an
option to move the draft to trash from the snackbar.

MAILAND-2832
2022-04-08 10:35:22 +02:00
Stefanija Boshkovska 0b85a15243 Delete draft when closing an empty composer
If an empty composer is closed, do not ask if a draft should be saved.
The draft should not be saved if the composer is empty. For now, there
is one limitation to this solution. If the user adds something in the
composer and then removes it, there is no way to check this scenario
reliably and then we'll ask whether the draft should be saved or not.

MAILAND-2832
2022-04-08 10:35:22 +02:00
Davide Farella 69c499c6ce Remove checkbox from hyperlink phishing dialog
Also removed DialogUtils.showTwoButtonInfoDialog.dismissOnButtonClick
as it's the default behaviour and cannot be changed

MAILAND-2830
2022-04-07 18:13:35 +02:00
Davide Farella 251781d259 Fix exception getting WebViewClient below API 26 in MessageDetailsAdapter.kt
MAILAND-2830
2022-04-07 16:25:58 +02:00
Davide Farella 84cdfc7b5d Implement hyperlink confirmation dialog for phishing messages
MAILAND-2829
2022-04-07 16:25:58 +02:00
Davide Farella bc749c0f2f Bump MessageDatabase.kt [15] -> [16]
Bump Room [2.3.0] -> [2.4.2]

MAILAND-2380
2022-04-07 16:25:58 +02:00
Davide Farella 205aa715ce Add Message.flags
MAILAND-2830
2022-04-07 16:25:58 +02:00
Davide Farella 680daabf0c Sort Message's COLUMN constants alphabetically 2022-04-07 16:25:58 +02:00
Davide Farella c816bf394c Set phishing check in MessageDetailsPmWebViewClient 2022-04-07 16:25:58 +02:00
Davide Farella 84320fd97b Convert MessageDetailsListItem.kt in a sealed class
Sub-classes are now immutable data classes
2022-04-07 16:25:58 +02:00
Davide Farella 44bbbad308 Replace deprecated constructors in MessageDetailsListItem.kt 2022-04-07 15:25:52 +02:00
Davide Farella 606aaf499b Add MessageDetailsListItem.Header and MessageDetailsListItem.Body 2022-04-07 15:25:52 +02:00
Davide Farella a716b0c10c Format PmWebViewClient.kt to match Kotlin style 2022-04-07 15:25:52 +02:00
Davide Farella bb2a73469f Rename PMWebViewClient.kt to PMWebViewClient.kt to respect team
conventions
2022-04-07 15:25:52 +02:00
Davide Farella 14dd9ecbd7 Convert PMWebViewClient to Kotlin 2022-04-07 15:25:52 +02:00
Davide Farella 6759762904 Exit selection mode on toggle unread filter
MAILAND-2829
2022-04-07 10:05:06 +00:00
Davide Farella 38058139dc Implement Unread Filter in MailboxActivity.kt
MAILAND-1498,
MAILAND-2820
2022-04-07 10:05:06 +00:00
Davide Farella afaf743d9b Use MailboxState in MailboxActivity.kt and MailboxViewModel.kt
Replaced old flows with MailboxState.isUpdatedFromRemote and
MailboxState.unreadChip

MAILAND-1498,
MAILAND-2820
2022-04-07 10:05:06 +00:00
Davide Farella 0fbfa9cb7e Add MailboxState.isUpdatedFromRemote
MAILAND-1498,
MAILAND-2820
2022-04-07 10:05:06 +00:00
Davide Farella 87fe6b6ac1 Add UnreadChipState.kt into MailboxState.kt
MAILAND-1498,
MAILAND-2820
2022-04-07 10:05:06 +00:00
Davide Farella 9fedee9040 Rename MailboxItemsState.kt to MailboxListState.kt
MAILAND-1498,
MAILAND-2820
2022-04-07 10:05:06 +00:00
Davide Farella fad52f109e Create MailboxState.kt that wraps MailboxItemsState
MAILAND-1498,
MAILAND-2820
2022-04-07 10:05:06 +00:00
Davide Farella 3e9733f097 Move Mailbox classes into right packages
MAILAND-1498,
MAILAND-2820
2022-04-07 10:05:06 +00:00
Davide Farella f4c4fca1ff Rename MailboxState.kt -> MailboxItemsState.kt
MAILAND-1498,
MAILAND-2820
2022-04-07 10:05:06 +00:00
Maciej Surmacz 6bef2cfcc1 Preserves the current and previous app versions on prefs cleared
This is needed as the prefs are cleared after the user is logged in.
This means the app version and the last app version info will be lost
for that installation- in consequence, the next version won't be
recognised correctly as an app update.

MAILAND-2825
MAILAND-2797
2022-04-07 09:38:20 +02:00
Maciej Surmacz 2d0f7db9df Removes the version requirement to show the oboarding
All the logged in users will be shown this v4 onboarding no matter which
version they have been using before.

MAILAND-2825
2022-04-07 09:38:20 +02:00
Maciej Surmacz d7e1a34c96 Adds an observer to start the existing user v4 onboarding
The observer is registered only if:
- the app version changes,
- the previous version is earlier than the first v4 beta,
- user is logged in,
- the onboarding was not shown yet.

It listens to the first activity (any) creation after the app has been
created and starts the existing user onboarding activity. Once the
activity is shown, the flag in the prefs is updated accordingly
and the observer removes itself.

MAILAND-2825
2022-04-07 09:38:20 +02:00
Maciej Surmacz c08f9a979d Splits the new user and existing user v4 onboarding
Extracts the base classes and the concrete implementations for
the new user onboarding and the existing user onboarding.

MAILAND-2825
2022-04-07 09:38:18 +02:00
Stefanija Boshkovska 5958493123 Fix slow actions when a folder has loaded a large number of messages
The problem was caused by a query to the contacts DB which was checking
the sender/recipient contacts for each message every time the list of
messages is emitted. The mapping of the senders/recipients to the
appropriate contacts is now done in MessageRepository by querying all
the contacts at once, which improved the performance.

MAILAND-2812
2022-04-05 17:14:28 +00:00
Maciej Surmacz 55d4de2fd1 Schedules the cleanup after message send is scheduled
In addition, the cleanup worker will be cancelled when
the message has been sent successfully.

MAILAND-2789
2022-04-05 15:28:10 +00:00
Maciej Surmacz 48204336da Allows for multiple send error notifications to be shown at the same time
Before, only one send error could be shown for a given user, due to how the
notification id was calculated.

MAILAND-2789
2022-04-05 15:28:10 +00:00