Skip to content

Commit 1ad7a1f

Browse files
committed
Merge branch 'release/0.7.0' into main
2 parents 996147e + 4450529 commit 1ad7a1f

File tree

197 files changed

+1306
-876
lines changed

Some content is hidden

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

197 files changed

+1306
-876
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ captures/
6565
.idea/shelf
6666
.idea/sonarlint
6767

68+
# .kotlin folder
69+
.kotlin
70+
6871
# Keystore files
6972
# Uncomment the following lines if you do not want to check your keystore files in.
7073
#*.jks

.idea/kotlinc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGES.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,77 @@
1+
Changes in Element X v0.6.5 (2024-10-09)
2+
========================================
3+
4+
## What's Changed
5+
### ✨ Features
6+
* Add developer setting to hide images in the timeline by @bmarty in https://github.com/element-hq/element-x-android/pull/3592
7+
* Warn the user when unverified user has changed their identity by @bmarty in https://github.com/element-hq/element-x-android/pull/3621
8+
### 🙌 Improvements
9+
* Handle no network error when starting Element Call. by @bmarty in https://github.com/element-hq/element-x-android/pull/3527
10+
### 🐛 Bugfixes
11+
* Fix room settings not treating unencrypted DMs as DMs by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3545
12+
* Fix crash when aspectRatio is null. by @bmarty in https://github.com/element-hq/element-x-android/pull/3561
13+
* Don't delete uploaded logs by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3540
14+
* Don't display security banner for unknown RecoveryState by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3579
15+
* Fix the logic of the room list banner state by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3615
16+
### 🗣 Translations
17+
* Sync Strings by @ElementBot in https://github.com/element-hq/element-x-android/pull/3560
18+
* Sync Strings - import translations to Persian by @ElementBot in https://github.com/element-hq/element-x-android/pull/3612
19+
### 🧱 Build
20+
* Introduce ModulesConfig by @bmarty in https://github.com/element-hq/element-x-android/pull/3530
21+
* Centralise the DI code generation logic by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3562
22+
* Update Gradle impl module template with `setupAnvil()` call by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3563
23+
* Use Anvil KSP instead of the Square KAPT one by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3564
24+
* Upgrade the used JDK in the project to v21 by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3582
25+
* Merge unit, screenshot tests and coverage in a single CI call by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3593
26+
* Disable configuration cache in the CI by default by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3601
27+
* Fix screenshot recording in CI by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3607
28+
* Ensure the CI compile and execute all the unit tests. by @bmarty in https://github.com/element-hq/element-x-android/pull/3617
29+
### Dependency upgrades
30+
* Update dependency androidx.compose:compose-bom to v2024.09.00 by @renovate in https://github.com/element-hq/element-x-android/pull/3399
31+
* Update dependency androidx.compose:compose-bom to v2024.09.02 by @renovate in https://github.com/element-hq/element-x-android/pull/3544
32+
* Update dependency io.element.android:compound-android to v0.1.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3524
33+
* Update dependency com.google.firebase:firebase-bom to v33.3.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3549
34+
* Update dependency org.maplibre.gl:android-sdk to v11.5.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3550
35+
* Update dependency org.maplibre.gl:android-plugin-annotation-v9 to v3.0.1 by @renovate in https://github.com/element-hq/element-x-android/pull/3505
36+
* Update dependency androidx.webkit:webkit to v1.12.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3520
37+
* Update dependency com.posthog:posthog-android to v3.7.5 by @renovate in https://github.com/element-hq/element-x-android/pull/3546
38+
* Update gradle-update/update-gradle-wrapper-action action to v2 by @renovate in https://github.com/element-hq/element-x-android/pull/3551
39+
* Update dependency com.lemonappdev:konsist to v0.16.1 by @renovate in https://github.com/element-hq/element-x-android/pull/3371
40+
* Update android.gradle.plugin to v8.6.1 by @renovate in https://github.com/element-hq/element-x-android/pull/3504
41+
* Update dependency org.matrix.rustcomponents:sdk-android to v0.2.49 by @renovate in https://github.com/element-hq/element-x-android/pull/3553
42+
* Update lifecycle to v2.8.6 by @renovate in https://github.com/element-hq/element-x-android/pull/3398
43+
* Update dependency com.google.accompanist:accompanist-permissions to v0.36.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3400
44+
* Update dependency org.matrix.rustcomponents:sdk-android to v0.2.50 by @renovate in https://github.com/element-hq/element-x-android/pull/3565
45+
* Update dependency com.google.firebase:firebase-bom to v33.4.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3578
46+
* Update android.gradle.plugin to v8.7.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3577
47+
* Update dependency com.posthog:posthog-android to v3.8.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3591
48+
* dependency: Bump rust sdk to 0.2.51 by @BillCarsonFr in https://github.com/element-hq/element-x-android/pull/3602
49+
* chore(deps): update dependencyanalysis to v2.1.3 by @renovate in https://github.com/element-hq/element-x-android/pull/3559
50+
* Update wysiwyg to v2.37.13 by @renovate in https://github.com/element-hq/element-x-android/pull/3596
51+
* fix(deps): update dependency io.nlopez.compose.rules:detekt to v0.4.15 by @renovate in https://github.com/element-hq/element-x-android/pull/3595
52+
* fix(deps): update dependency com.google.testparameterinjector:test-parameter-injector to v1.18 by @renovate in https://github.com/element-hq/element-x-android/pull/3606
53+
* fix(deps): update dependency com.squareup:kotlinpoet-ksp to v1.18.1 by @renovate in https://github.com/element-hq/element-x-android/pull/3580
54+
* Update dependency org.matrix.rustcomponents:sdk-android to v0.2.52 by @renovate in https://github.com/element-hq/element-x-android/pull/3619
55+
* SDK 0.2.53 19b9a73ecc3e31d502dbf0c5850bfdfaddf02afe by @bmarty in https://github.com/element-hq/element-x-android/pull/3622
56+
* Update dependency org.maplibre.gl:android-sdk to v11.5.1 by @renovate in https://github.com/element-hq/element-x-android/pull/3608
57+
### Others
58+
* rename invisible flag to onlySignedDeviceIsolation flag by @BillCarsonFr in https://github.com/element-hq/element-x-android/pull/3542
59+
* Fix image viewer glitch by @ganfra in https://github.com/element-hq/element-x-android/pull/3537
60+
* Prefix message sent by the current user by `You` instead of the sender name. by @bmarty in https://github.com/element-hq/element-x-android/pull/3547
61+
* timeline : remove animateItem by @ganfra in https://github.com/element-hq/element-x-android/pull/3548
62+
* Fix a couple of build-time warnings in Gradle output by @frebib in https://github.com/element-hq/element-x-android/pull/3349
63+
* Use MSC2530 filename when loading media by @frebib in https://github.com/element-hq/element-x-android/pull/3567
64+
* Prevent crash with duplicate room suggestion by @frebib in https://github.com/element-hq/element-x-android/pull/3576
65+
* Add unit tests on TimelineItemsSubscriber by @bmarty in https://github.com/element-hq/element-x-android/pull/3554
66+
* Fix tests on develop by @bmarty in https://github.com/element-hq/element-x-android/pull/3585
67+
* Timeline better jump to behaviours by @ganfra in https://github.com/element-hq/element-x-android/pull/3597
68+
* Fix building the app using a local SDK. by @bmarty in https://github.com/element-hq/element-x-android/pull/3604
69+
* crypto: Use OnlySigned isolation flag to setup decryption trust req. by @BillCarsonFr in https://github.com/element-hq/element-x-android/pull/3569
70+
* Fix black-on-black status bars with hidden media by @frebib in https://github.com/element-hq/element-x-android/pull/3611
71+
* Remove supportSlidingSync boolean. by @bmarty in https://github.com/element-hq/element-x-android/pull/3609
72+
* Ensure that `Presenter`s do not depend on other presenters. by @bmarty in https://github.com/element-hq/element-x-android/pull/3618
73+
* Do not render pin violation in clear rooms. by @bmarty in https://github.com/element-hq/element-x-android/pull/3630
74+
175
Changes in Element X v0.6.4 (2024-09-25)
276
========================================
377

appconfig/src/main/kotlin/io/element/android/appconfig/LearnMoreConfig.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
package io.element.android.appconfig
99

1010
object LearnMoreConfig {
11+
const val ENCRYPTION_URL: String = "https://element.io/help#encryption"
1112
const val SECURE_BACKUP_URL: String = "https://element.io/help#encryption5"
1213
const val IDENTITY_CHANGE_URL: String = "https://element.io/help#encryption18"
1314
}

appnav/src/main/kotlin/io/element/android/appnav/room/RoomFlowNode.kt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ import io.element.android.libraries.matrix.api.MatrixClient
4545
import io.element.android.libraries.matrix.api.core.RoomAlias
4646
import io.element.android.libraries.matrix.api.core.RoomId
4747
import io.element.android.libraries.matrix.api.core.RoomIdOrAlias
48+
import io.element.android.libraries.matrix.api.core.toRoomIdOrAlias
49+
import io.element.android.libraries.matrix.api.getRoomInfoFlow
4850
import io.element.android.libraries.matrix.api.room.CurrentUserMembership
4951
import io.element.android.libraries.matrix.api.room.alias.ResolvedRoomAlias
5052
import kotlinx.coroutines.flow.combine
@@ -120,12 +122,9 @@ class RoomFlowNode @AssistedInject constructor(
120122
}
121123

122124
private fun subscribeToRoomInfoFlow(roomId: RoomId, serverNames: List<String>) {
123-
val roomInfoFlow = client.getRoomInfoFlow(
124-
roomId = roomId
125-
).map { it.getOrNull() }
126-
127-
val isSpaceFlow = roomInfoFlow.map { it?.isSpace.orFalse() }.distinctUntilChanged()
128-
val currentMembershipFlow = roomInfoFlow.map { it?.currentUserMembership }.distinctUntilChanged()
125+
val roomInfoFlow = client.getRoomInfoFlow(roomIdOrAlias = roomId.toRoomIdOrAlias())
126+
val isSpaceFlow = roomInfoFlow.map { it.getOrNull()?.isSpace.orFalse() }.distinctUntilChanged()
127+
val currentMembershipFlow = roomInfoFlow.map { it.getOrNull()?.currentUserMembership }.distinctUntilChanged()
129128
combine(currentMembershipFlow, isSpaceFlow) { membership, isSpace ->
130129
Timber.d("Room membership: $membership")
131130
when (membership) {

appnav/src/test/kotlin/io/element/android/appnav/loggedin/LoggedInPresenterTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ class LoggedInPresenterTest {
478478
distributors = listOf(Distributor("aDistributorValue1", "aDistributorName1")),
479479
currentDistributor = { null },
480480
),
481-
registerWithLambda: suspend (MatrixClient, PushProvider, Distributor) -> Result<Unit> = { _, _, _ ->
481+
registerWithLambda: (MatrixClient, PushProvider, Distributor) -> Result<Unit> = { _, _, _ ->
482482
Result.success(Unit)
483483
},
484484
selectPushProviderLambda: (MatrixClient, PushProvider) -> Unit = { _, _ -> lambdaError() },

build.gradle.kts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ plugins {
1818
alias(libs.plugins.android.application) apply false
1919
alias(libs.plugins.android.library) apply false
2020
alias(libs.plugins.kotlin.android) apply false
21+
alias(libs.plugins.compose.compiler) apply false
2122
alias(libs.plugins.ksp) apply false
2223
alias(libs.plugins.anvil) apply false
2324
alias(libs.plugins.kotlin.jvm) apply false
@@ -82,20 +83,15 @@ allprojects {
8283
}
8384

8485
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
85-
// Warnings are potential errors, so stop ignoring them
86-
// This is disabled by default, but the CI will enforce this.
87-
// You can override by passing `-PallWarningsAsErrors=true` in the command line
88-
// Or add a line with "allWarningsAsErrors=true" in your ~/.gradle/gradle.properties file
89-
kotlinOptions.allWarningsAsErrors = project.properties["allWarningsAsErrors"] == "true"
90-
91-
kotlinOptions {
92-
/*
86+
compilerOptions {
87+
// Warnings are potential errors, so stop ignoring them
88+
// This is disabled by default, but the CI will enforce this.
89+
// You can override by passing `-PallWarningsAsErrors=true` in the command line
90+
// Or add a line with "allWarningsAsErrors=true" in your ~/.gradle/gradle.properties file
91+
allWarningsAsErrors = project.properties["allWarningsAsErrors"] == "true"
92+
9393
// Uncomment to suppress Compose Kotlin compiler compatibility warning
94-
freeCompilerArgs += listOf(
95-
"-P",
96-
"plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true"
97-
)
98-
*/
94+
// freeCompilerArgs.addAll(listOf("-P", "plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true"))
9995
}
10096
}
10197
}
@@ -192,19 +188,23 @@ subprojects {
192188

193189
subprojects {
194190
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
195-
kotlinOptions {
191+
compilerOptions {
196192
if (project.findProperty("composeCompilerReports") == "true") {
197-
freeCompilerArgs += listOf(
198-
"-P",
199-
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
200-
"${project.layout.buildDirectory.asFile.get().absolutePath}/compose_compiler"
193+
freeCompilerArgs.addAll(
194+
listOf(
195+
"-P",
196+
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
197+
"${project.layout.buildDirectory.asFile.get().absolutePath}/compose_compiler"
198+
)
201199
)
202200
}
203201
if (project.findProperty("composeCompilerMetrics") == "true") {
204-
freeCompilerArgs += listOf(
205-
"-P",
206-
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
207-
"${project.layout.buildDirectory.asFile.get().absolutePath}/compose_compiler"
202+
freeCompilerArgs.addAll(
203+
listOf(
204+
"-P",
205+
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
206+
"${project.layout.buildDirectory.asFile.get().absolutePath}/compose_compiler"
207+
)
208208
)
209209
}
210210
}
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 performance improvement.
2+
Full changelog: https://github.com/element-hq/element-x-android/releases

features/cachecleaner/api/build.gradle.kts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import extension.setupAnvil
2+
13
/*
24
* Copyright 2023, 2024 New Vector Ltd.
35
*
@@ -7,13 +9,14 @@
79

810
plugins {
911
id("io.element.android-library")
10-
alias(libs.plugins.anvil)
1112
}
1213

1314
android {
1415
namespace = "io.element.android.features.cachecleaner.api"
1516
}
1617

18+
setupAnvil()
19+
1720
dependencies {
1821
implementation(projects.libraries.architecture)
1922
implementation(libs.androidx.startup)

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
package io.element.android.features.call.impl.ui
99

1010
import android.annotation.SuppressLint
11+
import android.util.Log
1112
import android.view.ViewGroup
13+
import android.webkit.ConsoleMessage
1214
import android.webkit.PermissionRequest
1315
import android.webkit.WebChromeClient
1416
import android.webkit.WebView
@@ -43,6 +45,7 @@ import io.element.android.libraries.designsystem.theme.components.Scaffold
4345
import io.element.android.libraries.designsystem.theme.components.Text
4446
import io.element.android.libraries.designsystem.theme.components.TopAppBar
4547
import io.element.android.libraries.ui.strings.CommonStrings
48+
import timber.log.Timber
4649

4750
typealias RequestPermissionCallback = (Array<String>) -> Unit
4851

@@ -189,6 +192,25 @@ private fun WebView.setup(
189192
override fun onPermissionRequest(request: PermissionRequest) {
190193
onPermissionsRequested(request)
191194
}
195+
196+
override fun onConsoleMessage(consoleMessage: ConsoleMessage): Boolean {
197+
val priority = when (consoleMessage.messageLevel()) {
198+
ConsoleMessage.MessageLevel.ERROR -> Log.ERROR
199+
ConsoleMessage.MessageLevel.WARNING -> Log.WARN
200+
else -> Log.DEBUG
201+
}
202+
Timber.tag("WebView").log(
203+
priority = priority,
204+
message = buildString {
205+
append(consoleMessage.sourceId())
206+
append(":")
207+
append(consoleMessage.lineNumber())
208+
append(" ")
209+
append(consoleMessage.message())
210+
},
211+
)
212+
return true
213+
}
192214
}
193215
}
194216

0 commit comments

Comments
 (0)