Commit Graph

4962 Commits

Author SHA1 Message Date
Element CI 6bee9ddf8d Prepare next release 2026-10-26 02:16:25 -07:00
Stefan Ceriu 27cdd980dc Fix the app badge not resetting when the unread count is unchanged
The notification extension increments the app badge for every
notification it delivers, without the app knowing about it. The app
used to correct this drift by setting the badge from the room list on
every update, but since #6337 the NotificationService only publishes
the badge count when it changes.

Publish the badge count on every room list update again so the
NotificationManager always resets the app badge.
2026-10-26 10:00:39 +01:00
ElementRobot 5c9e97a163 Translations update (#6408)
Co-authored-by: Element CI <ci@element.io>
2026-10-26 08:51:37 +00:00
Element CI 2f9bac8008 Prepare next release 2026-10-23 09:16:01 -07:00
Mauro Romito a11c16b602 Bump the RustSDK to v26.10.24
Brings in a fix for rooms that kept back-paginating in the background
while looking for their latest event, which started with 26.10.20.
The SDK mocks are regenerated for the new optional request config
parameter on the raw send methods.

matrix-rust-sdk: 8de215a0aa0026afa5754ae5f05a6d168d1a1d60
2026-10-23 18:02:16 +02:00
Mauro 7a87b5f04c Fix a crash when opening the camera while it's unavailable. (#6388)
* Fix a crash when opening the camera while it's unavailable.

The app set the image picker's source to the camera without checking it
could be used. iOS throws when it can't: when Screen Time or a device
management profile blocks the camera, or while it's already in use.

Check AppMediator.isCameraAvailable when Camera or Take photo is tapped in
the room and thread composers, profile editing, room editing and room
creation. If it's unavailable, show a toast instead of opening the picker.

Also handle Cancel in the camera picker so the sheet closes through the
coordinator, like the photo library and document pickers.

Sentry: ELEMENT-X-IOS-SP

* Update the Enterprise submodule.

Picks up the create room hook test fix that passes the new appMediator argument.

* Use the Localazy string for the camera unavailable toast.

The copy is now in Localazy as error_camera_unavailable ("The camera is
not available"), so it replaces the untranslated string.

* Order appMediator consistently with CommonFlowParameters.

Move appMediator before analytics and userIndicatorController in the create room, room details edit and user details edit screens, their call sites and tests.

Co-authored-by: Velin92 <34335419+Velin92@users.noreply.github.com>

* Update the Enterprise submodule.

Picks up the create room hook test passing appMediator before analytics, to
match the new init order.

* Update the Enterprise submodule.

Points at Enterprise main now that element-ios-enterprise#42 is merged.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-10-23 17:22:22 +02:00
Stefan Ceriu 1698dc8872 Fix search tab search field layout on iPadOS 18 2026-10-23 18:19:13 +03:00
Stefan Ceriu d226396bb2 Upload dSYMs files both to the app Sentry project as well as the SDK one. 2026-10-23 11:25:48 +03:00
renovate[bot] 27649153f2 Update zizmorcore/zizmor-action action to v0.7.1 2026-10-23 09:29:54 +02:00
rene.schakmann dab9462d04 Make MessageTextView its own layout manager delegate
Replaces the shared CodeHyphenationLayoutManagerDelegate with an
NSLayoutManagerDelegate conformance on MessageTextView, as it's already
the delegate for its gesture recognizers and pills. The layout manager
only holds its delegate weakly and the text view owns the layout manager,
so no shared instance or stored property is needed.

The code block test now uses a <pre> without a nested <code>, so it
actually covers the CodeBlock check rather than passing through the
InlineCode one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:21:36 +02:00
rene.schakmann 21dd4082f4 Stop hyphenating code when it wraps in the timeline
When a word in inline code (or a code block) is too long for the line,
TextKit breaks it with an inserted hyphen, so commit hashes, UUIDs and
identifiers render with characters that aren't part of the code.

Disabling hyphenation through the paragraph style has no effect on this
fallback, so MessageText now sets an NSLayoutManagerDelegate that refuses
to hyphenate before any character marked as code. Code wraps by character
instead while regular message text keeps its existing behaviour.

The delegate is a shared instance rather than a stored property on
MessageTextView: UITextView(usingTextLayoutManager:) skips the subclass's
stored property initialisers, so such a property would be nil.

Fixes #5725

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:21:36 +02:00
renovate[bot] b21eecec1b Update zizmorcore/zizmor-action action to v0.7.0 2026-10-22 13:34:07 +03:00
Mauro Romito 02a95c0097 Always start a message selection when forwarding
Multi-select forwarding is ready to ship, so Forward from the message menu now
always starts a selection in the room, thread, focused and pinned timelines.
Media timelines still forward the single item straight away.

Removes the messageMultiSelectEnabled setting and its developer option, the
selection state's isEnabled gate and the publisher that kept it in sync, the two
unit tests that only covered the flag, and the preview setup that switched it on.
2026-10-22 10:21:58 +02:00
Mauro Romito c2f99ab646 Show calls as missed while another call is ringing or ongoing
Like Android, a call that comes in while another one rings, or while a web view call runs, no longer rings: it's reported to CallKit as missed so it shows in Recents. An ongoing native call is left alone, since CallKit tracks it and offers its own call waiting. A second push for the ring that's already ringing is reported as handled, without a missed entry.

An answered call that never opens (e.g. its room isn't joined) is dropped when its call session is torn down, so it can't block later calls. The unanswered timeout is now cancelled as soon as a call is answered, rather than a second later, when it may already belong to a call that rang since.
2026-10-21 15:16:08 +02:00
Element CI 0050f923c6 Prepare next release 2026-10-21 05:50:56 -07:00
Doug 1621340a9d Fix the settings button not being visible to VoiceOver. 2026-10-21 14:37:57 +02:00
Mauro Romito a55e1a278f Fix timeline scroll buttons growing too large with Dynamic Type
CompoundIcon already scales its size with Dynamic Type, but the chevron
was given a size that was itself a @ScaledMetric, so it scaled twice:
the button reached about 202pt at the largest accessibility size, more
than twice the composer's mic button.

Pass the base icon size and scale the icon, its padding and the badge
once, relative to headingLG like the composer buttons. The button now
keeps its proportions at every size (72pt at the largest, mic 88pt)
and is unchanged at the default size.
2026-10-21 14:07:14 +02:00
Mauro Romito b3e4a79b2c Strip location data when any image in a file has it
Only the first image was checked for GPS before stripping, so a file
whose later images carried a location, but not its first, was sent
unchanged with that location. Every image is checked now.

GPS stored only in XMP was already caught, because ImageIO reports it
in the image's GPS properties.
2026-10-21 14:02:23 +02:00
Mauro Romito 3a4a7e7cf9 Keep spatial photos spatial when stripping location data
Spatial photos pair their images in a stereo group. ImageIO only writes
that group from the properties each image is added with, so re-encoding
a photo to remove its location dropped the pairing, and the photo was
sent as a flat one with hidden extra images.

Each image is now added with its stereo group again, read from the
source's container properties, so the left, right and monoscopic images
keep their roles along with the group's disparity adjustment. ImageIO
ignores the group's image index keys and anything it can't write, so the
group is passed on as it is.
2026-10-21 14:02:23 +02:00
Doug 526b86874d Fix a potential crash when creating a new room. (#6378)
Update the Enterprise submodule.
2026-10-21 11:58:32 +01:00
Rene Schakmann 74b6c234b3 Keep HDR gain maps when stripping location data from images (#6371) 2026-10-21 11:19:53 +02:00
renovate[bot] 13803ccc3f Update dependency siteline/SwiftUI-Introspect to v27.1.0 (#6377)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-21 10:04:42 +01:00
Element CI 7b65bf0770 Prepare next release 2026-10-20 08:40:12 -07:00
Doug ad14cc0b55 Add support for QR code task cancellation. (#6373)
* Add support for cancelling QR code operations.

* Send QR code screen cancellations back to the SDK.

* Add tests for cancellation.
2026-10-20 14:42:37 +00:00
Mauro Romito 80552f9a6c Bump the RustSDK to v26.10.20
Brings in event cache fixes: no automatic back-pagination for spaces
and non-joined rooms, and rooms shrink again after background
back-pagination.

matrix-rust-sdk: 56bc59112822e7eb25943a95e02502855cdeef2d
2026-10-20 16:39:18 +02:00
Mauro Romito fd52027ac3 Open the sign-up page when creating an account with OAuth
Create account sent prompt=consent, the same as Sign in, so MAS opened its
sign-in page and new users were asked for a password they didn't have.

The create prompt was turned off because MAS used to sign you straight into
an existing browser session (element-hq/matrix-authentication-service#3429).
MAS v0.15.0 fixed that by always showing its consent page, so send
prompt=create again for registration, but only when the server advertises it.
2026-10-20 14:21:28 +02:00
Mauro Romito d495f937b6 Show the open eye while the recovery key is hidden
The eye button shows what tapping it will do, so a hidden key shows the
open eye. This restores Compound's original icon order.

Re-record the recovery key screen and the encryption settings out-of-sync
UI test snapshots for the new field.
2026-10-20 10:53:29 +02:00
Mauro Romito 155e478a77 Add an eye button to show the recovery key while entering it
The recovery key field now uses Compound's secure text field style, which
adds the show/hide button Android already has. Autocapitalisation and
autocorrection are off so a revealed key isn't altered while typing.

Compound's eye icon now shows a crossed eye while the text is hidden and an
open eye while it's shown, matching Android and Compound web.
2026-10-20 10:53:29 +02:00
Mauro Romito 2fb5c4c316 Stop live location shares when they expire, even without location updates
Expiry was only checked when a location update arrived. A phone that
doesn't move gets none, so an expired share kept GPS, the location
indicator and the room banner on.

Each account's service now schedules one task for the next share to
expire, rescheduled whenever its shares change and re-armed if the wall
clock lags behind the sleep. Shares that expired while the app wasn't
running are dropped when the service starts. Time comes from an
injected TimeProvider so the tests drive it with ManualClock.

Closes #6367
2026-10-20 10:45:14 +02:00
Mauro Romito 3e9f44e944 Keep live location shares when the location isn't found yet
Core Location reports CLError.locationUnknown when it can't get a fix
straight away and keeps trying, but didFailWithError stopped every
account's shares on any error. Ignore that one error and keep stopping
on real failures such as .denied.

Closes #6366
2026-10-20 10:45:14 +02:00
Stefan Ceriu 9bcb105d2b Bump the RustSDK to v26.10.19
Which brings in search speed improvements and a session verification fix (among
other things).
2026-10-19 20:02:06 +03:00
Doug 1ce7501e1b Finish splitting the App/User hooks. (#6348)
* Remove the homeserver parameter from user hooks.

* Split the OAuthPresenter hook into two.

With one living directly on the UserHooks.

* Add developerOptionsScreenHook to the UserHooks.

* Remove appHooks from the flowParameters.
2026-10-19 16:28:18 +01:00
Stefan Ceriu 066e806c13 Start the SAS verification when the other device accepts our request
Element X Android doesn't start SAS after accepting a request, so iOS
requests to it never progressed. Either side may start per the spec and the
SDK resolves the conflict if both do.

Requires the SDK change making `didAcceptVerificationRequest` fire only on
the requesting side.
2026-10-19 18:21:59 +03:00
Mauro 626ea29868 Share live location per account (#6346)
* Store live location shares per account

The active shares were stored for the whole app, so with several accounts signed in every account's manager ran location updates and tried to send to every shared room, and could stop another account's share. They now live in the account settings and are migrated to the first account restored.

* Share one location manager between accounts

Each user session now has a LiveLocationService with its own shares, while a single app-level LiveLocationManager owns the CLLocationManager, runs location updates while any account shares, hands each location to the sharing accounts and mirrors the authorization status into every service. Signing out stops the account's shares before logging out, so other people don't keep seeing a frozen live location.

* Publish the live location shares migrated into an account

Sessions are built before the migrations run, so the account's live location service had already read an empty list of shares and the raw migration didn't tell it about the moved ones. An upgrade during a share left it showing as sharing without sending anything until the next launch. The migration now sets the value again once moved, which publishes it.

* Don't migrate the live location shares

Sessions are built before the migrations run, so a migrated share wouldn't resume until the next launch without re-publishing the value. That isn't worth the extra code for a rare case: a share running during the update just stops sending until it expires.

* Apply review suggestions to live location sharing

- Keep the live location shares with the other session activity settings instead of in their own section.
- The LiveLocationManager now remembers that Always authorization was requested; the services only check the flag before asking.
- Rename the manager's helpers to isSharingChanged(_:for:), syncLocationUpdates() and process(_:).
- Clarify the doc comments on the service's action and authorization status.

* Rename the notification manager's action handler to process

Matches the LiveLocationManager and what view models call it.
2026-10-19 15:08:40 +00:00
Mauro Romito 06e71f796d Remove the redundant biometric refresh calls from AppLockService
The biometric state hash now comes from LAContext.domainState, which
unlike the deprecated evaluatedPolicyDomainState doesn't need
canEvaluatePolicy to be called before it can be read. Drop
updateBiometrics() and make LAContextMock return its values directly
instead of waiting for a policy evaluation.
2026-10-19 15:12:53 +02:00
Stefan Ceriu 031e99e208 Update search screen snapshots 2026-10-19 14:50:28 +03:00
Stefan Ceriu 8055f59b13 Remove formatting from search result bodies 2026-10-19 14:50:28 +03:00
Stefan Ceriu 40d991f256 Move search screen translations to localazy 2026-10-19 14:50:28 +03:00
Mauro 3216713c45 Replace the deprecated biometric domain state in AppLockService (#6243) 2026-10-19 12:53:50 +02:00
Element CI 9f34176edc Translations update 2026-10-19 12:24:26 +02:00
Stefan Ceriu 1f144393bd Adopt latest SwiftFormat rules
Introduced in 0.64.0: repeatedGuard, nestedIf and extensionAttributes
2026-10-19 10:41:08 +03:00
Stefan Ceriu 87f6b1379b Fix the space exploration UI test on iPad
The tab rail used in regular width on iPad is a custom view and never applied the tabs' accessibility identifiers, so UI tests couldn't find its buttons. Apply them to the rail's buttons the same way the TabView layout does.
2026-10-19 08:55:46 +03:00
Element CI 734c0678fa Prepare next release 2026-10-16 08:35:32 -07:00
Doug 4b948fe108 Handle an API change where QR code logins now return a task. (#6354)
Quick workaround for now, proper task cancellation will follow.
2026-10-16 16:20:51 +01:00
Mauro Romito 074a2d7910 Remember seen invites per account
Seen invites were stored for the whole app, so an invite seen by one account showed as seen in another account invited to the same room. They now live in the account settings, are migrated to the first account restored and are wiped when signing out.
2026-10-16 11:45:57 +02:00
Element CI fac5f345fb Prepare next release 2026-10-16 02:38:21 -07:00
Valere c6d21dcd7f Bump element-call-ios to 0.1.0-rc.11 and the Matrix Rust SDK to 26.10.15
element-call-ios 0.1.0-rc.11 needs the SDK's 26.10.15 widget
capabilities, and brings matrix-rust-rtc 0.5.0-rc.5. The SDK drops
Room.roomEventsDebugString, whose mock goes with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 20:28:37 +03:00
Valere d33dc058c2 Report native calls that end without us to CallKit
The call package now says why a call ended. Only our own hang-up is an
end call action; a call the other side declined or left, that nobody
answered, or that failed is reported to CallKit with that reason, so the
call log no longer shows it as one we ended, and no end action comes back
to hang up a call that is already over.

Also adopts the package's other host changes: the voice call icon beside
"Calling…", and the call's large avatar rendered at the 140 pt it is
drawn at.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 20:28:37 +03:00
Mauro 268d6c8ead Notify every signed-in account and turn notifications on and off per account (#6337)
* Store the notifications switch per account

Adds AccountSettings.enableNotifications and moves the app-wide value into the signed in accounts before they're restored: the first account takes it out of the app settings and the others get the same switch, so someone who turned notifications off keeps them off.

* Add a notification service to every user session

Each account's NotificationService sets its pusher when its notifications are on and deletes it when they're off (appending with multiple accounts), keeps the account's unread count and decides which of its delivered notifications to clear. It asks the NotificationManager, the only owner of the notification center, through actions: remove the notifications matching a rule, request authorization and the unread count. The UserSessionManager connects every live session's service to the manager, and flows and screens use the session's service instead of the manager, which leaves the flow parameters.

* Route notifications by account

Taps only open rooms of the active account for now, a tap made while restoring only opens once its account is the active one, replies are sent from the account they were made for, and signing out only clears that account's notifications unless it was the last one. The notification extension hides pushes for an account that signed out while other accounts are still signed in.

* Turn notifications on and off for each account

The notification settings switch is now saved per account, and each account's NotificationService sets or deletes its pusher when it changes, asking for permission when it's turned on.

* Apply review suggestions to multi-account notifications

Migration
- Move the notifications switch with a single per-account migration, like 26.10.1 and 26.10.2, and drop its dedicated test.

Notification manager and service
- Follow each account's badge count publisher directly, removing the badge count action and the stored counts.
- Only reset the badge and unregister from APNs when the last account signs out, as each account already clears its own notifications.
- Set up the service's subscriptions in a single setupSubscriptions().
- Rename switchChanged(to:) to enableNotificationsChanged(to:) and pusherConfiguration(identifiers:) to pusherConfiguration(for:).
- Build the service without hopping to the main actor, it already runs there.

Notification service extension
- Check the account's switch in NotificationHandler using the session's settings, and log an error when a push arrives for an account that's turned off.
- Always show pushes that match no signed-in account and log an error, so a broken setup stays visible.

Other
- Store a pending inline reply in a PendingInlineReplyDetails struct.
- Assign the chats tab badge with weakAssign.
- Make PusherConfiguration Equatable so the pusher test checks it in one expectation.
- Clarify the comment about notifications without a receiver.

* Print instead of logging before the app hooks run in the NSE

A push that matches no signed-in account goes back to printing, as MXLog shouldn't be used before the app hooks have run. The push is still shown so a broken setup stays visible.
2026-10-15 13:10:26 +02:00
Mauro Romito 09ecec4306 Ignore repeated confirms on the server selection screen
Tapping Continue and then the keyboard's Done key (or double tapping
Continue) started two server configurations. With a password-only server
both asked the flow to show the login screen, and the second request hit
the authentication state machine's unexpected transition fatalError.

Keep the running confirmation task and ignore further confirms until it
finishes, so the flow continues once. The guard clears afterwards so
confirming again after going back from the login screen still works.

Fixes ELEMENT-X-IOS-XED
2026-10-15 12:34:50 +02:00