Benoit Marty
d782162f27
Merge pull request #684 from vector-im/feature/bma/stringR
...
Quick PR to introduce `CommonStrings` type alias
2023-06-27 16:00:31 +02:00
ganfra
3d872ec0e2
RoomList: fix tests and sample
2023-06-27 14:06:58 +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
ganfra
2a24d0196e
Merge branch 'develop' into feature/fga/room_list_api
2023-06-27 10:47:50 +02:00
Benoit Marty
287328f7df
More cleanup
2023-06-27 09:51:33 +02:00
Benoit Marty
4a8c49fa28
Use CommonStrings everywhere
2023-06-27 09:45:00 +02:00
ganfra
e5c86675a4
RoomList: more rework on RoomSummaryDataSource
2023-06-26 18:02:53 +02:00
Marco Romano
ffc9d1e82e
Refine handleSnackbarMessage API ( #676 )
...
As per our offline convos during a PR review.
2023-06-26 16:29:50 +02:00
Benoit Marty
a226580c8c
Move FileSizeFormatter to module :libraries:androidutils
2023-06-26 11:14:53 +02:00
Benoit Marty
df4bc3d7ce
Improve rendering of cache size (and fix compilation issue)
2023-06-26 11:07:22 +02:00
Benoit Marty
ac60ef0cbe
Move FileSizeFormatter to a new module for injectable Android utilities.
2023-06-26 11:06:36 +02:00
bmarty
9c5c578c67
Sync Strings from Localazy
2023-06-26 00:10:53 +00:00
ganfra
e392f15872
Merge branch 'develop' into feature/fga/room_list_api
2023-06-23 18:14:09 +02:00
Jorge Martin Espinosa
95f65e2031
[Message Actions] Copy events to clipboard ( #665 )
...
* Add `Copy` action for text events
* Remove 'Copy' action from the list for non-text events
* Use `@ContributesBinding` to inject `AndroidClipboardHelper`.
2023-06-23 14:39:07 +00:00
Jorge Martin Espinosa
bdb1841e44
[Message Actions] Report messages ( #642 )
...
* Add report messages feature
* Try to improve how snackbars are delivered
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-23 10:44:47 +02:00
ganfra
37174cf53c
API: simplify NetworkMonitor api
2023-06-22 15:47:15 +02:00
Jorge Martin Espinosa
de7bbbd5cf
[Message Actions] Forward messages ( #635 )
...
* Add forwarding messages base
* Make forwarding single-selection
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-22 13:27:59 +02:00
ganfra
b3e11d184a
CanSendEvent default to true and branch refresh mechanism...
2023-06-21 17:43:08 +02:00
Benoit Marty
4b55641aae
Merge pull request #631 from vector-im/feature/bma/sendPermission
...
Take into acount send permission (power level)
2023-06-21 11:35:33 +02:00
Benoit Marty
02c56df991
Extract getCanSendEvent to the matrixui module, rename to canSendEventAsState and use produceState.
2023-06-21 10:57:55 +02:00
ganfra
c3b2db47bd
Merge pull request #617 from vector-im/feature/fga/fix_media_pre_processing
...
Feature/fga/fix media pre processing
2023-06-20 16:17:50 +02:00
bmarty
2faa96a4e4
Sync Strings from Localazy
2023-06-19 20:15:52 +00:00
ganfra
07a2d309c4
Timeline media: kind of align with other messenger apps
2023-06-19 21:38:54 +02:00
github-actions[bot]
3f7738c001
Sync Strings ( #630 )
...
* Sync Strings from Localazy
* Update strings, remove broken German translation
* Update screenshots
---------
Co-authored-by: bmarty <bmarty@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-19 11:18:01 +00:00
Benoit Marty
dfcbb33c0a
Display a banner instead of the composer when user cannot post message to a room ( #602 )
2023-06-19 11:52:34 +02:00
ganfra
7f8250106c
Media : Fix test compilation
2023-06-16 14:23:52 +02:00
ganfra
e7ad8f6e07
Merge branch 'develop' into feature/fga/fix_media_pre_processing
2023-06-16 14:05:11 +02:00
ganfra
b6e7228ce0
Fix MediaPreProcessor for images/videos sent as file
2023-06-16 13:52:07 +02:00
ganfra
dcb9bcd11e
Timeline: fix unknown aspectRatio
2023-06-15 22:50:01 +02:00
ganfra
a900721c0e
Merge pull request #603 from vector-im/feature/fga/update-rust-sdk-0.1.20
...
Matrix rust sdk: update to 0.1.20 (and fix compilation issues)
2023-06-15 16:35:45 +02:00
Benoit Marty
e907d610c2
Merge pull request #591 from vector-im/feature/bma/noDelayInTests
...
No delay in tests
2023-06-15 15:27:41 +02:00
ganfra
170c741130
Matrix rust sdk: update to 0.1.20 (and fix compilation issues)
2023-06-15 15:26:53 +02:00
Jorge Martin Espinosa
9bdf53f43d
Move logic of different BottomSheets in MessagesView to presenters ( #600 )
...
* Move bottom sheet logic in `MessagesView` to presenters.
* Make the block inside `SheetState.hide` suspend.
2023-06-15 14:58:18 +02:00
ganfra
9be0587b8b
Merge pull request #599 from vector-im/feature/fga/timeline_media_improvements
...
Feature/fga/timeline media improvements
2023-06-15 14:36:15 +02:00
ganfra
8207098091
Timeline: use thumbnailSource for image if available (except for gif)
2023-06-15 12:11:37 +02:00
ganfra
022e4645b4
Media: introduce a Kind.File so we don't use In-memory bytearray in timeline
2023-06-15 12:06:58 +02:00
ganfra
7b84a7d8fe
Merge pull request #597 from vector-im/feature/fga/fix_reply_timeline_ui
...
Feature/fga/fix reply timeline UI
2023-06-15 11:38:30 +02:00
Jorge Martin Espinosa
7ddf93ed09
[Message Actions] Retry sending failed messages ( #596 )
...
* Add `RetrySendMessageMenu` to retry sending failed messages or removing its local echo.
* Fix initial event being retrieved, not the updated one
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-15 11:27:37 +02:00
Benoit Marty
9321a9f718
Introduce simulateLongTask to ensure that the Presenter State Loading is visible.
...
Also do some cleanup on the tests.
2023-06-15 10:57:05 +02:00
ganfra
2f3a930ca3
Timeline: fix wrong username for reply
2023-06-15 10:28:23 +02:00
ganfra
123872dc3a
Timeline: fix ReplyToContent clip on click
2023-06-15 10:28:12 +02:00
Benoit Marty
3c250b2a0d
Unblock develop
2023-06-13 11:11:27 +02:00
Benoit Marty
1734b3ec60
Merge pull request #584 from vector-im/feature/fga/fix_work_on_main_thread
...
Extract fetchDetailsForEvent and use coroutineDispatchers.io
2023-06-13 10:05:01 +02:00
Benoit Marty
ef7ddb8d0f
Merge pull request #549 from vector-im/feature/bma/onboardingServer
...
Onboarding iteration
2023-06-13 09:21:50 +02:00
ganfra
92adef5384
Extract fetchDetailsForEvent and use coroutineDispatchers.io
2023-06-12 20:23:58 +02:00
Benoit Marty
91d20e1b78
Enforce usage of TestScope.testScheduler
2023-06-12 19:49:56 +02:00
Jorge Martin Espinosa
4a5373395d
Fix timeline item padding and corners ( #573 )
...
* Try to fix timeline offsets and rounded corners.
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-12 10:42:35 +02:00
Jorge Martin Espinosa
e591a588b3
[Message Actions] Add emoji reactions option ( #568 )
...
* Add logic to send message reactions
* Add emoji library, create EmojiPicker component
* Fix bottom sheet behaviors
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-09 16:56:40 +02:00
Jorge Martin Espinosa
b0386e6235
[Message Actions] Display debug info for events in the timeline ( #555 )
...
* Display debug info for events in the timeline on debug builds.
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-06-09 06:13:22 +00:00
ganfra
70eefe7c42
Clean tests values for file extension
2023-06-08 17:17:13 +02:00