Commit Graph

93 Commits

Author SHA1 Message Date
Neil Marietta 1e29b3da4a Upgraded Turbine to 0.12.1. 2023-01-17 10:23:31 +01:00
Mateusz Armatys 45c3bc4f1f Update the usage of testing APIs from Core. 2023-01-09 07:56:20 +00:00
Mateusz Armatys 1f6152a9d7 Update Core libs to 9.2.0.
Third-party library updates & emulator version update for instrumentation tests.

- Change device for instrumentation tests (due to SIGSEGV crash on API 28, x86)
- Update compileSdk to 32 (required by Compose)
- AGP 7.3.1 (needed to fix jacoco issue for instrumented tests)
- Kotlin 1.6.21 (1.6.20 is required by AGP and 1.6.21 required by Compose)
- Remove `buildToolsVersion` - it's determined by Android Gradle Plugin
- Hilt 2.44
- Android Test 1.4.0
- Android Test Orchestrator 1.4.1
- Dagger 2.44
- Fragment 1.5.4
2022-10-26 13:58:28 +00:00
Zorica Stojchevska 30e5087084 Update copyright
MAILAND-2696
2022-05-23 21:01:57 +00:00
Maciej Surmacz 92dbdd6c05 Adds buffer to the message loading flow
MAILAND-2739
2022-02-28 13:36:27 +00:00
M. Thiercelin d0f98baad2 Map active flags from core user keys to mail domain user keys
We need to have the active flag on user keys to make sure
the client doesn't use the inactive user keys.
The flags is already kept by the core model, we need to formard to the mail domain
user keys.

MAILAND-2725
2022-02-23 14:11:35 +00: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
Davide Farella 5ff1f0f80d Update turbine [0.6.1] -> [0.7.0] 2022-02-09 16:21:56 +01:00
Marino Meneghel e69db0d5ea Delete `User.isLegacy` and AddressKeyActivationWorker because unused
This class was not used since the integration of the login core modules
few months back.
We confirmed it can be dropped as it won't be used anymore after the key
migration takes place (was used for non-private, sub users only).

The user's property `isLegacy` (called `legacyAccount` on the "old" user
model) was only still used by this worked and it can be dropped too.

MAILAND-2401
2021-11-09 15:22:43 +00:00
Tomasz Giszczak 5cced21bb0 Updated LabelId references in LabelEntity and related.
MAILAND-1525
2021-10-20 14:20:02 +02:00
Tomasz Giszczak 4e81098ab4 Updated kotlin version to 1.5.31 and also kotlin coroutines and serialization libs. 2021-10-05 10:55:31 +00:00
Davide Farella ef56835ca4 Fix tests after ProtonStore for Messages
MAILAND-2089

# Conflicts:
#	app/src/test/java/ch/protonmail/android/mailbox/domain/usecase/ObserveMessagesByLocationTest.kt
2021-09-03 09:06:38 +00:00
Davide Farella 62ba8725fc Add MailboxState.ApiRefresh
in order to be aware of API refreshes on the UI side

MAILAND-2089
2021-09-03 09:06:38 +00:00
Davide Farella 66e65a569f Add ProtonStore.kt
[ProtonStore] works in a similar manner as [com.dropbox.android.external.store4.Store] but provide us a more flexible solution for our needing.

MAILAND-2089
2021-09-03 09:06:38 +00:00
Davide Farella a5424d0ed1 Remove outdated and unused `credentials` module 2021-09-03 09:06:38 +00:00
Davide Farella 3575cf9ef3 Adapt ObserveMessagesByLocationTest.kt to latest changes
MAILAND-2089
2021-09-03 09:06:38 +00:00
Davide Farella 849199d89e Use LoadMoreFlow in ConversationsRepository.kt
MAILAND-2089
2021-09-03 09:06:38 +00:00
Davide Farella 5f717ff3eb Use LoadMoreFlow into MessageRepository
MAILAND-2089
2021-09-03 09:06:38 +00:00
Davide Farella 4656e7948a Add LoadMoreFlowUtils.kt for cover ad-hoc repository integration
MAILAND-2089
2021-09-03 09:06:38 +00:00
Davide Farella b999de9fff Replace objects with classes for LoadMoreFlowTest.kt
MAILAND-2089
2021-09-03 09:06:38 +00:00
Davide Farella d656b14c3d Add real cases, online only and offline enabled, to LoadMoreFlowTest.kt
MAILAND-2089
2021-09-03 09:06:38 +00:00
Davide Farella 0e727751da Create loadMoreFlow.kt for deal with paged APIs
MAILAND-2089
2021-09-03 09:06:38 +00:00
Tomasz Giszczak 633bf1f150 Updated AddressId references in Address & User tests.
MAILAND-1430
2021-08-20 08:40:09 +02:00
Tomasz Giszczak 17ecd77f67 Introduced AddressId from core libraries instead of generic Id used previously.
MAILAND-1430
2021-08-19 12:55:23 +02:00
Tomasz Giszczak 118b4251c3 Introduced LabelId to replace previously used generic Id (used mainly by LabelChipUiModel).
MAILAND-1430
2021-08-19 12:55:23 +02:00
Tomasz Giszczak ac5484f017 Replaced Id with UserId from core library.
MAILAND-1430
2021-08-19 12:55:23 +02:00
Davide Farella 27b1614a0e Improve FieldsTest.kt style
Remove assert4k and renamed tests following camelCase rule

MAILAND-2011
2021-07-12 14:43:55 +00:00
Davide Farella 0fb225bcbe Handle null messageId, null or blank messageBody in CreateDraftWorker.kt
Added MessageHasNullId, MessageHasNullSenderAddress, MessageHasNullBody, MessageHasBlankBody in CreateDraftWorkerErrors.kt and return them as Worker's failure it constraints are not met, since they're not recoverable errors.

MAILAND-2002
2021-07-06 11:35:06 +00:00
Davide Farella f69707166a Add `checkNotBlank` `checkNotEmpty` for CharSequence
Added to the pre-existent `requireX` counterpart

MAILAND-2002
2021-07-06 11:35:06 +00:00
Davide Farella 0dde051c18 Revert "Create ImportAttachmentsToCache.kt with ImportAttachmentsToCacheTest.kt"
This reverts commit 44fd8dc3ed.

# Conflicts:
#	app/src/main/java/ch/protonmail/android/compose/ComposeMessageViewModel.kt
#	app/src/main/java/ch/protonmail/android/compose/presentation/model/MessagePasswordUiModel.kt
2021-06-29 15:56:15 +02:00
Davide Farella 15f1abd8a0 Revert "Implement new attachments method to ComposeMessageActivity.java and ComposeMessageViewModel.kt"
This reverts commit 49312d5b63.

# Conflicts:
#	app/src/main/java/ch/protonmail/android/activities/composeMessage/ComposeMessageActivity.java
#	app/src/main/java/ch/protonmail/android/compose/presentation/model/AttachmentsEventUiModel.kt
#	app/src/main/java/ch/protonmail/android/compose/presentation/ui/ComposeMessageKotlinActivity.kt
#	domain/src/main/kotlin/ch/protonmail/android/domain/entity/fields.kt
2021-06-29 15:56:15 +02:00
Davide Farella a59ec8a753 Revert "Implement FileType.kt for ComposerAttachmentUiModelMapper.kt"
This reverts commit 717b3dae19.
2021-06-29 15:55:28 +02:00
Davide Farella cb5fa123b6 Revert "Remove MimeType.kt enum"
This reverts commit 23f1ff04aa.

# Conflicts:
#	app/src/test/java/ch/protonmail/android/attachments/domain/usecase/ImportAttachmentsToCacheTest.kt
#	app/src/test/java/ch/protonmail/android/compose/presentation/mapper/ComposerAttachmentUiModelMapperTest.kt
2021-06-29 15:54:22 +02:00
Tomasz Giszczak 9b02367950 Updated coroutines version to 1.5.0.
MAILAND-1875
2021-06-09 20:54:20 +02:00
Tomasz Giszczak 438e1b678c Updated store4 to v4.0.2 to fix problems with date and incompatibility with kotlin 1.5 in tests.
MAILAND-1875
2021-06-09 20:53:25 +02:00
Tomasz Giszczak bb6d4af6c4 New way of faetching of contact thumbnail image added.
MAILAND-1875
2021-06-09 20:53:25 +02:00
Davide Farella 23f1ff04aa Remove MimeType.kt enum
MAILAND-1669
2021-06-08 09:51:15 +02:00
Davide Farella 717b3dae19 Implement FileType.kt for ComposerAttachmentUiModelMapper.kt
MAILAND-1669
2021-06-08 09:51:14 +02:00
Davide Farella 9841199f95 Implement ComposerAttachmentsView.kt
MAILAND-1669
2021-06-08 09:51:14 +02:00
Davide Farella 49312d5b63 Implement new attachments method to ComposeMessageActivity.java and ComposeMessageViewModel.kt
MAILAND-1669
2021-06-08 09:51:14 +02:00
Davide Farella 44fd8dc3ed Create ImportAttachmentsToCache.kt with ImportAttachmentsToCacheTest.kt
MAILAND-1669
2021-06-08 09:51:14 +02:00
Davide Farella 5ea184a915 Improve error handling while loading user
MAILAND-1705, MAILAND-1732

fixup! Improve error handling while loading user
2021-05-07 14:12:20 +02:00
Davide Farella 055b4f29d4 Handle CancellationException for runCatching
MAILAND-1629
2021-03-25 17:03:17 +01:00
Davide Farella 4ff01f9863 Fix add second account introducing Either
MAILAND-1629
2021-03-25 17:03:16 +01:00
Davide Farella a46509bcf2 Fix add second account introducing Either
MAILAND-1629
2021-03-25 14:01:07 +01:00
Davide Farella 520f13187b Add Arrow Core library
MAILAND-1620
2021-03-25 14:01:07 +01:00
Davide Farella 21c6ab2646 Fix tests after user id migration
MAILAND-1189

# Conflicts:
#	app/src/test/java/ch/protonmail/android/attachments/UploadAttachmentsTest.kt
#	app/src/test/java/ch/protonmail/android/usecase/compose/SaveDraftTest.kt
#	app/src/test/java/ch/protonmail/android/worker/CreateDraftWorkerTest.kt

# Conflicts:
#	app/src/test/java/ch/protonmail/android/api/interceptors/BaseRequestInterceptorTest.kt
#	app/src/test/java/ch/protonmail/android/utils/notifier/AndroidErrorNotifierTest.kt

# Conflicts:
#	app/src/main/java/ch/protonmail/android/worker/drafts/CreateDraftWorker.kt
#	app/src/test/java/ch/protonmail/android/api/interceptors/BaseRequestInterceptorTest.kt
#	app/src/test/java/ch/protonmail/android/attachments/UploadAttachmentsTest.kt
#	app/src/test/java/ch/protonmail/android/usecase/compose/SaveDraftTest.kt
#	app/src/test/java/ch/protonmail/android/utils/notifier/AndroidErrorNotifierTest.kt
#	app/src/test/java/ch/protonmail/android/worker/CreateDraftWorkerTest.kt
2021-03-18 10:48:00 +01:00
Davide Farella c31ff1c5c6 Fix minor styling issues
MAILAND-1365
MAILAND-1186
2021-03-18 10:44:46 +01:00
Davide Farella ae63e4dcef Refactor AccountSettingsActivity.kt:
* fixed code style
* deprecated old Address model and provided replacement
* migrated from username to user id

MAILAND-1186
2021-03-18 10:44:46 +01:00
Davide Farella db6d2c7487 Refactor BaseActivity.java to use User Id instead of username
MAILAND-1123

# Conflicts:
#	domain/src/main/kotlin/ch/protonmail/android/domain/entity/user/User.kt

# Conflicts:
#	app/src/main/java/ch/protonmail/android/activities/BaseActivity.java
2021-03-18 10:38:09 +01:00