194 Commits

Author SHA1 Message Date
Benoit Marty
73a062451c Remove UnknownMessageType, should be handled by OtherMessageType now. 2023-11-23 20:18:53 +01:00
Jorge Martin Espinosa
f55d347387 Add plain text representation of messages (#1850)
* Add plain text representation of messages.

This is used in the room list as the last message in a room, in the message summary when a message is selected, in the 'replying to' block, in the 'replied to' block in a message in the timeline, and in notifications.
2023-11-23 08:29:20 +01:00
Benoit Marty
6874df8875 Fix test after wording change. 2023-11-08 11:44:34 +01:00
Benoit Marty
a284f5cb03 UTD: Change wording from "Decryption error" to "Waiting for this message" 2023-11-07 17:52:06 +01:00
Marco Romano
d05dd11485 Split VoiceMessageType from AudioMessageType (#1664)
Currently, for compatibility reasons, we implement MSC3245v1 which puts the voice data inside an audio message type. Though at times it seems impractical to deal with a single message type which effectively represents 2 different kinds of messages.

This PR creates a new message type called `VoiceMessageType` which is used whenever we receive an event with `"msgtype": "m.audio"` which also has the `"org.matrix.msc3245.voice": {}` field. This makes it easier to process voice messages as different entities throughout the rest of the codebase.
2023-10-27 16:02:16 +02:00
Marco Romano
d7ce326612 Show correct UI when replying to a voice message (#1658)
Shows voice messages in the room summary.
Shows voice messages in the reply context menu and composer.
Show replies to voice messages in the timeline. 

(before this PR voice messages were shown the same as audio messages)

Story: https://github.com/vector-im/element-meta/issues/2106
2023-10-27 11:30:57 +02:00
ganfra
b8ce848a0c PIN : fix quality 2023-10-26 15:25:40 +02:00
renovate[bot]
7c5fab732b Update dependency org.matrix.rustcomponents:sdk-android to v0.1.63 (#1619)
* Update dependency org.matrix.rustcomponents:sdk-android to v0.1.63

* Update Element Call integrated APIs

* Take into account the new `MessageType.Other` from the SDK

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2023-10-20 22:32:59 +02:00
Marco Romano
80870adfe3 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
Benoit Marty
7afae87b3e Konsist: add rule obout test class name, and fix existing issue 2023-10-12 15:03:50 +02:00
Benoit Marty
ed7534aea7 Fix test, and distinguish failure message. 2023-10-11 16:55:48 +02:00
Benoit Marty
2e8be3a3d1 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
266612f9da MessageContent.type cannot be null 2023-10-11 16:14:15 +02:00
Benoit Marty
a885989172 Emotes starts with * 2023-10-05 10:47:00 +02:00
Marco Romano
837443c690 Properly format lastMessage when it belongs to a poll. (#1387)
Takes care of properly formatting a room's last message when it belongs to a poll.

NB: Polls still aren't exposed as a room's `last_message` from the rust SDK, so this code won't actually run yet. This will happen after integrating rust SDK version 0.1.57 which includes: https://github.com/matrix-org/matrix-rust-sdk/pull/2580
2023-09-21 15:20:15 +02:00
jonnyandrew
d291622eea [Rich text editor] Add link functionality to rich text editor (#1309)
* Add link functionality to rich text editor
* Add 'list dialog' component compound design library
* Add 'text field list item' component to compound design library
2023-09-19 11:20:07 +00:00
Benoit Marty
d3d9367feb Localazy sync 2023-09-18 16:42:35 +02:00
bmarty
6e5e538724 Sync Strings from Localazy 2023-09-18 00:09:19 +00:00
ganfra
b60b481ee0 Merge branch 'develop' into feature/fga/timeline_thread_decoration 2023-09-14 16:57:20 +02:00
ganfra
455d39c629 Sync Strings from Localazy 2023-09-14 14:38:49 +00:00
ganfra
7021fc0fe5 Thread decoration : fix test compilation 2023-09-13 14:13:51 +02:00
Florian Renaud
8e40224bf1 Do not handle poll end event 2023-08-22 10:55:18 +02:00
Florian Renaud
f2d1658ffa "View only" polls in the timeline (#1031)
* Handle poll events from the sdk

* Render started poll event in the timeline

* Create poll module

* Check poll kind before revealing the results

* Check if user has voted before revealing the results

* Add active poll previews

* Minor cleanup

* Update todos

* Fix CI

* Remove hardcoded string

* Update preview

* changelog file

* Update screenshots

* Use CommonPlurals

* Set poll root view as selectableGroup

* Improve poll result rendering

* Update screenshots

* Add missing showkase processor

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-08-16 14:19:12 +00:00
ElementBot
5ecafeb49f Sync Strings from Localazy (#1032)
Co-authored-by: Florian14 <Florian14@users.noreply.github.com>
2023-08-11 14:34:05 +00:00
Benoit Marty
79e88bb826 Fix another warning. 2023-07-12 14:16:10 +02:00
Chris Smith
a00e6fbb33 Introduce MatrixClient.isMe for checking sessionID 2023-07-07 12:03:43 +01:00
Chris Smith
77470b9a97 Show descriptions for locations.
Descriptions show in the same message bubble above the map in
the timeline, and in a bar at the top of the expanded map view.
2023-07-05 15:18:36 +01:00
bmarty
bd3dd76039 Sync Strings from Localazy 2023-07-03 00:11:17 +00:00
Chris Smith
fe322d072e Show location events in timeline
Not in scope: interacting with the timeline items,
reply formatting. These will be implemented separately.

Closes #689
2023-06-29 16:37:15 +01: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
bmarty
9c5c578c67 Sync Strings from Localazy 2023-06-26 00:10:53 +00: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
19e090f6dc Always use import io.element.android.libraries.ui.strings.R as StringR 2023-06-09 18:19:00 +02:00
github-actions[bot]
03c28ac52d Sync Strings (#522)
Sync Strings from Localazy
2023-06-05 15:26:50 +00:00
Benoit Marty
1a2e05608a Merge pull request #471 from vector-im/sync-localazy
Sync Strings
2023-05-30 13:06:51 +02:00
bmarty
3daea29a82 Sync Strings from Localazy 2023-05-29 00:09:47 +00:00
ganfra
1ce0324570 Merge branch 'develop' into feature/fga/image_loading 2023-05-26 11:39:34 +02:00
Benoit Marty
d702d3d265 Fix test compilation 2023-05-25 14:17:09 +02:00
Benoit Marty
be478cadaa Extract to sub classes 2023-05-25 14:16:23 +02:00
Benoit Marty
bbe4b7d26a Process state event in timeline - WIP 2023-05-25 14:16:23 +02:00
Benoit Marty
69ae145467 Rename processMessageItem to simple format 2023-05-25 14:16:23 +02:00
Benoit Marty
ac636d9737 Inject StringProvider instead of context. 2023-05-25 14:16:23 +02:00
Benoit Marty
70df081840 Move RoomLastMessageFormatter and related class and resource to the new module eventformatter, in order to prepare rendering of state event in the timeline. 2023-05-25 14:15:35 +02:00