Skip to content

Commit 01adf50

Browse files
committed
Merge branch 'release/25.04.1' into main
2 parents 2c67c01 + 6f37f61 commit 01adf50

File tree

135 files changed

+2196
-394
lines changed

Some content is hidden

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

135 files changed

+2196
-394
lines changed

CHANGES.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,71 @@
1+
Changes in Element X v25.04.0
2+
=============================
3+
4+
<!-- Release notes generated using configuration in .github/release.yml at v25.04.0 -->
5+
6+
## What's Changed
7+
### ✨ Features
8+
* Enable Rust trace log packs by @jmartinesp in https://github.com/element-hq/element-x-android/pull/4514
9+
* Allow using a hardware keyboard to unlock the app using a pin code by @jmartinesp in https://github.com/element-hq/element-x-android/pull/4530
10+
### 🙌 Improvements
11+
* Change (mention span) : rework and add more cases by @ganfra in https://github.com/element-hq/element-x-android/pull/4476
12+
* Add kick (remove) confirmation and reason by @bmarty in https://github.com/element-hq/element-x-android/pull/4507
13+
* Remove the green badge on a pending invite after a first preview by @bmarty in https://github.com/element-hq/element-x-android/pull/4532
14+
### 🐛 Bugfixes
15+
* Improve touch indicators for the user info UI in the timeline by @jmartinesp in https://github.com/element-hq/element-x-android/pull/4482
16+
* Limit the text length in the 'in reply to' preview by @jmartinesp in https://github.com/element-hq/element-x-android/pull/4491
17+
* Timeline header: ensure that the decoration is clickable by @bmarty in https://github.com/element-hq/element-x-android/pull/4495
18+
* Add video autoplay to media gallery by @jmartinesp in https://github.com/element-hq/element-x-android/pull/4499
19+
* Add `WakeLock` to dismiss ringing call screen when call is cancelled by @jmartinesp in https://github.com/element-hq/element-x-android/pull/4478
20+
* Make sure the live timeline is destroyed before clearing a room's cache by @jmartinesp in https://github.com/element-hq/element-x-android/pull/4515
21+
* Fix bullet points not having leading margin on timeline items by @jmartinesp in https://github.com/element-hq/element-x-android/pull/4536
22+
* Fix the share location URI by @jmartinesp in https://github.com/element-hq/element-x-android/pull/4544
23+
* Add a inderminate progress bar when loging out and in Waiting state. by @bmarty in https://github.com/element-hq/element-x-android/pull/4538
24+
### 🗣 Translations
25+
* Sync Strings by @ElementBot in https://github.com/element-hq/element-x-android/pull/4506
26+
* Sync Strings by @ElementBot in https://github.com/element-hq/element-x-android/pull/4543
27+
### 🧱 Build
28+
* Element config by @bmarty in https://github.com/element-hq/element-x-android/pull/4471
29+
* Check if Manifest.permission.REQUEST_INSTALL_PACKAGES is in the manifest by @bmarty in https://github.com/element-hq/element-x-android/pull/4490
30+
* Remove nightly_enterprise.yml. by @bmarty in https://github.com/element-hq/element-x-android/pull/4492
31+
* Log the packageId which is currently built. by @bmarty in https://github.com/element-hq/element-x-android/pull/4494
32+
* Use handy buildConfigFieldStr. by @bmarty in https://github.com/element-hq/element-x-android/pull/4501
33+
* Fix warnings in InMemoryAppPreferencesStore by @bmarty in https://github.com/element-hq/element-x-android/pull/4523
34+
### Dependency upgrades
35+
* fix(deps): update camera to v1.4.2 by @renovate in https://github.com/element-hq/element-x-android/pull/4483
36+
* fix(deps): update dependency org.maplibre.gl:android-sdk to v11.8.5 by @renovate in https://github.com/element-hq/element-x-android/pull/4487
37+
* fix(deps): update dependency com.posthog:posthog-android to v3.13.0 by @renovate in https://github.com/element-hq/element-x-android/pull/4469
38+
* fix(deps): update dependency androidx.compose:compose-bom to v2025.03.01 by @renovate in https://github.com/element-hq/element-x-android/pull/4484
39+
* fix(deps): update dependencyanalysis to v2.13.3 by @renovate in https://github.com/element-hq/element-x-android/pull/4493
40+
* fix(deps): update media3 to v1.6.0 by @renovate in https://github.com/element-hq/element-x-android/pull/4488
41+
* fix(deps): update dependency io.element.android:element-call-embedded to v0.9.0 by @renovate in https://github.com/element-hq/element-x-android/pull/4498
42+
* fix(deps): update dependency com.google.firebase:firebase-bom to v33.12.0 by @renovate in https://github.com/element-hq/element-x-android/pull/4508
43+
* fix(deps): update dependency com.posthog:posthog-android to v3.13.1 by @renovate in https://github.com/element-hq/element-x-android/pull/4516
44+
* fix(deps): update dependency io.sentry:sentry-android to v8.6.0 by @renovate in https://github.com/element-hq/element-x-android/pull/4509
45+
* fix(deps): update kotlin by @renovate in https://github.com/element-hq/element-x-android/pull/4444
46+
* fix(deps): update kotlin by @renovate in https://github.com/element-hq/element-x-android/pull/4522
47+
* fix(deps): update dependencyanalysis to v2.14.0 by @renovate in https://github.com/element-hq/element-x-android/pull/4527
48+
* fix(deps): update dependency io.element.android:compound-android to v25.4.4 by @renovate in https://github.com/element-hq/element-x-android/pull/4537
49+
* chore(deps): update plugin dependencycheck to v12.1.1 by @renovate in https://github.com/element-hq/element-x-android/pull/4540
50+
* fix(deps): update appyx to v1.7.0 by @renovate in https://github.com/element-hq/element-x-android/pull/4547
51+
* fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.4.7 by @renovate in https://github.com/element-hq/element-x-android/pull/4548
52+
### Others
53+
* Update screenshots by @bmarty in https://github.com/element-hq/element-x-android/pull/4497
54+
* Update store description. by @bmarty in https://github.com/element-hq/element-x-android/pull/4496
55+
* Improve TextFieldDialog by @bmarty in https://github.com/element-hq/element-x-android/pull/4512
56+
* Make `RustMatrixClient.close` asynchronous by @jmartinesp in https://github.com/element-hq/element-x-android/pull/4513
57+
* Replace OutlinedTextField by our TextField by @bmarty in https://github.com/element-hq/element-x-android/pull/4521
58+
* Remove alias from room invite item by @bmarty in https://github.com/element-hq/element-x-android/pull/4531
59+
* Remember flows by @bmarty in https://github.com/element-hq/element-x-android/pull/4533
60+
* Use colors from compound for badges by @bmarty in https://github.com/element-hq/element-x-android/pull/4545
61+
* Update app icon by @bmarty in https://github.com/element-hq/element-x-android/pull/4534
62+
* Click on userId / room alias to copy value to clipboard. by @bmarty in https://github.com/element-hq/element-x-android/pull/4549
63+
* Run the 'prevent blocked' workflow even if PR has conflicts by @robintown in https://github.com/element-hq/element-x-android/pull/4432
64+
* Update wording for push provider support test. (#4079) by @bmarty in https://github.com/element-hq/element-x-android/pull/4553
65+
66+
67+
**Full Changelog**: https://github.com/element-hq/element-x-android/compare/v25.03.4...v25.04.0
68+
169
Changes in Element X v25.03.4
270
=============================
371

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ import io.element.android.libraries.matrix.api.core.EventId
7070
import io.element.android.libraries.matrix.api.core.MAIN_SPACE
7171
import io.element.android.libraries.matrix.api.core.RoomId
7272
import io.element.android.libraries.matrix.api.core.RoomIdOrAlias
73+
import io.element.android.libraries.matrix.api.core.SessionId
7374
import io.element.android.libraries.matrix.api.core.UserId
7475
import io.element.android.libraries.matrix.api.core.toRoomIdOrAlias
7576
import io.element.android.libraries.matrix.api.permalink.PermalinkData
@@ -378,6 +379,14 @@ class LoggedInFlowNode @AssistedInject constructor(
378379
override fun onOpenRoomNotificationSettings(roomId: RoomId) {
379380
backstack.push(NavTarget.Room(roomId.toRoomIdOrAlias(), initialElement = RoomNavigationTarget.NotificationSettings))
380381
}
382+
383+
override fun navigateTo(sessionId: SessionId, roomId: RoomId, eventId: EventId) {
384+
// We do not check the sessionId, but it will have to be done at some point (multi account)
385+
if (sessionId != matrixClient.sessionId) {
386+
Timber.e("SessionId mismatch, expected ${matrixClient.sessionId} but got $sessionId")
387+
}
388+
backstack.push(NavTarget.Room(roomId.toRoomIdOrAlias(), initialElement = RoomNavigationTarget.Messages(eventId)))
389+
}
381390
}
382391
val inputs = PreferencesEntryPoint.Params(navTarget.initialElement)
383392
preferencesEntryPoint.nodeBuilder(this, buildContext)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Main changes in this version: bug fixes and improvements.
2+
Full changelog: https://github.com/element-hq/element-x-android/releases

features/invite/impl/src/main/kotlin/io/element/android/features/invite/impl/DefaultSeenInvitesStore.kt

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,25 @@ import androidx.datastore.preferences.core.PreferenceDataStoreFactory
1212
import androidx.datastore.preferences.core.edit
1313
import androidx.datastore.preferences.core.stringSetPreferencesKey
1414
import androidx.datastore.preferences.preferencesDataStoreFile
15-
import com.squareup.anvil.annotations.ContributesBinding
1615
import io.element.android.features.invite.api.SeenInvitesStore
1716
import io.element.android.libraries.androidutils.file.safeDelete
1817
import io.element.android.libraries.androidutils.hash.hash
19-
import io.element.android.libraries.di.ApplicationContext
20-
import io.element.android.libraries.di.SessionScope
21-
import io.element.android.libraries.di.SingleIn
22-
import io.element.android.libraries.di.annotations.SessionCoroutineScope
2318
import io.element.android.libraries.matrix.api.core.RoomId
2419
import io.element.android.libraries.matrix.api.core.SessionId
25-
import io.element.android.libraries.matrix.api.user.CurrentSessionIdHolder
2620
import io.element.android.libraries.sessionstorage.api.observer.SessionListener
2721
import io.element.android.libraries.sessionstorage.api.observer.SessionObserver
2822
import kotlinx.coroutines.CoroutineScope
2923
import kotlinx.coroutines.flow.Flow
3024
import kotlinx.coroutines.flow.map
31-
import javax.inject.Inject
3225

3326
private val seenInvitesKey = stringSetPreferencesKey("seenInvites")
3427

35-
@SingleIn(SessionScope::class)
36-
@ContributesBinding(SessionScope::class)
37-
class DefaultSeenInvitesStore @Inject constructor(
38-
@ApplicationContext context: Context,
39-
currentSessionIdHolder: CurrentSessionIdHolder,
40-
@SessionCoroutineScope sessionCoroutineScope: CoroutineScope,
28+
class DefaultSeenInvitesStore(
29+
context: Context,
30+
sessionId: SessionId,
31+
sessionCoroutineScope: CoroutineScope,
4132
sessionObserver: SessionObserver,
4233
) : SeenInvitesStore {
43-
private val sessionId: SessionId = currentSessionIdHolder.current
44-
4534
init {
4635
sessionObserver.addListener(object : SessionListener {
4736
override suspend fun onSessionCreated(userId: String) = Unit
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Copyright 2025 New Vector Ltd.
3+
*
4+
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
5+
* Please see LICENSE files in the repository root for full details.
6+
*/
7+
8+
package io.element.android.features.invite.impl
9+
10+
import android.content.Context
11+
import com.squareup.anvil.annotations.ContributesBinding
12+
import io.element.android.features.invite.api.SeenInvitesStore
13+
import io.element.android.libraries.di.AppScope
14+
import io.element.android.libraries.di.ApplicationContext
15+
import io.element.android.libraries.di.SingleIn
16+
import io.element.android.libraries.matrix.api.core.SessionId
17+
import io.element.android.libraries.sessionstorage.api.observer.SessionObserver
18+
import kotlinx.coroutines.CoroutineScope
19+
import java.util.concurrent.ConcurrentHashMap
20+
import javax.inject.Inject
21+
22+
@SingleIn(AppScope::class)
23+
@ContributesBinding(AppScope::class)
24+
class DefaultSeenInvitesStoreFactory @Inject constructor(
25+
@ApplicationContext private val context: Context,
26+
private val sessionObserver: SessionObserver,
27+
) : SeenInvitesStoreFactory {
28+
// We can have only one class accessing a single data store, so keep a cache of them.
29+
private val cache = ConcurrentHashMap<SessionId, SeenInvitesStore>()
30+
31+
override fun getOrCreate(
32+
sessionId: SessionId,
33+
sessionCoroutineScope: CoroutineScope,
34+
): SeenInvitesStore {
35+
return cache.getOrPut(sessionId) {
36+
DefaultSeenInvitesStore(
37+
context = context,
38+
sessionId = sessionId,
39+
sessionCoroutineScope = sessionCoroutineScope,
40+
sessionObserver = sessionObserver,
41+
)
42+
}
43+
}
44+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright 2025 New Vector Ltd.
3+
*
4+
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
5+
* Please see LICENSE files in the repository root for full details.
6+
*/
7+
8+
package io.element.android.features.invite.impl
9+
10+
import io.element.android.features.invite.api.SeenInvitesStore
11+
import io.element.android.libraries.matrix.api.core.SessionId
12+
import kotlinx.coroutines.CoroutineScope
13+
14+
interface SeenInvitesStoreFactory {
15+
fun getOrCreate(
16+
sessionId: SessionId,
17+
sessionCoroutineScope: CoroutineScope,
18+
): SeenInvitesStore
19+
}

features/invite/impl/src/main/kotlin/io/element/android/features/invite/impl/di/InviteModule.kt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,31 @@ package io.element.android.features.invite.impl.di
1010
import com.squareup.anvil.annotations.ContributesTo
1111
import dagger.Binds
1212
import dagger.Module
13+
import dagger.Provides
14+
import io.element.android.features.invite.api.SeenInvitesStore
1315
import io.element.android.features.invite.api.response.AcceptDeclineInviteState
16+
import io.element.android.features.invite.impl.SeenInvitesStoreFactory
1417
import io.element.android.features.invite.impl.response.AcceptDeclineInvitePresenter
1518
import io.element.android.libraries.architecture.Presenter
1619
import io.element.android.libraries.di.SessionScope
20+
import io.element.android.libraries.matrix.api.MatrixClient
1721

1822
@ContributesTo(SessionScope::class)
1923
@Module
2024
interface InviteModule {
2125
@Binds
2226
fun bindAcceptDeclinePresenter(presenter: AcceptDeclineInvitePresenter): Presenter<AcceptDeclineInviteState>
27+
28+
companion object {
29+
@Provides
30+
fun providesSeenInvitesStore(
31+
factory: SeenInvitesStoreFactory,
32+
matrixClient: MatrixClient,
33+
): SeenInvitesStore {
34+
return factory.getOrCreate(
35+
matrixClient.sessionId,
36+
matrixClient.sessionCoroutineScope,
37+
)
38+
}
39+
}
2340
}

features/joinroom/impl/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ dependencies {
3535
implementation(projects.features.invite.api)
3636
implementation(projects.features.roomdirectory.api)
3737
implementation(projects.services.analytics.api)
38+
implementation(projects.libraries.preferences.api)
3839

3940
testImplementation(libs.test.junit)
4041
testImplementation(libs.coroutines.test)
@@ -46,5 +47,6 @@ dependencies {
4647
testImplementation(projects.libraries.matrix.test)
4748
testImplementation(projects.tests.testutils)
4849
testImplementation(libs.androidx.compose.ui.test.junit)
50+
testImplementation(projects.libraries.preferences.test)
4951
testReleaseImplementation(libs.androidx.compose.ui.test.manifest)
5052
}

features/joinroom/impl/src/main/kotlin/io/element/android/features/joinroom/impl/JoinRoomPresenter.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ import io.element.android.libraries.matrix.api.room.join.JoinRoom
5252
import io.element.android.libraries.matrix.api.room.join.JoinRule
5353
import io.element.android.libraries.matrix.api.room.preview.RoomPreviewInfo
5454
import io.element.android.libraries.matrix.ui.model.toInviteSender
55+
import io.element.android.libraries.preferences.api.store.AppPreferencesStore
5556
import kotlinx.coroutines.CoroutineScope
5657
import kotlinx.coroutines.launch
5758
import java.util.Optional
@@ -69,6 +70,7 @@ class JoinRoomPresenter @AssistedInject constructor(
6970
private val forgetRoom: ForgetRoom,
7071
private val acceptDeclineInvitePresenter: Presenter<AcceptDeclineInviteState>,
7172
private val buildMeta: BuildMeta,
73+
private val appPreferencesStore: AppPreferencesStore,
7274
private val seenInvitesStore: SeenInvitesStore,
7375
) : Presenter<JoinRoomState> {
7476
interface Factory {
@@ -94,6 +96,9 @@ class JoinRoomPresenter @AssistedInject constructor(
9496
val forgetRoomAction: MutableState<AsyncAction<Unit>> = remember { mutableStateOf(AsyncAction.Uninitialized) }
9597
var knockMessage by rememberSaveable { mutableStateOf("") }
9698
var isDismissingContent by remember { mutableStateOf(false) }
99+
val hideInviteAvatars by remember {
100+
appPreferencesStore.getHideInviteAvatarsFlow()
101+
}.collectAsState(initial = false)
97102
val contentState by produceState<ContentState>(
98103
initialValue = ContentState.Loading,
99104
key1 = roomInfo,
@@ -202,6 +207,7 @@ class JoinRoomPresenter @AssistedInject constructor(
202207
cancelKnockAction = cancelKnockAction.value,
203208
applicationName = buildMeta.applicationName,
204209
knockMessage = knockMessage,
210+
hideInviteAvatars = hideInviteAvatars,
205211
eventSink = ::handleEvents
206212
)
207213
}

features/joinroom/impl/src/main/kotlin/io/element/android/features/joinroom/impl/JoinRoomState.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ data class JoinRoomState(
3131
val cancelKnockAction: AsyncAction<Unit>,
3232
private val applicationName: String,
3333
val knockMessage: String,
34+
val hideInviteAvatars: Boolean,
3435
val eventSink: (JoinRoomEvents) -> Unit
3536
) {
3637
val isJoinActionUnauthorized = joinAction is AsyncAction.Failure && joinAction.error is JoinRoomFailures.UnauthorizedJoin
@@ -57,6 +58,8 @@ data class JoinRoomState(
5758
}
5859
else -> JoinAuthorisationStatus.None
5960
}
61+
62+
val hideAvatarsImages = hideInviteAvatars && joinAuthorisationStatus is JoinAuthorisationStatus.IsInvited
6063
}
6164

6265
@Immutable

0 commit comments

Comments
 (0)