Skip to content

Commit 499a99a

Browse files
committed
Merge branch 'release/25.08.1'
2 parents 8bf377d + 2e64c93 commit 499a99a

File tree

228 files changed

+2754
-1663
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+2754
-1663
lines changed

CHANGES.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,61 @@
1+
Changes in Element X v25.08.0
2+
=============================
3+
4+
<!-- Release notes generated using configuration in .github/release.yml at v25.08.0 -->
5+
6+
## What's Changed
7+
### 🐛 Bugfixes
8+
* Fix `toPlainText` where `<ol start='n'>` tags appear by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5044
9+
* Remove the scaling added in `Player.Listener.onVideoSizeChanged` by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5055
10+
* Make sure we clean up the pre-processed and uploaded media by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5039
11+
* Calculate video output size taking into account portrait mode by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5068
12+
* Prevent loop when exiting the attachments preview screen by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5078
13+
* Prevent crash caused by re-release of wakelock in calls by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5077
14+
* Make sure we display errors when we create a recovery key and it fails by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5079
15+
* Fix crash when trying to get active notifications by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5085
16+
* Adapt 'change roles' screens to the new creator/owner role by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5076
17+
### 🗣 Translations
18+
* Sync Strings by @ElementBot in https://github.com/element-hq/element-x-android/pull/5021
19+
* Sync Strings by @ElementBot in https://github.com/element-hq/element-x-android/pull/5054
20+
* Sync Strings by @ElementBot in https://github.com/element-hq/element-x-android/pull/5083
21+
### 🧱 Build
22+
* Disable Element Call Maestro tests for the time being by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5064
23+
### 📄 Documentation
24+
* Grammar fixes for docs and comments by @andybalaam in https://github.com/element-hq/element-x-android/pull/5043
25+
* Note how to switch back to the published SDK after building locally by @andybalaam in https://github.com/element-hq/element-x-android/pull/5042
26+
### Dependency upgrades
27+
* Update dependency io.mockk:mockk to v1.14.5 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5037
28+
* Update dependency androidx.lifecycle:lifecycle-process to v2.9.2 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5036
29+
* Update dagger to v2.57 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5038
30+
* Update haze to v1.6.9 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5045
31+
* Update dependency io.nlopez.compose.rules:detekt to v0.4.24 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5053
32+
* Update dependency io.nlopez.compose.rules:detekt to v0.4.25 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5058
33+
* Update coil to v3.3.0 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5063
34+
* Update dependency io.nlopez.compose.rules:detekt to v0.4.26 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5065
35+
* Update dependency com.posthog:posthog-android to v3.20.0 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5067
36+
* Update dependency com.google.firebase:firebase-bom to v34 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5061
37+
* Update dependency org.matrix.rustcomponents:sdk-android to v25.7.23 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5073
38+
* Update dependency com.posthog:posthog-android to v3.20.1 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5087
39+
* Update dependency org.matrix.rustcomponents:sdk-android to v25.7.28 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5088
40+
* Update dependency org.maplibre.gl:android-sdk to v11.13.0 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5093
41+
* Update dependency androidx.test:runner to v1.7.0 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5102
42+
* Update test.core to v1.7.0 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5104
43+
* Update dependency androidx.test.ext:junit to v1.3.0 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5103
44+
* Update dependency io.sentry:sentry-android to v8.18.0 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5097
45+
### Others
46+
* Iterate on FloatingActionButton shape and colors. by @bmarty in https://github.com/element-hq/element-x-android/pull/5033
47+
* [a11y] Improve session verification screens by @bmarty in https://github.com/element-hq/element-x-android/pull/5017
48+
* misc (room id) : add room id regex pattern to match new versions by @ganfra in https://github.com/element-hq/element-x-android/pull/5040
49+
* Use lower level APIs to draw the message bubbles by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5056
50+
* misc (store description) : update store description for fastlane by @ganfra in https://github.com/element-hq/element-x-android/pull/5060
51+
* [a11y] Improve accessibility on avatar when creating a room. by @bmarty in https://github.com/element-hq/element-x-android/pull/5046
52+
* Add fallback notifications from UTDs to the push history by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5047
53+
* feature (media send queue) : enable send queue by default by @ganfra in https://github.com/element-hq/element-x-android/pull/5098
54+
* misc : re-enable share pos by default by @ganfra in https://github.com/element-hq/element-x-android/pull/5108
55+
56+
57+
**Full Changelog**: https://github.com/element-hq/element-x-android/compare/v25.07.1...v25.08.0
58+
159
Changes in Element X v25.07.1
260
=============================
361

app/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ licensee {
318318
allow("MIT")
319319
allow("BSD-2-Clause")
320320
allow("BSD-3-Clause")
321+
allow("EPL-1.0")
321322
allowUrl("https://opensource.org/licenses/MIT")
322323
allowUrl("https://developer.android.com/studio/terms.html")
323324
allowUrl("https://www.zetetic.net/sqlcipher/license/")

appnav/src/main/kotlin/io/element/android/appnav/LoggedInEventProcessor.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import io.element.android.libraries.matrix.api.timeline.item.event.MembershipCha
1414
import io.element.android.libraries.ui.strings.CommonStrings
1515
import kotlinx.coroutines.CoroutineScope
1616
import kotlinx.coroutines.Job
17+
import kotlinx.coroutines.flow.distinctUntilChanged
1718
import kotlinx.coroutines.flow.filter
1819
import kotlinx.coroutines.flow.launchIn
1920
import kotlinx.coroutines.flow.onEach
@@ -28,6 +29,7 @@ class LoggedInEventProcessor @Inject constructor(
2829
fun observeEvents(coroutineScope: CoroutineScope) {
2930
observingJob = roomMembershipObserver.updates
3031
.filter { !it.isUserInRoom }
32+
.distinctUntilChanged()
3133
.onEach {
3234
when (it.change) {
3335
MembershipChange.LEFT -> displayMessage(CommonStrings.common_current_user_left_room)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
33
<string name="banner_migrate_to_native_sliding_sync_action">"خروج و ارتقا"</string>
4+
<string name="banner_migrate_to_native_sliding_sync_app_force_logout_title">"‏%1$s دیگر از شیوه‌نامهٔ قدیمی پشتیبانی نمی‌کند. لطفاً برای ادامهٔ استفاده از کاره، خارج شده و دوباره وارد شوید."</string>
45
</resources>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Main changes in this version:
2+
- Fixes for the room v12 changes.
3+
- Several bug fixes, centered on media and calls.
4+
Full changelog: https://github.com/element-hq/element-x-android/releases

features/call/impl/src/main/kotlin/io/element/android/features/call/impl/ui/CallScreenPresenter.kt

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,11 @@ import io.element.android.libraries.architecture.Presenter
3333
import io.element.android.libraries.architecture.runCatchingUpdatingState
3434
import io.element.android.libraries.core.coroutine.CoroutineDispatchers
3535
import io.element.android.libraries.di.annotations.AppCoroutineScope
36-
import io.element.android.libraries.matrix.api.MatrixClient
3736
import io.element.android.libraries.matrix.api.MatrixClientProvider
38-
import io.element.android.libraries.matrix.api.core.RoomId
3937
import io.element.android.libraries.matrix.api.sync.SyncState
4038
import io.element.android.libraries.matrix.api.widget.MatrixWidgetDriver
4139
import io.element.android.libraries.network.useragent.UserAgentProvider
4240
import io.element.android.services.analytics.api.ScreenTracker
43-
import io.element.android.services.appnavstate.api.ActiveRoomsHolder
4441
import io.element.android.services.appnavstate.api.AppForegroundStateService
4542
import io.element.android.services.toolbox.api.systemclock.SystemClock
4643
import kotlinx.coroutines.CoroutineScope
@@ -64,7 +61,6 @@ class CallScreenPresenter @AssistedInject constructor(
6461
private val activeCallManager: ActiveCallManager,
6562
private val languageTagProvider: LanguageTagProvider,
6663
private val appForegroundStateService: AppForegroundStateService,
67-
private val activeRoomsHolder: ActiveRoomsHolder,
6864
@AppCoroutineScope
6965
private val appCoroutineScope: CoroutineScope,
7066
) : Presenter<CallScreenState> {
@@ -75,7 +71,6 @@ class CallScreenPresenter @AssistedInject constructor(
7571

7672
private val isInWidgetMode = callType is CallType.RoomCall
7773
private val userAgent = userAgentProvider.provide()
78-
private var notifiedCallStart = false
7974

8075
@Composable
8176
override fun present(): CallScreenState {
@@ -248,9 +243,7 @@ class CallScreenPresenter @AssistedInject constructor(
248243
Timber.d("Observing sync state in-call for sessionId: ${roomCallType.sessionId}")
249244
client.syncService().syncState
250245
.collect { state ->
251-
if (state == SyncState.Running) {
252-
client.notifyCallStartIfNeeded(callType.roomId)
253-
} else {
246+
if (state != SyncState.Running) {
254247
appForegroundStateService.updateIsInCallState(true)
255248
}
256249
}
@@ -263,32 +256,6 @@ class CallScreenPresenter @AssistedInject constructor(
263256
}
264257
}
265258

266-
private suspend fun MatrixClient.notifyCallStartIfNeeded(roomId: RoomId) {
267-
if (notifiedCallStart) return
268-
269-
val activeRoomForSession = activeRoomsHolder.getActiveRoomMatching(sessionId, roomId)
270-
val sendCallNotificationResult = if (activeRoomForSession != null) {
271-
Timber.d("Notifying call start for room $roomId. Has room call: ${activeRoomForSession.info().hasRoomCall}")
272-
activeRoomForSession.sendCallNotificationIfNeeded()
273-
} else {
274-
// Instantiate the room from the session and roomId and send the notification
275-
getJoinedRoom(roomId)?.use { room ->
276-
Timber.d("Notifying call start for room $roomId. Has room call: ${room.info().hasRoomCall}")
277-
room.sendCallNotificationIfNeeded()
278-
} ?: run {
279-
Timber.w("No room found for session $sessionId and room $roomId, skipping call notification.")
280-
return
281-
}
282-
}
283-
284-
sendCallNotificationResult.fold(
285-
onSuccess = { notifiedCallStart = true },
286-
onFailure = { error ->
287-
Timber.e(error, "Failed to send call notification for room $roomId.")
288-
}
289-
)
290-
}
291-
292259
private fun parseMessage(message: String): WidgetMessage? {
293260
return WidgetMessageSerializer.deserialize(message).getOrNull()
294261
}

features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/DefaultCallWidgetProvider.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import io.element.android.libraries.di.AppScope
1313
import io.element.android.libraries.matrix.api.MatrixClientProvider
1414
import io.element.android.libraries.matrix.api.core.RoomId
1515
import io.element.android.libraries.matrix.api.core.SessionId
16+
import io.element.android.libraries.matrix.api.room.isDm
1617
import io.element.android.libraries.matrix.api.widget.CallWidgetSettingsProvider
1718
import io.element.android.libraries.preferences.api.store.AppPreferencesStore
1819
import io.element.android.services.appnavstate.api.ActiveRoomsHolder
@@ -44,7 +45,7 @@ class DefaultCallWidgetProvider @Inject constructor(
4445
val baseUrl = customBaseUrl ?: EMBEDDED_CALL_WIDGET_BASE_URL
4546

4647
val isEncrypted = room.info().isEncrypted ?: room.getUpdatedIsEncrypted().getOrThrow()
47-
val widgetSettings = callWidgetSettingsProvider.provide(baseUrl, encrypted = isEncrypted)
48+
val widgetSettings = callWidgetSettingsProvider.provide(baseUrl, encrypted = isEncrypted, direct = room.isDm())
4849
val callUrl = room.generateWidgetWebViewUrl(
4950
widgetSettings = widgetSettings,
5051
clientId = clientId,

features/call/impl/src/main/res/values-fi/translations.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
<string name="call_foreground_service_channel_title_android">"Käynnissä oleva puhelu"</string>
44
<string name="call_foreground_service_message_android">"Palaa puheluun napauttamalla"</string>
55
<string name="call_foreground_service_title_android">"☎️ Puhelu käynnissä"</string>
6+
<string name="call_invalid_audio_device_bluetooth_devices_disabled">"Element Call ei tue Bluetooth-äänilaitteiden käyttöä tässä Android-versiossa. Valitse toinen äänilaite."</string>
67
<string name="screen_incoming_call_subtitle_android">"Saapuva Element Call -puhelu"</string>
78
</resources>

features/call/impl/src/test/kotlin/io/element/android/features/call/ui/CallScreenPresenterTest.kt

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ import io.element.android.libraries.matrix.test.A_ROOM_ID
2626
import io.element.android.libraries.matrix.test.A_SESSION_ID
2727
import io.element.android.libraries.matrix.test.FakeMatrixClient
2828
import io.element.android.libraries.matrix.test.FakeMatrixClientProvider
29-
import io.element.android.libraries.matrix.test.room.FakeJoinedRoom
3029
import io.element.android.libraries.matrix.test.sync.FakeSyncService
3130
import io.element.android.libraries.matrix.test.widget.FakeMatrixWidgetDriver
3231
import io.element.android.libraries.network.useragent.UserAgentProvider
3332
import io.element.android.services.analytics.api.ScreenTracker
3433
import io.element.android.services.analytics.test.FakeScreenTracker
35-
import io.element.android.services.appnavstate.api.ActiveRoomsHolder
3634
import io.element.android.services.appnavstate.test.FakeAppForegroundStateService
3735
import io.element.android.services.toolbox.api.systemclock.SystemClock
3836
import io.element.android.tests.testutils.WarmUpRule
@@ -82,19 +80,12 @@ import kotlin.time.Duration.Companion.seconds
8280
}
8381

8482
@Test
85-
fun `present - with CallType RoomCall sets call as active, loads URL, runs WidgetDriver and notifies the other clients a call started`() = runTest {
86-
val sendCallNotificationIfNeededLambda = lambdaRecorder<Result<Boolean>> { Result.success(true) }
87-
val syncService = FakeSyncService(SyncState.Running)
88-
val fakeRoom = FakeJoinedRoom(sendCallNotificationIfNeededResult = sendCallNotificationIfNeededLambda)
89-
val client = FakeMatrixClient(syncService = syncService).apply {
90-
givenGetRoomResult(A_ROOM_ID, fakeRoom)
91-
}
83+
fun `present - with CallType RoomCall sets call as active, loads URL and runs WidgetDriver`() = runTest {
9284
val widgetDriver = FakeMatrixWidgetDriver()
9385
val widgetProvider = FakeCallWidgetProvider(widgetDriver)
9486
val analyticsLambda = lambdaRecorder<MobileScreen.ScreenName, Unit> {}
9587
val joinedCallLambda = lambdaRecorder<CallType, Unit> {}
9688
val presenter = createCallScreenPresenter(
97-
matrixClientsProvider = FakeMatrixClientProvider(getClient = { Result.success(client) }),
9889
callType = CallType.RoomCall(A_SESSION_ID, A_ROOM_ID),
9990
widgetDriver = widgetDriver,
10091
widgetProvider = widgetProvider,
@@ -116,7 +107,6 @@ import kotlin.time.Duration.Companion.seconds
116107
assertThat(widgetProvider.getWidgetCalled).isTrue()
117108
assertThat(widgetDriver.runCalledCount).isEqualTo(1)
118109
analyticsLambda.assertions().isCalledOnce().with(value(MobileScreen.ScreenName.RoomCall))
119-
sendCallNotificationIfNeededLambda.assertions().isCalledOnce()
120110

121111
// Wait until the WidgetDriver is loaded
122112
skipItems(1)
@@ -399,7 +389,6 @@ import kotlin.time.Duration.Companion.seconds
399389
activeCallManager: FakeActiveCallManager = FakeActiveCallManager(),
400390
screenTracker: ScreenTracker = FakeScreenTracker(),
401391
appForegroundStateService: FakeAppForegroundStateService = FakeAppForegroundStateService(),
402-
activeRoomsHolder: ActiveRoomsHolder = ActiveRoomsHolder(),
403392
): CallScreenPresenter {
404393
val userAgentProvider = object : UserAgentProvider {
405394
override fun provide(): String {
@@ -420,7 +409,6 @@ import kotlin.time.Duration.Companion.seconds
420409
languageTagProvider = FakeLanguageTagProvider("en-US"),
421410
appForegroundStateService = appForegroundStateService,
422411
appCoroutineScope = backgroundScope,
423-
activeRoomsHolder = activeRoomsHolder,
424412
)
425413
}
426414
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import extension.setupAnvil
2+
3+
/*
4+
* Copyright 2025 New Vector Ltd.
5+
*
6+
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
7+
* Please see LICENSE files in the repository root for full details.
8+
*/
9+
10+
plugins {
11+
id("io.element.android-library")
12+
id("kotlin-parcelize")
13+
}
14+
15+
android {
16+
namespace = "io.element.android.features.changeroommemberroles.api"
17+
}
18+
19+
setupAnvil()
20+
21+
dependencies {
22+
implementation(projects.anvilannotations)
23+
implementation(projects.libraries.architecture)
24+
implementation(projects.libraries.core)
25+
implementation(projects.libraries.matrix.api)
26+
api(projects.libraries.usersearch.api)
27+
}

0 commit comments

Comments
 (0)