Commit Graph

52 Commits

Author SHA1 Message Date
Benoit Marty
7fbe848243 Exclude ContentToPreview from coverage, either by using annotation @ExcludeFromCoverage, or by inlining it. 2024-01-09 17:56:01 +01:00
Benoit Marty
bd91dd64e2 Rename Async to AsyncData 2024-01-04 16:30:56 +01:00
Benoit Marty
da23628c8a Introduce AsyncAction with a Confirmation state and use it for logout action. 2024-01-04 15:56:16 +01:00
ganfra
9f045fc7de Fix detekt 2023-12-19 12:59:13 +01:00
ganfra
280d55bd6e BackstackParentNode now become BaseFlowNode and adds Overlay navModel into it. 2023-12-19 12:55:14 +01:00
ganfra
b6ef4cdab2 Add Overlay navModel and related classes 2023-12-19 12:54:09 +01:00
Marco Romano
c69d610b6c Rename params in NodeFactories for clarity (#1916)
- `context` is now `buildContext` to reflect that it's of type `BuildContext` (and not an android `Context`).
- `NODE` generic type param is now `N` to stick with Java convention: https://docs.oracle.com/javase/tutorial/java/generics/types.html.
2023-11-29 10:01:07 +01:00
Marco Romano
e59a6b7ed6 Add missing screenshots in TimelineView (#1660)
Add audio, voice  and poll screenshots to TimelineView which were missing.
2023-10-27 12:18:28 +00:00
Jorge Martin Espinosa
5e547269e7 Integrate Element Call with widget API (#1581)
* Integrate Element Call with widget API.

- Add `appconfig` module and extract constants that can be overridden in forks there.
- Add an Element Call feature flag, disabled by default.
- Refactor the whole `ElementCallActivity`, move most logic out of it.
- Integrate with the Rust Widget Driver API (note the Rust SDK version used in this PR lacks some needed changes to make the calls actually work).
- Handle calls differently based on `CallType`.
- Add UI to create/join a call.

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-19 15:38:43 +00:00
ganfra
2c80eee840 Appyx : quick management of PermanentChild 2023-10-06 11:44:09 +02:00
Benoit Marty
52853101d9 migrate object to data object (#1135) 2023-08-24 09:32:44 +02:00
Benoit Marty
140271069c Enable detekt rule TooGenericExceptionThrown and fix existing issue. 2023-07-26 10:40:41 +02:00
Benoit Marty
7ea2f28d96 More log about Node lifecycle. Will help to track user navigation. 2023-07-12 12:01:54 +02:00
ganfra
b72313bc84 Nodes: rework RootFlowNode with cache service 2023-07-06 18:08:29 +02:00
Marco Romano
2a82e1b4e4 Async API improvements "v2" (#672)
* Async API improvements "v2"

**NB: This PR actually changes only 3 files in `libraries/architecture/`. All the other changes are automated refactors to fix the calling code.**

This is a proposal for improvements to our `Async` type as discussed in: https://github.com/vector-im/element-x-android/pull/598/files#r1230664392 and in other chats.

Please bear in mind it is just a proposal, I'd love to hear your feedback about it, especially when it comes to naming: I've tried to make parameter and function names use a terminology similar to what we find in the Kotlin stdlib and its `Result` type.

I'm inclined to like more the non-extension flavours of the new `run*` APIs, though I'd also like your feedback about what API shape you prefer.

### Summary of the changes:
#### Functional
- Adds `exceptionOrNull()` API to complement the existing `dataOrNull()` API.
- Adds `isFailure()`, `isLoading()`, `isSuccess()` and `isUninitialized()` courtesy APIs.
- Renames `executeResult()` to `runUpdatingState()`:
	- Becomes the base API to which all the other similarly named APIs call into.
	- Makes it inline.
	- Adds contract.
	- Passes over any `prevData` to newre Async states.
	- Passes through the `block`s return value.
	- Adds unit tests.
- Renames `execute` to `runCatchingUpdatingState()` and makes it just call into `runUpdatingState()`
- Adds extension function overloads to the `run*` functions to accept `MutableState` as receiver

#### Cosmetics
- Reorders classes and methods in alphabetic order.
- Reorder parameter names to mimic conventions in Kotlin stdlib.
- Adds docstrings where useful.

* Use `fold()`

* rename pop to popFirst

* Add docstrings

* Please Detekt

* Rename exception to error.

* Please detekt

* Update existing usages.
2023-06-27 13:37:23 +02:00
Marco Romano
924103521f Inline Async extension functions (#598)
Just a tiny perf improvement.
2023-06-15 12:53:11 +02:00
Benoit Marty
4d8aaecf67 Add comment. 2023-06-01 17:58:12 +02:00
ganfra
b0152059ff Room : continue improving members loading 2023-04-21 14:39:47 +02:00
Jorge Martin Espinosa
afd58f1634 Update Gradle to 8.1 and AGP to v8.0 (#329)
* Update AGP to 8.0.0.

* Set JAVA_HOME to JDK17

* Update lint version.

* Use right JDK for dependency analysis, replace deprecated env var.

* Upgrade to Gradle 8.1.

* Remove `@Supress(DSL_SCOPE_VIOLATION)` as it's no longer needed.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-17 08:49:52 +00:00
ganfra
a166636060 Add some tests on RoomFlowNode 2023-04-14 15:34:41 +02:00
Jorge Martin Espinosa
d7a6779343 [Room member list] Display room member list (#276)
* Implement room member list

* Move timeline initialization back to `TimelinePresenter`.

* Fix crash when the `innerRoom` inside a `RustMatrixRoom` is destroyed but `syncUpdateFlow` is still running.

* Address review comments
2023-04-04 16:07:57 +00:00
Jorge Martin Espinosa
f94d2b6c60 Handle 'invalid server' error in server selection screen properly. (#214)
* Handle 'invalid server' error in server selection screen properly.

* Use `action_learn_more` for composing the server location footer action.
2023-03-21 09:34:14 +01:00
ganfra
399bfdc5e6 Add small comments 2023-03-09 17:54:35 +01:00
ganfra
b2c68d555a [Architecture] introduce nodeBuilder concept 2023-03-07 20:31:16 +01:00
ganfra
43b304e523 Try splitting messages into api and impl modules 2023-03-03 14:38:05 +01:00
ganfra
c581f0b383 [Architecture] introduce BackstackNode 2023-03-02 17:55:26 +01:00
ganfra
15ed58b756 [Architecture] use FeatureEntryPoint on Preferences 2023-03-02 15:59:25 +01:00
ganfra
da92113e43 [Architecture] Introduce EntryPoint and use createNode for ParentNode too 2023-03-02 12:33:18 +01:00
Benoit Marty
0b6d7b0bc5 Add test for ChangeServerPresenter 2023-02-07 16:57:33 +01:00
ganfra
bfb508ba1d Remove PresenterConnector and molecule runtime in feature modules, directly call Presenter.present method 2023-02-01 15:56:07 +01:00
Benoit Marty
15700062c7 Rename function (code review) 2023-01-25 11:14:50 +01:00
Benoit Marty
7e2fd638e4 Animation between screens 2023-01-24 17:24:40 +01:00
ganfra
46e58fe64d enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") 2023-01-20 19:13:44 +01:00
ganfra
c6cfe2b5e2 Rename di module 2023-01-20 17:12:40 +01:00
ganfra
528c01199d Rename architecture module 2023-01-20 16:26:43 +01:00
ganfra
bdcfe98aab Changes after review 2023-01-19 15:26:06 +01:00
ganfra
3a6be5f745 Merge branch 'develop' into feature/fga/presenter_tests 2023-01-18 20:47:15 +01:00
ganfra
1f2a9026ea Add some refactoring and first simple test on RoomListPresenter 2023-01-18 17:57:34 +01:00
Benoit Marty
bd93e54543 Kotlin 1.8 + cleanup 2023-01-18 15:01:34 +01:00
Benoit Marty
66a389c4c5 Rename folders java to kotlin 2023-01-18 13:51:30 +01:00
ganfra
0fc8ed9b33 Fix detekt 2023-01-16 18:17:56 +01:00
ganfra
1919058aac Apply ktlint format 2023-01-13 18:37:28 +01:00
ganfra
b286b8bf9d Add copyright on new files 2023-01-13 18:36:16 +01:00
ganfra
3abba8e88f Remove viewmodel/fragment references 2023-01-13 18:20:10 +01:00
ganfra
c2643d0967 Remove SharedFlowHolder 2023-01-11 17:09:14 +01:00
ganfra
1a0c9df1da Use EventSink lambda in state instead of Flow in Presenter 2023-01-11 15:53:52 +01:00
ganfra
56e54bb172 Continue migrating BugReport/Rageshake/Crash screens 2023-01-10 21:18:16 +01:00
ganfra
7edfcac62b Migrate Preferences to new architecture 2023-01-09 19:27:28 +01:00
ganfra
7d65a4a1e7 Merge branch 'develop' into feature/fga/navigation First step: makes it compile by disabling the new screens (need to migrate to nodes) 2023-01-06 19:22:52 +01:00
ganfra
9ed208950e Migrate Login to new architecture and make some adjustments 2023-01-06 15:15:45 +01:00