Commit Graph

905 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
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
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
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 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 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 bb2a73469f Rename PMWebViewClient.kt to PMWebViewClient.kt to respect team
conventions
2022-04-07 15:25:52 +02:00
Davide Farella 3e9733f097 Move Mailbox classes into right packages
MAILAND-1498,
MAILAND-2820
2022-04-07 10:05:06 +00:00
M. Thiercelin 18d5823e9b Fetch verification keys directly when decrypting body in message details.
Instead of fetching verification keys asynchronously and re-launching decryption
after they are ready, we block the decryption until the keys are fetched.

Also fixes the data transfer between the signature verification process and the
UI for the lock icons.

MAILAND-2046
2022-04-05 09:36:05 +00:00
Maciej Surmacz 6578df0894 Introduces a new drawer entry that opens the core subscriptions
MAILAND-2823
2022-04-04 13:29:05 +00:00
Davide Farella a6a19a8fd6 Add userId whenever required after ContactsRepository changes
MAILAND-2809
2022-03-29 15:19:32 +00:00
Davide Farella 6562ace99a Remove ComposeMessageViewModel.mergedContactsLiveData
Now, when combined contacts is on, we just fetch groups for every users,
 but following the regular flow

MAILAND-2809
2022-03-29 15:19:32 +00:00
Davide Farella 1d82354068 Fix conflicts after rebase
MAILAND-2788
2022-03-25 14:32:10 +00:00
Davide Farella 6a388ee10d Remove unused StartReportBugs from ActivityResultContracts.kt 2022-03-25 14:32:10 +00:00
Davide Farella 44281e095b Replace `StartMessageDetails` with `MessageDetailsActivity.Launcher` 2022-03-25 14:32:10 +00:00
Davide Farella 7efa1ad726 Reorganize /details/mailbox/presentation is subpackages 2022-03-25 14:32:10 +00:00
Maciej Surmacz b16d89ba37 Re-arranges packages of the pending action code
MAILAND-2789
2022-03-24 10:34:19 +00:00
Davide Farella 0be7537f17 Fix labels removed on saving draft
While saving draft, we were removing all the labels, but DRAFT,
ALL_DRAFT and ALL_MAIL

MAILAND-2788
2022-03-23 08:29:47 +00:00
Davide Farella da79e8fc64 Use `ALL_DRAFT` and `ALL_SENT` instead of `DRAFT` and `SENT`
MAILAND-2788
2022-03-23 08:29:47 +00:00
Maciej Surmacz 9d910f7276 Improves error messages for some of the most frequent sentry events 2022-03-22 14:03:10 +00:00
Davide Farella 86cb8415a9 Move prevent taking screenshots setting from User.java
Moved to:
* ObserveIsPreventTakingScreenshots.kt
* GetIsPreventTakingScreenshots.kt
* SavePreventTakingScreenshots.kt

MAILAND-2802
2022-03-21 16:32:50 +01:00
Zorica Stojchevska fa1c342c8d Fix the shared preferences that we use to check for app language setting
MAILAND-2801
2022-03-21 12:08:18 +00:00
Davide Farella f87428fccf Fix loading of the message body in ComposeMessageActivity.java
MAILAND-2798
2022-03-21 11:03:22 +00:00
Zorica Stojchevska dc2916cd20 Fixes history body not being present when replying from notifications
MAILAND-2755
2022-03-15 13:12:15 +00:00
Zorica Stojchevska 01f0740cc2 Add proper clearing for notification
By adding a use case to clear notification from DB, now we properly
clean up the notifications when dismissing them or opening them.
2022-03-15 13:12:15 +00:00
Zorica Stojchevska c20ef4ee34 Moves notifications to unified DB
Adds separation between layers for push notifications feature

MAILAND-2742
2022-03-15 13:12:15 +00:00
Zorica Stojchevska 9e515a71e1 Move notification related classes to notification package 2022-03-15 13:12:15 +00:00
Maciej Surmacz 5ad834310e Replaces lateinit network switcher with a lazily injected value
Need to use a lazy property in order to work around the cyclic
dependencies. The difference to using a lateinit var is that
the network switcher property will be initialised for sure when get() is
called for the first time- lateinit does not give any such guarantee.
2022-03-14 17:19:51 +01:00
Maciej Surmacz 3734d18c01 Replaces bug report screen with core implementation
The old implementation did not have any client-side validation
of the inputs. The core one looks and behaves better.

MAILAND-2782
2022-03-10 15:46:22 +00:00
stefanija 7ee00e30a0 Remove code connected to the old EngagementActivity
MAILAND-2695
2022-03-09 18:27:06 +01:00
Davide Farella b1a653f610 Rename `MailboxUiItem` -> `MailboxItemUiModel`
CLIENT-4412
2022-02-22 13:50:37 +01:00
Davide Farella e9db5312bc Handle logout on every Activity
Added LogoutHandler.kt, orchestrated by SecurityManager.kt

MAILAND-2639
2022-02-22 09:32:28 +01:00
stefanija 804aa615a4 Fix wrong default email shown in default email settings screen
The list was not sorted in a proper way. The solution was using the new
user instead of the legacy user. That way the list of users is always
sorted properly and the first email is the default one.

MAILAND-1992
2022-02-17 15:17:41 +01:00
stefanija b9577e491c Move use cases to the details package
MAILAND-2604
2022-02-14 13:02:30 +01:00
stefanija 6dc41d1087 Show the web view in the correct theme when clicking "View in Light/Dark mode" action
MAILAND-2604
2022-02-14 13:02:30 +01:00
stefanija 7da9e2ab12 Show the web view in the correct theme when opening the details screen
Take the user preference into consideration when deciding whether to
show the web view in light or dark mode.

MAILAND-2604
2022-02-14 13:02:30 +01:00
stefanija 36363db91b Add a use case that checks whether the app is in dark mode or not
MAILAND-2604
2022-02-14 13:02:30 +01:00
Davide Farella c0cda01542 Improve UX for non existent PM address
Show correct error from BE in the Toast and remove the address

MAILAND-2620
2022-02-11 09:23:35 +00:00
Davide Farella 1a5bafa476 Handle error code and message for FetchPublicKeys.kt
MAILAND-2620
2022-02-11 09:23:35 +00:00
Davide Farella 9bf04a8410 Refactor FetchPublicKeysResult.Success to contain a single entry
MAILAND-2620
2022-02-11 09:23:35 +00:00
Davide Farella 5c26b6ea4c Add Success / Error to FetchPublicKeysResult.kt
MAILAND-2620
2022-02-11 09:23:35 +00:00
Zorica Stojchevska d2608b29fd Solving crash on composer when replying from notification
This also solves double instance of composer remaining in recent when
 replying from notification

MAILAND-2734
MAILAND-2735
2022-02-02 18:15:27 +00:00