Commit Graph

785 Commits

Author SHA1 Message Date
Jorge Martin Espinosa 46f78ef700 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
Marco Romano a814c4a95a TimelineItemPresenterFactories (#1609)
DI infrastructure to allow injection of presenters into the timeline.
Add an `@AssistedFactory` of type `TimelineItemPresenterFactory` to a `Presenter` class and bind this factory into the TimelineItemPresenterFactory map multi binding using:

```
@Binds
@IntoMap
@TimelineItemEventContentKey(MyTimelineItemContent::class)
```

A map multibinding of such factories will be available in the `LocalTimelineItemPresenterFactories` composition local for further use down the UI tree.
2023-10-19 15:57:34 +02:00
Marco Romano 5a7f77bc92 Extract more content from audio messages. (#1607)
`TimelineItemAudioContent`:
- Use `java.time.Duration` instead of milliseconds. This will ease up things in the future because currently milliseconds are sent over the wire but in the future seconds will be sent (as per the stable MSC). Using `Duration` will allow our downstream code to be independent of what's passed over the wire.
- Rename `audioSource` property to `mediaSource` to better match its type.

`AudioMessageType`:
- Add and populate new fields `details` and `isVoiceMessage` to be used by voice messages.
2023-10-19 13:32:43 +02:00
Jorge Martin Espinosa 9aa4c59516 Hide keyboard when exiting the room screen (#1593) 2023-10-19 10:49:11 +02:00
bmarty 586a53653d Sync Strings from Localazy 2023-10-16 00:09:47 +00:00
Benoit Marty fee54efb4f Merge pull request #1556 from vector-im/feature/bma/videoLock
Ensure screen does not turn off when playing a video (#1519)
2023-10-13 14:05:30 +02:00
Benoit Marty 3be6e655d7 Fix issue detected by Konsist. 2023-10-12 18:46:14 +02:00
jonnyandrew 12404fab78 [Voice messages] Add voice recording UI (#1546)
---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-10-12 15:17:18 +00:00
Benoit Marty c3bc44bfec Ensure screen does not turn off when playing a video (#1519) 2023-10-12 15:53:05 +02:00
Benoit Marty 7d985d4588 Merge pull request #1549 from vector-im/feature/bma/unknownMsgtype
Render unknown msgtype
2023-10-12 10:56:35 +02:00
Benoit Marty 6a2881416f Merge pull request #1526 from vector-im/feature/bma/konsist
Konsist
2023-10-11 16:40:22 +02:00
Benoit Marty bcefbb9861 Render body for m.room.message if msgtype is unknown, in timeline and as room list last message. #1539 2023-10-11 16:18:24 +02:00
Benoit Marty 8c2a5f281b MessageContent.type cannot be null 2023-10-11 16:14:15 +02:00
Benoit Marty 97fea4e6dd data object 2023-10-10 17:31:04 +02:00
Benoit Marty 0bc2020411 Konsist: add test Function which creates Presenter in test MUST be named 'createPresenterName', and fix existing issues 2023-10-10 17:31:04 +02:00
Benoit Marty 8929a90970 Konsist: add test to ensure filename match top level Composable View, and fix existing issue 2023-10-10 15:39:22 +02:00
Benoit Marty 632389daa9 Remove not used dependencies to some accompanist libraries. 2023-10-10 13:48:10 +02:00
Benoit Marty 35b7b661f2 Code review: improve API. 2023-10-05 15:28:38 +02:00
Benoit Marty 8f660facbf Render emote in the timeline: prefix with sender display name 2023-10-05 11:39:05 +02:00
Benoit Marty 46d5417dd3 avoid else in when statement. 2023-10-05 11:15:26 +02:00
renovate[bot] 1e24e39b2e Update dependency androidx.compose.material3:material3 to v1.2.0-alpha09 (#1493)
* Update dependency androidx.compose.material3:material3 to v1.2.0-alpha09

* Fix deprecation issues

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2023-10-05 09:57:47 +02:00
Benoit Marty 34d05e01eb Fetch edited event in advanced (similar to reply mode). 2023-10-04 17:38:17 +02:00
Benoit Marty bed135f7c3 Add comment. 2023-10-04 17:25:55 +02:00
Benoit Marty de39179b9d Merge pull request #1465 from vector-im/feature/bma/codeCoverage
Improve code coverage
2023-10-02 10:18:31 +02:00
bmarty 7e3b9d8d3b Sync Strings from Localazy 2023-10-02 00:09:47 +00:00
jonnyandrew 6bca8be525 Fix composer options bottom sheet position (#1469) 2023-09-29 16:29:57 +00:00
Benoit Marty 0ba9d77189 Ensure the preview match the behavior (and improve code coverage) 2023-09-29 16:18:12 +02:00
jonnyandrew 53cf82f025 [Rich text editor] Add full screen mode (#1447)
- Add full screen mode for the rich text editor (RTE). When text formatting options are enabled, the editor can be dragged to full screen.
- Remove `ConstraintLayout` from `textcomposer` module, now made much simpler now the RTE supports being called in multiple layouts matrix-org/matrix-rich-text-editor#822

- Part of vector-im/element-meta#1973
- Includes design from #1315
- Fixes #1293 (through new layout)
- Fixes #1394 (through inclusion of matrix-org/matrix-rich-text-editor#824)
- Fixes #1259 (through inclusion of matrix-org/matrix-rich-text-editor#820)

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-09-29 09:11:18 +00:00
Benoit Marty 2eed49f041 Use generic action_remove 2023-09-29 09:02:10 +02:00
Benoit Marty 928a60672c Use the AutoMirrored version. 2023-09-28 14:21:27 +02:00
Benoit Marty c9c7af6e06 Simplify the management of inReplyToEventTimelineItem 2023-09-27 11:31:12 +02:00
Benoit Marty a192a8823f Ensure getEventTimelineItemByEventId is called when we enter in reply mode. 2023-09-27 10:48:31 +02:00
Benoit Marty 8e24d5991c Merge pull request #1436 from vector-im/feature/bma/mutableIntFloat
Mutable int float
2023-09-26 18:31:36 +02:00
Benoit Marty f607b557ff Merge pull request #1432 from vector-im/feature/bma/installApk
Install apk from the app - REQUEST_INSTALL_PACKAGES
2023-09-26 18:15:35 +02:00
Benoit Marty 702c137ead Replace mutableStateOf by mutableIntStateOf and mutableFloatStateOf. Use intValue and floatValue to avoid unboxing. 2023-09-26 18:07:53 +02:00
Benoit Marty 3eb112381d Call openFile instead of open and avoid unwrapping the Activity context. 2023-09-26 17:48:26 +02:00
Benoit Marty bf49078e40 Detekt: fix OptionalUnit issue. 2023-09-26 17:48:26 +02:00
Benoit Marty 3f73443ebb Be able to install APK from Element X. 2023-09-26 17:48:26 +02:00
Benoit Marty e7ba973e7b Improve default mime type. 2023-09-26 17:48:26 +02:00
Marco Romano 2e6581a5ad Show poll creator view in timeline (#1429)
- Shows edit/end poll buttons when the user is the creator of the poll.
- Only the end poll button is wired right now as there is no "edit poll" screen yet.
2023-09-26 11:19:24 +02:00
Benoit Marty d8fbf216f1 Merge pull request #1419 from vector-im/sync-localazy
Sync Strings
2023-09-26 10:05:46 +02:00
Marco Romano 7464cbb769 Use eventSink method reference in TimelinePresenter.kt (#1428)
Has been changed in https://github.com/vector-im/element-x-android/pull/1172 but in general method references should always be preferred to lambdas in composable functions (because they have higher stability guarantees).
2023-09-25 21:56:41 +02:00
Marco Romano f4b46aa2bb Push TimelineEvents further down the UI tree. (#1424)
So that timeline items don't have to route their callback all the way down to TimelinePresenter.
2023-09-25 15:31:10 +00:00
bmarty c72bb92ef2 Sync Strings from Localazy 2023-09-25 00:09:17 +00:00
Benoit Marty 03eacdc454 Add animation on the timeline content, to avoid glitch (#1323) 2023-09-21 18:43:46 +02:00
bmarty a7ce12d91d Sync Strings from Localazy 2023-09-21 15:51:21 +00:00
Benoit Marty 0255ec6771 Merge pull request #1400 from vector-im/feature/bma/fixCrashPhoto
Fix crash when user wants to use the camera
2023-09-21 16:31:36 +02:00
Benoit Marty 56a57de3e1 Suppress LargeClass on test. 2023-09-21 16:31:08 +02:00
Benoit Marty 5a8f2c5efa Add missing test on this Presenter 2023-09-21 15:54:59 +02:00
Benoit Marty 658c59d489 Add missing test on this Presenter 2023-09-21 15:40:27 +02:00