Commit Graph

2122 Commits

Author SHA1 Message Date
Jenna Vassar 5a2977134b Gate out-of-window jump-to-unread on genuinely unread displayable content
The jump-to-unread FAB could surface an OutOfWindow target when the
fully-read marker event was either loaded-but-not-displayed (state/filtered
events) or when there was nothing displayable to jump to. Add two guards to
the recompute:

- Require roomInfo.numUnreadMessages > 0, so the FAB only appears when there
  is genuinely unread "interesting" content (never state/hidden events).
- Add Timeline.isEventLoaded to distinguish "in the loaded window but not
  rendered" from "genuinely outside the window", falling back to the SDK only
  after the cheap display-index check (isKnown) misses.

The RustTimeline implementation reads the replay cache first and releases the
EventTimelineItem native handle via use {} when probing the SDK. Adds presenter
tests for the loaded-but-not-displayed and no-unread-messages branches.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 18:05:22 -07:00
Benoit Marty ea94996db7 Set LaunchedEffect key on identifier list. 2026-06-09 09:27:05 +02:00
Benoit Marty bb36787371 Merge branch 'develop' into feature/bma/scroll-to-unread-messages 2026-06-08 17:30:11 +02:00
Jenna Vassar a201b3766e Fix jump-to-unread requiring two taps for an out-of-window read marker (#6943)
* Fix jump-to-unread requiring two taps for an out-of-window read marker

* Update features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt

Co-authored-by: Benoit Marty <benoitm@element.io>

---------

Co-authored-by: Benoit Marty <benoitm@element.io>
2026-06-08 15:52:24 +02:00
ElementBot 5a4c0b5d58 Sync Strings from Localazy (#6986)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-06-08 14:33:40 +02:00
bxdxnn 6219378ad3 Fix "Sent" checkmark disappearing when the message is read and "Share presence" is disabled (#6985)
* Don't compute read receipts if presence sharing is disabled

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-06-08 13:21:34 +02:00
Benoit Marty 4749ec3112 Replace "Edit" button with Crop icon. 2026-06-04 16:13:30 +02:00
Jorge Martin Espinosa a91e1fa2ae Make Vulkan a *not required* feature (#6961)
* Make Vulkan a *not required* feature

* Add `DeviceHasVulkanSupport` helper to check this on runtime

* When trying to open a screen with a map in it, check if vulkan is supported and display a new error dialog in that case

* Fix random lint issue

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-06-04 13:08:19 +00:00
Jorge Martin Espinosa 2ab780576a Remove the FloatingDateBadge feature flag (#6950)
* Remove the `FloatingDateBadge` feature. This is now always enabled.

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-06-03 16:34:06 +02:00
Benoit Marty a9ecf3c5dc Add flip actions to image edition 2026-06-03 11:03:56 +02:00
Benoit Marty 7722107001 Merge pull request #6694 from jennaharris7/feature/scroll-to-unread-messages
Timeline: jump-to-unread FAB and mark-as-read shortcut
2026-06-02 16:39:01 +02:00
Benoit Marty a095190902 Merge pull request #6924 from element-hq/feature/bma/fixImageEdition
Fix image resizing behavior.
2026-06-01 22:40:01 +02:00
Benoit Marty b68c78526f Use secondary color (default) for leading icons.
Fixes #6910
2026-06-01 15:49:53 +02:00
Benoit Marty f52fc9c1c2 Fix image resizing behavior. 2026-06-01 14:41:26 +02:00
ElementBot 81ed41d580 Sync Strings (#6921)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-06-01 09:52:14 +02:00
bxdxnn 8c29a7b55c Merge pull request #6889 from bxdxnn/fix/read-receipt-calls
Fix read receipts not shown for calls
2026-05-29 17:46:35 +02:00
bxdxnn e0cda170a9 Do not hide own media (#6898) 2026-05-29 09:18:12 +02:00
Jenna Vassar 40f8b48256 Reuse UnreadAtom composable 2026-05-28 09:06:01 -07:00
Jorge Martín bf1462f9b1 WIP 2026-05-28 09:54:00 +02:00
Jorge Martin Espinosa 1e67c2f77b Move empty day separator filtering to a timeline post-processor (#6866)
* Move empty day separator filtering to a timeline post-processor

* Split `FilterPublicMembershipChangesPostProcessor` from `RoomBeginningPostProcessor`
2026-05-26 08:28:32 +00:00
Jorge Martin Espinosa 0e2213a199 Fix public read receipts being sent by mistake (#6838)
When returning to the chat screen from the room details one or a member's profile, `TimelineEvent.OnScrollFinished` will be called immediately, and this would read the default value for `isSendPublicReadReceiptsEnabled`, which is `true`.

If you had public read receipts disabled, this is a mistake, and would send a public read receipt. Instead, what we want to do is wait until the updated value is emitted and use it to decide whether we want to send a public or private read receipt.
2026-05-26 10:10:42 +02:00
Benoit Marty 1f3d848c79 Image edition before sending: crop and rotate. (#6842)
* Add crop and rotate editing before sending images (#6363)

* feat(messages): add crop and rotate before image upload

* Update screenshots

* chore: trigger CI after screenshot update

* fix: resolve detekt violations in image editor and media viewer modules

* fix: require explicit edits param, use plurals for rotation a11y, remove redundant @Inject

* fix: require explicit edits param, use plurals for rotation a11y, remove redundant @Inject

* fix: use semantically correct RotateRight icon for image rotation action

* Update screenshots

* chore: trigger CI after screenshot update

---------

Co-authored-by: ElementBot <android@element.io>
Co-authored-by: Benoit Marty <benoitm@element.io>

* Update design and UX

Update and add tests
Improve preview

* Update screenshots

* For quality issue and improve preview

* Update screenshots

* Remove default value of data class.

* Rename file.

* Fix tests.

* Allow detecting touch events outside the image by applying the drag detection to the parent node and offsetting the touch events

* Improve touch detection.

* Update screenshots

* Remove useless line.

---------

Co-authored-by: Gianluca Iavicoli <gianluca.iavicoli04@gmail.com>
Co-authored-by: ElementBot <android@element.io>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-05-26 10:07:05 +02:00
ElementBot 0aaa80cbdc Sync Strings from Localazy (#6856)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-05-26 08:05:07 +00:00
Benoit Marty 6cef5cec1b Remove useless line. 2026-05-26 09:22:43 +02:00
Benoit Marty 8a4ff4c456 Improve touch detection. 2026-05-25 21:16:12 +02:00
bxdxnn b31dad4b26 Do not show membership/profile events in public rooms (#6360)
* Filter some membership/profile/topic events in public rooms: don't display join and leave membership events in publicly joinable rooms, and hide display name and avatar url changes in non encrypted and publicly joinable rooms.

* Add empty day post-processing to the timeline based on bxdxnn's code, tweaked.

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
2026-05-25 10:31:53 +02:00
Jorge Martín 6e74446209 Allow detecting touch events outside the image by applying the drag detection to the parent node and offsetting the touch events 2026-05-22 16:57:00 +02:00
Benoit Marty afa2a824b5 Fix tests. 2026-05-22 15:28:48 +02:00
Benoit Marty 94c3bb9c41 Rename file. 2026-05-22 13:59:21 +02:00
Benoit Marty fe6a17e977 Remove default value of data class. 2026-05-22 13:56:50 +02:00
Benoit Marty a158da1d18 For quality issue and improve preview 2026-05-22 12:13:09 +02:00
Benoit Marty bb2779549e Update design and UX
Update and add tests
Improve preview
2026-05-22 10:29:36 +02:00
Jenna Vassar d653ceb84c Merge remote-tracking branch 'upstream/develop' into feature/scroll-to-unread-messages
Resolved conflicts:
- libraries/matrix/impl/.../fakes/FakeFfiSpaceRoomList.kt: took upstream's
  direct return for rooms() — the simulateLongTask wrapper is for IO-style
  operations like paginate/reset, not a quick read.
- libraries/ui-strings/src/main/res/values/temporary.xml: kept the file with
  only the live strings (action_mark_as_read, a11y_jump_to_unread_messages).
  Dropped common_black (upstream moved theme strings to module-local R.string)
  and a11y_jump_to_unread_messages_count (badge count was removed earlier).
- RoomInfo.kt and its fixtures/tests: took upstream's version since both
  branches independently added fullyReadEventId via the same SDK bump
  (matrix-rust-components-kotlin 26.05.20).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 11:26:14 -07:00
Jenna Vassar 0399dab1da Dismiss mark as unread button eagerly 2026-05-21 08:48:38 -07:00
Jenna Vassar bdb42759de Show jump-to-unread when read marker is outside the loaded window
When the m.fully_read marker event is older than the loaded timeline
window, no virtual ReadMarker item is inserted and the chevron-up FAB
silently no-ops. Surfaces the SDK's new fully_read_event_id on RoomInfo
and routes the tap through the existing FocusOnEvent flow so the FAB
appears in catch-up scenarios and lands the user on the marker.

Bumps matrix-rust-components-kotlin to 26.05.20 to pick up the FFI
field; absorbs the ClientBuildException.InvalidRawKey and suspend
SpaceRoomList.rooms / subscribeToRoomUpdate API breaks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 07:11:53 -07:00
Gianluca Iavicoli bcad1f9dce Add crop and rotate editing before sending images (#6363)
* feat(messages): add crop and rotate before image upload

* Update screenshots

* chore: trigger CI after screenshot update

* fix: resolve detekt violations in image editor and media viewer modules

* fix: require explicit edits param, use plurals for rotation a11y, remove redundant @Inject

* fix: require explicit edits param, use plurals for rotation a11y, remove redundant @Inject

* fix: use semantically correct RotateRight icon for image rotation action

* Update screenshots

* chore: trigger CI after screenshot update

---------

Co-authored-by: ElementBot <android@element.io>
Co-authored-by: Benoit Marty <benoitm@element.io>
2026-05-21 15:18:40 +02:00
renovate[bot] eed183be53 Update metro to v1.1.1 (#6832)
* Update metro to v1.1.1

* Fix `@ContributesBinding` usage with `@AssistedInject` in `DefaultVideoMetadataExtractor`

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-05-21 10:10:13 +02:00
Benoit Marty c3a4d64ec6 Merge pull request #6827 from element-hq/feature/bma/a11y/roomNameHeading
[a11y] Improve accessibility of screen headers.
2026-05-21 09:00:33 +02:00
cizra a33d717aa0 Don't compress images sent through the Files attachment picker (#6755)
* Don't compress images sent through the Files attachment picker

Images and videos picked through the "Attachment" picker are now
uploaded without re-encoding, regardless of the "Optimize media quality"
setting. The gallery and camera pickers keep the existing behaviour,
matching what Element Web/Desktop and most other messengers do.

Fixes #6365

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Make sure we select the right video preset for sending as file

Wait for the video size estimations to be calculated before preprocessing the video file

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-05-20 17:19:08 +02:00
Benoit Marty 620f1865e8 [a11y] Improve accessibility of screen headers. 2026-05-20 15:39:11 +02:00
Jorge Martin Espinosa 64d9336901 Fix 'Conversation label cannot be empty' error (#6823)
This happens when building a `ShortcutInfoCompat` in `DefaultNotificationConversationService.onSendMessage` when the provided room name is not null but it's empty.
2026-05-20 14:26:44 +02:00
bmarty dcc67f9fc6 Sync Strings from Localazy 2026-05-18 00:57:56 +00:00
Benoit Marty bad934d329 Do not close the MediaPlayer when navigating back from a thread. (#6771) 2026-05-12 17:00:48 +02:00
Valere Fedronic 9ca0b9e898 Merge pull request #6649 from element-hq/feature/valere/call/decline_timeline_rendering
feat: Update call started timeline item + declined support
2026-05-12 16:32:51 +02:00
Jenna Vassar 257040f5ca Merge remote-tracking branch 'upstream/develop' into feature/scroll-to-unread-messages
# Conflicts:
#	features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt
#	features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt
#	features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenterTest.kt
2026-05-12 06:57:52 -07:00
Benoit Marty d299b722e3 Format code. 2026-05-12 15:50:47 +02:00
Benoit Marty c30fee7f14 Do not close the MediaPlayer when navigating back from a thread. 2026-05-12 15:21:20 +02:00
Jenna Vassar 8d8ac9373e Rename preview to reflect actual state 2026-05-11 12:27:00 -07:00
Jenna Vassar 65ed527384 Add comment to explain jump to bottom button containing box 2026-05-11 12:26:59 -07:00
Jenna Vassar e0046e9862 Return null instead of return@launch
Co-authored-by: Benoit Marty <benoit.marty@gmail.com>
2026-05-11 11:27:31 -07:00