Skip to content

Commit ca686c9

Browse files
committed
Merge branch 'release/25.09.2' into main
2 parents 4410e8a + db1672b commit ca686c9

File tree

884 files changed

+10406
-4437
lines changed

Some content is hidden

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

884 files changed

+10406
-4437
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ captures/
6262
# Android Studio 3 in .gitignore file.
6363
.idea/caches
6464
.idea/copilot
65+
.idea/copilot.*
6566
.idea/inspectionProfiles
6667
# Shelved changes in the IDE
6768
.idea/shelf

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.09.1
2+
=============================
3+
4+
## What's Changed
5+
6+
We have migrated our DI libraries from Dagger and Anvil to Metro. If you need more details on the migration steps, please read the [documentation](https://github.com/element-hq/element-x-android/blob/develop/docs/migration_to_metro.md).
7+
8+
### ✨ Features
9+
* Allow replying to a message with an attachment by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5261
10+
* Add emoji search to the reaction emoji picker by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5255
11+
### 🙌 Improvements
12+
* Spelling correction in Update FeatureFlags.kt by @escix in https://github.com/element-hq/element-x-android/pull/5232
13+
* [a11y] Add content descriptions to room list item indicators by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5236
14+
* [a11y] Add click action to the message bottom sheet handle by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5228
15+
### 🐛 Bugfixes
16+
* Reload member list after moderation actions by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5268
17+
* Restore view log code by @bmarty in https://github.com/element-hq/element-x-android/pull/5294
18+
* Detect mime type when picking a file by @bmarty in https://github.com/element-hq/element-x-android/pull/5291
19+
### 🗣 Translations
20+
* Sync Strings by @ElementBot in https://github.com/element-hq/element-x-android/pull/5249
21+
* Sync Strings - new translations to Korean by @ElementBot in https://github.com/element-hq/element-x-android/pull/5286
22+
* Sync Strings by @ElementBot in https://github.com/element-hq/element-x-android/pull/5290
23+
### 🧱 Build
24+
* Iterate on build chain by @bmarty in https://github.com/element-hq/element-x-android/pull/5272
25+
* Cleanup our DI solution and add documentation about the migration to Metro by @bmarty in https://github.com/element-hq/element-x-android/pull/5287
26+
* Revert agp to 8.11 by @bmarty in https://github.com/element-hq/element-x-android/pull/5311
27+
### 🚧 In development 🚧
28+
* Space: add content in home screen by @bmarty in https://github.com/element-hq/element-x-android/pull/5273
29+
* Hide the home navigation bar if the user is not a member of any Space. by @bmarty in https://github.com/element-hq/element-x-android/pull/5292
30+
### Dependency upgrades
31+
* Update dependency org.maplibre.gl:android-sdk to v11.13.1 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5239
32+
* Update dependency com.google.firebase:firebase-bom to v34.2.0 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5245
33+
* Update dependency com.posthog:posthog-android to v3.21.0 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5238
34+
* Update dependency org.matrix.rustcomponents:sdk-android to v25.9.1 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5251
35+
* Update plugin sonarqube to v6.3.1.5724 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5235
36+
* Update android.gradle.plugin to v8.12.2 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5244
37+
* Update dependency io.element.android:emojibase-bindings to v1.4.3 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5250
38+
* Update actions/setup-python action to v6 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5270
39+
* Update dependency com.posthog:posthog-android to v3.21.1 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5275
40+
* Migrate Anvil KSP to Metro by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5253
41+
* Update actions/github-script action to v8 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5284
42+
* Update codecov/codecov-action action to v5.5.1 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5274
43+
* Update dependency io.sentry:sentry-android to v8.21.0 by @renovate[bot] in https://github.com/element-hq/element-x-android/pull/5293
44+
### Others
45+
* Remove LoginUserStory. by @bmarty in https://github.com/element-hq/element-x-android/pull/5237
46+
* Update state in runUpdatingState when CancellationException occurs by @jbrenorv in https://github.com/element-hq/element-x-android/pull/5243
47+
* Refactor: Move InMemorySessionStore to test module by @bmarty in https://github.com/element-hq/element-x-android/pull/5252
48+
* Enable `largeHeap` option to have a larger max heap size by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5258
49+
* Set a custom request config for the Client by @jmartinesp in https://github.com/element-hq/element-x-android/pull/5266
50+
* Set shortcut ID on received notifications to make them appear as a Conversation by @frebib in https://github.com/element-hq/element-x-android/pull/5192
51+
* Improve management of shortcut ids. by @bmarty in https://github.com/element-hq/element-x-android/pull/5303
52+
53+
## New Contributors
54+
* @escix made their first contribution in https://github.com/element-hq/element-x-android/pull/5232
55+
* @jbrenorv made their first contribution in https://github.com/element-hq/element-x-android/pull/5243
56+
57+
**Full Changelog**: https://github.com/element-hq/element-x-android/compare/v25.09.0...v25.09.1
58+
159
Changes in Element X v25.09.0
260
=============================
361

app/build.gradle.kts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import extension.koverDependencies
2424
import extension.locales
2525
import extension.setupDependencyInjection
2626
import extension.setupKover
27+
import extension.testCommonDependencies
2728
import java.util.Locale
2829

2930
plugins {
@@ -290,15 +291,9 @@ dependencies {
290291

291292
implementation(libs.matrix.emojibase.bindings)
292293

293-
testImplementation(libs.test.junit)
294-
testImplementation(libs.test.robolectric)
295-
testImplementation(libs.coroutines.test)
296-
testImplementation(libs.molecule.runtime)
297-
testImplementation(libs.test.truth)
298-
testImplementation(libs.test.turbine)
294+
testCommonDependencies(libs)
299295
testImplementation(projects.libraries.matrix.test)
300296
testImplementation(projects.services.toolbox.test)
301-
testImplementation(projects.tests.testutils)
302297

303298
koverDependencies()
304299
}

app/src/main/res/xml/locales_config.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<locale android:name="el"/>
1010
<locale android:name="en"/>
1111
<locale android:name="en_US"/>
12+
<locale android:name="eo"/>
1213
<locale android:name="es"/>
1314
<locale android:name="et"/>
1415
<locale android:name="eu"/>

appnav/build.gradle.kts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import extension.allFeaturesApi
1111
import extension.setupDependencyInjection
12+
import extension.testCommonDependencies
1213

1314
plugins {
1415
id("io.element.android-compose-library")
@@ -42,30 +43,21 @@ dependencies {
4243

4344
implementation(projects.features.ftue.api)
4445
implementation(projects.features.share.api)
45-
implementation(projects.features.viewfolder.api)
4646

4747
implementation(projects.services.apperror.impl)
4848
implementation(projects.services.appnavstate.api)
4949
implementation(projects.services.analytics.api)
5050

51-
testImplementation(libs.test.junit)
52-
testImplementation(libs.test.robolectric)
53-
testImplementation(libs.coroutines.test)
54-
testImplementation(libs.molecule.runtime)
55-
testImplementation(libs.test.truth)
56-
testImplementation(libs.test.turbine)
51+
testCommonDependencies(libs)
5752
testImplementation(projects.features.login.test)
5853
testImplementation(projects.libraries.matrix.test)
5954
testImplementation(projects.libraries.oidc.test)
6055
testImplementation(projects.libraries.preferences.test)
6156
testImplementation(projects.libraries.push.test)
6257
testImplementation(projects.libraries.pushproviders.test)
6358
testImplementation(projects.features.networkmonitor.test)
64-
testImplementation(projects.tests.testutils)
6559
testImplementation(projects.features.rageshake.test)
6660
testImplementation(projects.services.appnavstate.test)
6761
testImplementation(projects.services.analytics.test)
6862
testImplementation(projects.services.toolbox.test)
69-
testImplementation(libs.test.appyx.junit)
70-
testImplementation(libs.test.arch.core)
7163
}

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

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ import io.element.android.features.ftue.api.FtueEntryPoint
5252
import io.element.android.features.ftue.api.state.FtueService
5353
import io.element.android.features.ftue.api.state.FtueState
5454
import io.element.android.features.home.api.HomeEntryPoint
55-
import io.element.android.features.logout.api.LogoutEntryPoint
5655
import io.element.android.features.networkmonitor.api.NetworkMonitor
5756
import io.element.android.features.networkmonitor.api.NetworkStatus
5857
import io.element.android.features.preferences.api.PreferencesEntryPoint
5958
import io.element.android.features.roomdirectory.api.RoomDescription
6059
import io.element.android.features.roomdirectory.api.RoomDirectoryEntryPoint
6160
import io.element.android.features.securebackup.api.SecureBackupEntryPoint
6261
import io.element.android.features.share.api.ShareEntryPoint
62+
import io.element.android.features.space.api.SpaceEntryPoint
6363
import io.element.android.features.startchat.api.StartChatEntryPoint
6464
import io.element.android.features.userprofile.api.UserProfileEntryPoint
6565
import io.element.android.features.verifysession.api.IncomingVerificationEntryPoint
@@ -118,7 +118,6 @@ class LoggedInFlowNode(
118118
private val shareEntryPoint: ShareEntryPoint,
119119
private val matrixClient: MatrixClient,
120120
private val sendingQueue: SendQueues,
121-
private val logoutEntryPoint: LogoutEntryPoint,
122121
private val incomingVerificationEntryPoint: IncomingVerificationEntryPoint,
123122
private val mediaPreviewConfigMigration: MediaPreviewConfigMigration,
124123
private val sessionEnterpriseService: SessionEnterpriseService,
@@ -276,9 +275,6 @@ class LoggedInFlowNode(
276275
@Parcelize
277276
data class IncomingShare(val intent: Intent) : NavTarget
278277

279-
@Parcelize
280-
data object LogoutForNativeSlidingSyncMigrationNeeded : NavTarget
281-
282278
@Parcelize
283279
data class IncomingVerificationRequest(val data: VerificationRequest.Incoming) : NavTarget
284280
}
@@ -323,18 +319,14 @@ class LoggedInFlowNode(
323319
override fun onReportBugClick() {
324320
plugins<Callback>().forEach { it.onOpenBugReport() }
325321
}
326-
327-
override fun onLogoutForNativeSlidingSyncMigrationNeeded() {
328-
backstack.push(NavTarget.LogoutForNativeSlidingSyncMigrationNeeded)
329-
}
330322
}
331323
homeEntryPoint
332324
.nodeBuilder(this, buildContext)
333325
.callback(callback)
334326
.build()
335327
}
336328
is NavTarget.Room -> {
337-
val callback = object : JoinedRoomLoadedFlowNode.Callback {
329+
val joinedRoomCallback = object : JoinedRoomLoadedFlowNode.Callback {
338330
override fun onOpenRoom(roomId: RoomId, serverNames: List<String>) {
339331
backstack.push(NavTarget.Room(roomId.toRoomIdOrAlias(), serverNames))
340332
}
@@ -373,14 +365,19 @@ class LoggedInFlowNode(
373365
backstack.push(NavTarget.Settings(PreferencesEntryPoint.InitialTarget.NotificationSettings))
374366
}
375367
}
368+
val spaceCallback = object : SpaceEntryPoint.Callback {
369+
override fun onOpenRoom(roomId: RoomId) {
370+
backstack.push(NavTarget.Room(roomId.toRoomIdOrAlias()))
371+
}
372+
}
376373
val inputs = RoomFlowNode.Inputs(
377374
roomIdOrAlias = navTarget.roomIdOrAlias,
378375
roomDescription = Optional.ofNullable(navTarget.roomDescription),
379376
serverNames = navTarget.serverNames,
380377
trigger = Optional.ofNullable(navTarget.trigger),
381378
initialElement = navTarget.initialElement
382379
)
383-
createNode<RoomFlowNode>(buildContext, plugins = listOf(inputs, callback))
380+
createNode<RoomFlowNode>(buildContext, plugins = listOf(inputs, joinedRoomCallback, spaceCallback))
384381
}
385382
is NavTarget.UserProfile -> {
386383
val callback = object : UserProfileEntryPoint.Callback {
@@ -448,8 +445,7 @@ class LoggedInFlowNode(
448445
.build()
449446
}
450447
NavTarget.Ftue -> {
451-
ftueEntryPoint.nodeBuilder(this, buildContext)
452-
.build()
448+
ftueEntryPoint.createNode(this, buildContext)
453449
}
454450
NavTarget.RoomDirectorySearch -> {
455451
roomDirectoryEntryPoint.nodeBuilder(this, buildContext)
@@ -480,17 +476,6 @@ class LoggedInFlowNode(
480476
.params(ShareEntryPoint.Params(intent = navTarget.intent))
481477
.build()
482478
}
483-
is NavTarget.LogoutForNativeSlidingSyncMigrationNeeded -> {
484-
val callback = object : LogoutEntryPoint.Callback {
485-
override fun onChangeRecoveryKeyClick() {
486-
backstack.push(NavTarget.SecureBackup())
487-
}
488-
}
489-
490-
logoutEntryPoint.nodeBuilder(this, buildContext)
491-
.callback(callback)
492-
.build()
493-
}
494479
is NavTarget.IncomingVerificationRequest -> {
495480
incomingVerificationEntryPoint.nodeBuilder(this, buildContext)
496481
.params(IncomingVerificationEntryPoint.Params(navTarget.data))

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

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,20 @@ import io.element.android.features.login.api.accesscontrol.AccountProviderAccess
3939
import io.element.android.features.rageshake.api.bugreport.BugReportEntryPoint
4040
import io.element.android.features.rageshake.api.reporter.BugReporter
4141
import io.element.android.features.signedout.api.SignedOutEntryPoint
42-
import io.element.android.features.viewfolder.api.ViewFolderEntryPoint
4342
import io.element.android.libraries.architecture.BackstackView
4443
import io.element.android.libraries.architecture.BaseFlowNode
4544
import io.element.android.libraries.architecture.createNode
4645
import io.element.android.libraries.architecture.waitForChildAttached
4746
import io.element.android.libraries.core.uri.ensureProtocol
4847
import io.element.android.libraries.deeplink.api.DeeplinkData
4948
import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator
50-
import io.element.android.libraries.matrix.api.auth.MatrixAuthenticationService
5149
import io.element.android.libraries.matrix.api.core.SessionId
5250
import io.element.android.libraries.matrix.api.core.toRoomIdOrAlias
5351
import io.element.android.libraries.matrix.api.permalink.PermalinkData
5452
import io.element.android.libraries.oidc.api.OidcAction
5553
import io.element.android.libraries.oidc.api.OidcActionFlow
5654
import io.element.android.libraries.sessionstorage.api.LoggedInState
55+
import io.element.android.libraries.sessionstorage.api.SessionStore
5756
import kotlinx.coroutines.flow.distinctUntilChanged
5857
import kotlinx.coroutines.flow.launchIn
5958
import kotlinx.coroutines.flow.onEach
@@ -65,13 +64,12 @@ import timber.log.Timber
6564
class RootFlowNode(
6665
@Assisted val buildContext: BuildContext,
6766
@Assisted plugins: List<Plugin>,
68-
private val authenticationService: MatrixAuthenticationService,
67+
private val sessionStore: SessionStore,
6968
private val accountProviderAccessControl: AccountProviderAccessControl,
7069
private val navStateFlowFactory: RootNavStateFlowFactory,
7170
private val matrixSessionCache: MatrixSessionCache,
7271
private val presenter: RootPresenter,
7372
private val bugReportEntryPoint: BugReportEntryPoint,
74-
private val viewFolderEntryPoint: ViewFolderEntryPoint,
7573
private val signedOutEntryPoint: SignedOutEntryPoint,
7674
private val intentResolver: IntentResolver,
7775
private val oidcActionFlow: OidcActionFlow,
@@ -154,7 +152,7 @@ class RootFlowNode(
154152
onSuccess: (SessionId) -> Unit,
155153
onFailure: () -> Unit
156154
) {
157-
val latestSessionId = authenticationService.getLatestSessionId()
155+
val latestSessionId = sessionStore.getLatestSessionId()
158156
if (latestSessionId == null) {
159157
onFailure()
160158
return
@@ -200,11 +198,6 @@ class RootFlowNode(
200198

201199
@Parcelize
202200
data object BugReport : NavTarget
203-
204-
@Parcelize
205-
data class ViewLogs(
206-
val rootPath: String,
207-
) : NavTarget
208201
}
209202

210203
override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node {
@@ -244,31 +237,12 @@ class RootFlowNode(
244237
NavTarget.SplashScreen -> splashNode(buildContext)
245238
NavTarget.BugReport -> {
246239
val callback = object : BugReportEntryPoint.Callback {
247-
override fun onBugReportSent() {
248-
backstack.pop()
249-
}
250-
251-
override fun onViewLogs(basePath: String) {
252-
backstack.push(NavTarget.ViewLogs(rootPath = basePath))
253-
}
254-
}
255-
bugReportEntryPoint
256-
.nodeBuilder(this, buildContext)
257-
.callback(callback)
258-
.build()
259-
}
260-
is NavTarget.ViewLogs -> {
261-
val callback = object : ViewFolderEntryPoint.Callback {
262240
override fun onDone() {
263241
backstack.pop()
264242
}
265243
}
266-
val params = ViewFolderEntryPoint.Params(
267-
rootPath = navTarget.rootPath,
268-
)
269-
viewFolderEntryPoint
244+
bugReportEntryPoint
270245
.nodeBuilder(this, buildContext)
271-
.params(params)
272246
.callback(callback)
273247
.build()
274248
}
@@ -294,7 +268,7 @@ class RootFlowNode(
294268

295269
private suspend fun onLoginLink(params: LoginParams) {
296270
// Is there a session already?
297-
val latestSessionId = authenticationService.getLatestSessionId()
271+
val latestSessionId = sessionStore.getLatestSessionId()
298272
if (latestSessionId == null) {
299273
// No session, open login
300274
if (accountProviderAccessControl.isAllowedToConnectToAccountProvider(params.accountProvider.ensureProtocol())) {
@@ -311,7 +285,7 @@ class RootFlowNode(
311285

312286
private suspend fun onIncomingShare(intent: Intent) {
313287
// Is there a session already?
314-
val latestSessionId = authenticationService.getLatestSessionId()
288+
val latestSessionId = sessionStore.getLatestSessionId()
315289
if (latestSessionId == null) {
316290
// No session, open login
317291
switchToNotLoggedInFlow(null)
@@ -368,3 +342,5 @@ class RootFlowNode(
368342
.attachSession()
369343
}
370344
}
345+
346+
private suspend fun SessionStore.getLatestSessionId() = getLatestSession()?.userId?.let(::SessionId)

appnav/src/main/kotlin/io/element/android/appnav/di/RoomComponentFactory.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ package io.element.android.appnav.di
99

1010
import io.element.android.libraries.matrix.api.room.JoinedRoom
1111

12-
interface RoomComponentFactory {
12+
fun interface RoomComponentFactory {
1313
fun create(room: JoinedRoom): Any
1414
}

0 commit comments

Comments
 (0)