Commit Graph

6701 Commits

Author SHA1 Message Date
hayaksi1 0832b7de23 Merge remote-tracking branch 'upstream/develop' into fix/7397-keep-thread-after-redaction
# Conflicts:
#	features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenterTest.kt
#	features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/factories/TimelineItemsFactoryTest.kt
#	features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/voicemessages/timeline/RedactedVoiceMessageManagerTest.kt
#	libraries/mediaviewer/impl/src/test/kotlin/io/element/android/libraries/mediaviewer/impl/datasource/EventItemFactoryTest.kt
2026-08-27 16:27:18 +03:00
Benoit Marty d3ab1ce43c Merge pull request #7562 from hayaksi1/fix/1548-dm-preview-sender
Drop the sender's name from the room list preview of two-person rooms
2026-08-27 11:19:32 +02:00
Benoit Marty d9c39e8f98 Merge pull request #7480 from bxdxnn/fix/deleted-messages-thread
Fix removed messages hiding its thread on deletion
2026-08-27 10:04:36 +02:00
Benoit Marty 740e3b621b Merge pull request #7344 from hayaksi1/fix/6371-save-file-name-conflicts
Keep saving files to Downloads once 32 files share the same name
2026-08-27 10:01:57 +02:00
Benoit Marty c56001fc98 Merge pull request #7572 from hayaksi1/fix/6730-keep-caption-formatting
Keep the formatting of a caption that is being edited
2026-08-26 16:47:59 +02:00
Benoit Marty dba8f1b276 Merge pull request #7577 from element-hq/feature/bma/explorePushRules
Add a "Push rules" entry in the developer options
2026-08-26 13:54:07 +02:00
Benoit Marty 2fcf806f59 Pretty print the push rules content before displaying it
The raw push rules returned by the SDK are a single long line of json, which is
hard to read on a phone. Re-encode the content with a pretty printer using a two
space indentation before handing it to the file viewer.

Parsing to a JsonElement and re-encoding preserves the order of the keys, so the
rules are still listed in the order the server returned them. Content which
cannot be parsed is passed through unchanged, so that a malformed payload remains
viewable.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-26 12:55:07 +02:00
Benoit Marty 373d2f1eb5 Add a Push rules entry to the developer options
Add a "Push rules" item in the Notifications section of the developer options,
above "Push history". It displays the raw push rules of the account, which were
only available as a rageshake attachment so far.

The content is read using NotificationSettingsService.getRawPushRules(), then
rendered by the new FileViewerEntryPoint, so that the screen looks like the media
viewer rendering a file, with Share and Download actions on a
push_rules<userId>.json file. The user id contains a colon, which is not a valid
file name character on all the file systems, so it is replaced by an underscore.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-26 12:11:16 +02:00
Benoit Marty c9da3ab490 Merge pull request #7520 from element-hq/feature/bma/updateFonts
Update fonts on the headings
2026-08-26 09:51:50 +02:00
hayaksi1 4290a9c3b3 Keep the formatting of a caption that is being edited
Editing the caption of a media message dropped all of its formatting: bold,
links and the rest came back as plain text, and saving wrote that plain text
over the formatted caption.

The composer was being opened on the plain caption. Editing a message body
already starts from its HTML when rich text editing is on, and the caption
path was the only one that did not - it read `captionOrNull()` and never had
the caption's HTML to read, because the timeline content only kept the
already-parsed `formattedCaption`.

Media contents now carry the caption's HTML alongside the parsed one, the
same way text contents carry `htmlBody`, and editing a caption starts from it
when rich text editing is on. The save path already sent the composer's HTML,
so nothing changes there.

Part of #6730
2026-08-25 22:03:14 +03:00
hayaksi1 2278116579 Keep the thread of a message that has been deleted
Deleting a message that headed a thread took the thread with it: the "N
replies" summary under the message disappeared and there was no way back to
the replies, which are still there.

Every branch of the timeline content mapper passes `MsgLikeContent`'s thread
information on except the redacted one, which returned a bare
`RedactedContent` and dropped it. The thread summary lives on
`MsgLikeContent` next to `kind`, so it survives the redaction; only the app
was throwing it away. `RedactedContent` now carries the thread info like the
other contents do, and `EventTimelineItem.threadInfo()` reads it.

A deleted message that still heads a thread is also left out of the "N
removed messages" group, which would otherwise hide the summary again as soon
as three deletions ended up next to each other.

Part of #7397
2026-08-25 21:52:20 +03:00
hayaksi1 65c2cd8a79 Drop the sender's name from the room list preview of two-person rooms
The room list preview prefixes the sender's name unless the room is a
direct message. A room that was created as a group and later converted to
a direct message is not marked as one by the server, so its preview kept
naming the only other person in it on every message, while iOS did not.

The prefix now depends on how many people are actually in the room rather
than on the direct message flag, which is the behaviour asked for in the
issue: no name while only two people can be talking, the name back as
soon as a third joins.

Part of #1548
2026-08-25 20:55:38 +03:00
hayaksi1 1cd27761ad Say so when this session has no secrets to verify another one with
A session whose recovery state is INCOMPLETE has not got the secrets it
would need to sign another device, so accepting an incoming verification
request from it can only fail. The screen offered "Start verification"
anyway, and the user learnt otherwise at the end of the flow.

Show the design's alert step instead — "Verification with this device is
currently unavailable" — with only the Ignore action, and leave the
request unacknowledged in every other respect.

Part of #5344.
2026-08-25 16:44:08 +03:00
hayaksi1 e09d6e0a22 Name a sender the timeline has no profile for from the room member list
The timeline renders a message with the sender's raw Matrix ID whenever the
SDK has no profile for them, even though the room member list the same screen
already holds usually knows their display name and avatar.

The timeline item factory now falls back to the room member for a sender whose
profile is not resolved, both when the item is first built and when the member
list arrives afterwards, so the name and the avatar settle on the display name
instead of staying on the ID.
2026-08-25 15:22:32 +03:00
hayaksi1 bc32cf1d4a Let the user give a reason when removing a message
The protocol carries a reason on a redaction and other clients let the sender
give one, but removing a message here sent the redaction straight away with no
reason and no confirmation.

Removing a message now opens a dialog with an optional reason, and the
redaction is only sent once it is confirmed. A blank reason is sent as none, so
confirming without typing anything behaves exactly as before. A message which
was never sent has nobody to give a reason to, so the send failure dialog's
Remove still redacts it immediately.
2026-08-25 14:52:05 +03:00
Benoit Marty af7e765599 Fixing compilation issue after merging develop 2026-08-25 13:32:11 +02:00
Benoit Marty 4b4ceebdb1 Merge branch 'develop' into fix/1270-verification-request-timeout 2026-08-25 13:30:57 +02:00
hayaksi1 88b3559c6b Rank the mention suggestions by how well they match what was typed
The member suggestions were emitted in whatever order the room member list
happened to be in, so a member who only matches somewhere in the middle of
their name could be offered above one whose name starts with the query.

Matches are now ordered by how well they match: display name prefix first,
then user ID localpart prefix, then any other match. The sort is stable, so
members of equal rank keep the order the member list gave them.

The @room suggestion was also matched case sensitively, so typing @Ro or
@ROOM dropped it while @ro kept it. It now matches the query the same way
the members do.
2026-08-25 14:30:09 +03:00
Benoit Marty 872319c8ea Merge pull request #7521 from element-hq/fix/account-provider-supporting-text-clipped
Make the account provider screen scrollable so its description is not clipped by the keyboard
2026-08-25 13:29:23 +02:00
Benoit Marty 0634cadc9c Ensure translation of "Chats" does not render in big font when displayed on 2 lines. They can add the end be displayed on one line using the small font. 2026-08-25 11:54:15 +02:00
Benoit Marty 0a9a25d940 Update Konsist test and fix existing issue. 2026-08-25 11:21:10 +02:00
Benoit Marty d7310b6941 Split code into several files. 2026-08-25 10:55:38 +02:00
Benoit Marty 217ccb75ed BatteryOptimizationEvents -> BatteryOptimizationEvent 2026-08-25 10:32:34 +02:00
Benoit Marty cb8c462bad FullScreenIntentPermissionsEvents -> FullScreenIntentPermissionsEvent 2026-08-25 10:31:51 +02:00
Benoit Marty 2b55ff097f ViewFileEvents -> ViewFileEvent 2026-08-25 10:31:09 +02:00
Benoit Marty 328d2d1260 OutgoingVerificationViewEvents -> OutgoingVerificationViewEvent 2026-08-25 10:30:19 +02:00
Benoit Marty 2dda3b807d IncomingVerificationViewEvents -> IncomingVerificationViewEvent 2026-08-25 10:29:30 +02:00
Benoit Marty 650f20d6ba UserProfileEvents -> UserProfileEvent 2026-08-25 10:28:49 +02:00
Benoit Marty 51a4704854 UserListEvents -> UserListEvent 2026-08-25 10:28:07 +02:00
Benoit Marty cf7d5ab4b4 StartChatEvents -> StartChatEvent 2026-08-25 10:27:26 +02:00
Benoit Marty 771840884a SpaceSettingsEvents -> SpaceSettingsEvent 2026-08-25 10:26:43 +02:00
Benoit Marty d07eba9a20 SpaceEvents -> SpaceEvent 2026-08-25 10:26:02 +02:00
Benoit Marty 15cdd85357 LeaveSpaceEvents -> LeaveSpaceEvent 2026-08-25 10:25:19 +02:00
Benoit Marty a2c3ddab02 SignedOutEvents -> SignedOutEvent 2026-08-25 10:24:37 +02:00
Benoit Marty 739fc452dd ShareEvents -> ShareEvent 2026-08-25 10:23:51 +02:00
Benoit Marty deb08a3a6c EditRoomAddressEvents -> EditRoomAddressEvent 2026-08-25 10:23:12 +02:00
Benoit Marty 47f4e136dd Use fontHeadingMdBold for empty space title. 2026-08-25 10:22:31 +02:00
Benoit Marty b8b6dc1df6 SecureBackupSetupEvents -> SecureBackupSetupEvent 2026-08-25 10:22:22 +02:00
Benoit Marty 28c19e38ce SecureBackupRootEvents -> SecureBackupRootEvent 2026-08-25 10:21:36 +02:00
Benoit Marty 2d611475da SecureBackupEnterRecoveryKeyEvents -> SecureBackupEnterRecoveryKeyEvent 2026-08-25 10:20:48 +02:00
Benoit Marty c8c579ed7e SecureBackupDisableEvents -> SecureBackupDisableEvent 2026-08-25 10:19:58 +02:00
Benoit Marty 4981a04519 InternalRoomMemberModerationEvents -> InternalRoomMemberModerationEvent 2026-08-25 10:19:06 +02:00
Benoit Marty 17213ac93e RoomMemberModerationEvents -> RoomMemberModerationEvent 2026-08-25 10:18:21 +02:00
Benoit Marty 4e9ec1b631 RoomDirectoryEvents -> RoomDirectoryEvent 2026-08-25 10:17:21 +02:00
Benoit Marty 15569ef3e8 RoomAliasResolverEvents -> RoomAliasResolverEvent 2026-08-25 10:16:32 +02:00
Benoit Marty 4e2d99c968 RolesAndPermissionsEvents -> RolesAndPermissionsEvent 2026-08-25 10:15:35 +02:00
Benoit Marty fc8d3b3065 ReportRoomEvents -> ReportRoomEvent 2026-08-25 10:14:32 +02:00
Benoit Marty 859b0e1b60 BugReportEvents -> BugReportEvent 2026-08-25 10:13:33 +02:00
Benoit Marty 5d8ca663df EditDefaultNotificationSettingStateEvents -> EditDefaultNotificationSettingStateEvent 2026-08-25 10:12:06 +02:00
Benoit Marty 8a02b50c98 NotificationSettingsEvents -> NotificationSettingsEvent 2026-08-25 10:11:07 +02:00