Skip to content

Commit 1952bfc

Browse files
committed
Merge branch 'release/0.3.2'
2 parents 07dfdb3 + 6c83cb5 commit 1952bfc

File tree

688 files changed

+6159
-2483
lines changed

Some content is hidden

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

688 files changed

+6159
-2483
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
name: elementx-debug
5656
path: |
5757
app/build/outputs/apk/debug/*.apk
58-
- uses: rnkdsh/[email protected].3
58+
- uses: rnkdsh/[email protected].4
5959
id: diawi
6060
# Do not fail the whole build if Diawi upload fails
6161
continue-on-error: true

.github/workflows/maestro.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
ELEMENT_ANDROID_MAPTILER_API_KEY: ${{ secrets.MAPTILER_KEY }}
4141
ELEMENT_ANDROID_MAPTILER_LIGHT_MAP_ID: ${{ secrets.MAPTILER_LIGHT_MAP_ID }}
4242
ELEMENT_ANDROID_MAPTILER_DARK_MAP_ID: ${{ secrets.MAPTILER_DARK_MAP_ID }}
43-
- uses: mobile-dev-inc/action-maestro-cloud@v1.6.0
43+
- uses: mobile-dev-inc/action-maestro-cloud@v1.8.0
4444
with:
4545
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
4646
# Doc says (https://github.com/mobile-dev-inc/action-maestro-cloud#android):

.maestro/tests/settings/settings.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ appId: ${APP_ID}
1616

1717
- tapOn:
1818
text: "Report a problem"
19-
- assertVisible: "Report a bug"
19+
- assertVisible: "Report a problem"
2020
- back
2121

2222
- tapOn:

CHANGES.md

+25
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
Changes in Element X v0.3.2 (2023-11-22)
2+
========================================
3+
4+
Features ✨
5+
----------
6+
- Add ongoing call indicator to rooms lists items. ([#1158](https://github.com/vector-im/element-x-android/issues/1158))
7+
- Add support for typing mentions in the message composer. ([#1453](https://github.com/vector-im/element-x-android/issues/1453))
8+
- Add intentional mentions to messages. This needs to be enabled in developer options since it's disabled by default. ([#1591](https://github.com/vector-im/element-x-android/issues/1591))
9+
- Update voice message recording behaviour. Instead of holding the record button, users can now tap the record button to start recording and tap again to stop recording. ([#1784](https://github.com/vector-im/element-x-android/issues/1784))
10+
11+
Bugfixes 🐛
12+
----------
13+
- Always ensure media temp dir exists ([#1790](https://github.com/vector-im/element-x-android/issues/1790))
14+
15+
Other changes
16+
-------------
17+
- Update icons and move away from `PreferenceText` components. ([#1718](https://github.com/vector-im/element-x-android/issues/1718))
18+
- Add item "This is the beginning of..." at the beginning of the timeline. ([#1801](https://github.com/vector-im/element-x-android/issues/1801))
19+
- LockScreen : rework LoggedInFlowNode and back management when locked. ([#1806](https://github.com/vector-im/element-x-android/issues/1806))
20+
- Suppress usage of removeTimeline method. ([#1824](https://github.com/vector-im/element-x-android/issues/1824))
21+
- Remove Element Call feature flag, it's now always enabled.
22+
- Reverted the EC base URL to `https://call.element.io`.
23+
- Moved the option to override this URL to developer settings from advanced settings.
24+
25+
126
Changes in Element X v0.3.1 (2023-11-09)
227
========================================
328

anvilcodegen/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dependencies {
2323
implementation(projects.anvilannotations)
2424
api(libs.anvil.compiler.api)
2525
implementation(libs.anvil.compiler.utils)
26-
implementation("com.squareup:kotlinpoet:1.14.2")
26+
implementation(libs.kotlinpoet)
2727
implementation(libs.dagger)
2828
compileOnly(libs.google.autoservice.annotations)
2929
kapt(libs.google.autoservice)

app/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ plugins {
2727
alias(libs.plugins.anvil)
2828
alias(libs.plugins.ksp)
2929
alias(libs.plugins.kapt)
30-
id("com.google.firebase.appdistribution") version "4.0.1"
31-
id("org.jetbrains.kotlinx.knit") version "0.4.0"
30+
alias(libs.plugins.firebaseAppDistribution)
31+
alias(libs.plugins.knit)
3232
id("kotlin-parcelize")
3333
// To be able to update the firebase.xml files, uncomment and build the project
3434
// id("com.google.gms.google-services")

app/src/main/kotlin/io/element/android/x/ElementXApplication.kt

+3-5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package io.element.android.x
1818

1919
import android.app.Application
2020
import androidx.startup.AppInitializer
21+
import io.element.android.features.cachecleaner.api.CacheCleanerInitializer
2122
import io.element.android.libraries.di.DaggerComponentOwner
2223
import io.element.android.x.di.AppComponent
2324
import io.element.android.x.di.DaggerAppComponent
@@ -27,17 +28,14 @@ import io.element.android.x.initializer.TracingInitializer
2728

2829
class ElementXApplication : Application(), DaggerComponentOwner {
2930

30-
private lateinit var appComponent: AppComponent
31-
32-
override val daggerComponent: Any
33-
get() = appComponent
31+
override val daggerComponent: AppComponent = DaggerAppComponent.factory().create(this)
3432

3533
override fun onCreate() {
3634
super.onCreate()
37-
appComponent = DaggerAppComponent.factory().create(applicationContext)
3835
AppInitializer.getInstance(this).apply {
3936
initializeComponent(CrashInitializer::class.java)
4037
initializeComponent(TracingInitializer::class.java)
38+
initializeComponent(CacheCleanerInitializer::class.java)
4139
}
4240
logApplicationInfo()
4341
}

app/src/main/kotlin/io/element/android/x/MainActivity.kt

+28-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ import androidx.compose.foundation.layout.fillMaxSize
2525
import androidx.compose.material3.MaterialTheme
2626
import androidx.compose.runtime.Composable
2727
import androidx.compose.runtime.CompositionLocalProvider
28+
import androidx.compose.runtime.collectAsState
29+
import androidx.compose.runtime.getValue
30+
import androidx.compose.runtime.remember
2831
import androidx.compose.ui.Modifier
2932
import androidx.compose.ui.platform.LocalUriHandler
3033
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
@@ -33,10 +36,14 @@ import com.bumble.appyx.core.integration.NodeHost
3336
import com.bumble.appyx.core.integrationpoint.NodeActivity
3437
import com.bumble.appyx.core.plugin.NodeReadyObserver
3538
import io.element.android.features.lockscreen.api.handleSecureFlag
39+
import io.element.android.features.lockscreen.api.isLocked
3640
import io.element.android.libraries.architecture.bindings
3741
import io.element.android.libraries.core.log.logger.LoggerTag
3842
import io.element.android.libraries.designsystem.utils.snackbar.LocalSnackbarDispatcher
3943
import io.element.android.libraries.theme.ElementTheme
44+
import io.element.android.libraries.theme.theme.Theme
45+
import io.element.android.libraries.theme.theme.isDark
46+
import io.element.android.libraries.theme.theme.mapToTheme
4047
import io.element.android.x.di.AppBindings
4148
import io.element.android.x.intent.SafeUriHandler
4249
import timber.log.Timber
@@ -46,7 +53,6 @@ private val loggerTag = LoggerTag("MainActivity")
4653
class MainActivity : NodeActivity() {
4754

4855
private lateinit var mainNode: MainNode
49-
5056
private lateinit var appBindings: AppBindings
5157

5258
override fun onCreate(savedInstanceState: Bundle?) {
@@ -61,9 +67,29 @@ class MainActivity : NodeActivity() {
6167
}
6268
}
6369

70+
@Deprecated("")
71+
override fun onBackPressed() {
72+
// If the app is locked, we need to intercept onBackPressed before it goes to OnBackPressedDispatcher.
73+
// Indeed, otherwise we would need to trick Appyx backstack management everywhere.
74+
// Without this trick, we would get pop operations on the hidden backstack.
75+
if (appBindings.lockScreenService().isLocked) {
76+
// Do not kill the app in this case, just go to background.
77+
moveTaskToBack(false)
78+
} else {
79+
@Suppress("DEPRECATION")
80+
super.onBackPressed()
81+
}
82+
}
83+
6484
@Composable
6585
private fun MainContent(appBindings: AppBindings) {
66-
ElementTheme {
86+
val theme by remember {
87+
appBindings.preferencesStore().getThemeFlow().mapToTheme()
88+
}
89+
.collectAsState(initial = Theme.System)
90+
ElementTheme(
91+
darkTheme = theme.isDark()
92+
) {
6793
CompositionLocalProvider(
6894
LocalSnackbarDispatcher provides appBindings.snackbarDispatcher(),
6995
LocalUriHandler provides SafeUriHandler(this),

app/src/main/kotlin/io/element/android/x/di/AppBindings.kt

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package io.element.android.x.di
1818

1919
import com.squareup.anvil.annotations.ContributesTo
2020
import io.element.android.features.lockscreen.api.LockScreenService
21+
import io.element.android.features.preferences.api.store.PreferencesStore
2122
import io.element.android.features.rageshake.api.reporter.BugReporter
2223
import io.element.android.libraries.designsystem.utils.snackbar.SnackbarDispatcher
2324
import io.element.android.libraries.di.AppScope
@@ -29,4 +30,5 @@ interface AppBindings {
2930
fun tracingService(): TracingService
3031
fun bugReporter(): BugReporter
3132
fun lockScreenService(): LockScreenService
33+
fun preferencesStore(): PreferencesStore
3234
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
package io.element.android.appconfig
1818

1919
object ElementCallConfig {
20-
const val DEFAULT_BASE_URL = "https://call.element.dev"
20+
const val DEFAULT_BASE_URL = "https://call.element.io"
2121
}
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package io.element.android.libraries.push.impl.config
17+
package io.element.android.appconfig
1818

1919
object PushConfig {
2020
/**
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (c) 2023 New Vector Ltd
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package io.element.android.appconfig
18+
19+
object TimelineConfig {
20+
const val maxReadReceiptToDisplay = 3
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright (c) 2023 New Vector Ltd
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package io.element.android.appconfig
18+
19+
import kotlin.time.Duration.Companion.minutes
20+
21+
object VoiceMessageConfig {
22+
val maxVoiceMessageDuration = 30.minutes
23+
}

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

+12-17
Original file line numberDiff line numberDiff line change
@@ -362,23 +362,18 @@ class LoggedInFlowNode @AssistedInject constructor(
362362
override fun View(modifier: Modifier) {
363363
Box(modifier = modifier) {
364364
val lockScreenState by lockScreenStateService.lockState.collectAsState()
365-
when (lockScreenState) {
366-
LockScreenLockState.Unlocked -> {
367-
Children(
368-
navModel = backstack,
369-
modifier = Modifier,
370-
// Animate navigation to settings and to a room
371-
transitionHandler = rememberDefaultTransitionHandler(),
372-
)
373-
val isFtueDisplayed by ftueState.shouldDisplayFlow.collectAsState()
374-
if (!isFtueDisplayed) {
375-
PermanentChild(permanentNavModel = permanentNavModel, navTarget = NavTarget.LoggedInPermanent)
376-
}
377-
}
378-
LockScreenLockState.Locked -> {
379-
MoveActivityToBackgroundBackHandler()
380-
PermanentChild(permanentNavModel = permanentNavModel, navTarget = NavTarget.LockPermanent)
381-
}
365+
Children(
366+
navModel = backstack,
367+
modifier = Modifier,
368+
// Animate navigation to settings and to a room
369+
transitionHandler = rememberDefaultTransitionHandler(),
370+
)
371+
val isFtueDisplayed by ftueState.shouldDisplayFlow.collectAsState()
372+
if (!isFtueDisplayed) {
373+
PermanentChild(permanentNavModel = permanentNavModel, navTarget = NavTarget.LoggedInPermanent)
374+
}
375+
if (lockScreenState == LockScreenLockState.Locked) {
376+
PermanentChild(permanentNavModel = permanentNavModel, navTarget = NavTarget.LockPermanent)
382377
}
383378
}
384379
}

build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import org.jetbrains.kotlin.cli.common.toBooleanLenient
55

66
buildscript {
77
dependencies {
8-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20")
9-
classpath("com.google.gms:google-services:4.4.0")
8+
classpath(libs.kotlin.gradle.plugin)
9+
classpath(libs.gms.google.services)
1010
}
1111
}
1212

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Main changes in this version:
2+
- Element Call is now enabled by default.
3+
- There is an 'ongoing call' indicator in the room list.
4+
- Adding mentions to a message is now possible, but it's disabled by default as it's a work in progress. They can be enabled in the developer options.
5+
- Voice messages behavior changed: there is no need to keep pressing to record, to start recording a message just tap on the mic button, then tap again to stop recording.
6+
- Added a marker in the timeline to indicate the starting point of the room messages.
7+
Full changelog: https://github.com/vector-im/element-x-android/releases

features/analytics/api/src/main/kotlin/io/element/android/features/analytics/api/preferences/AnalyticsPreferencesView.kt

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import androidx.compose.ui.Modifier
2222
import androidx.compose.ui.res.stringResource
2323
import androidx.compose.ui.tooling.preview.PreviewParameter
2424
import io.element.android.features.analytics.api.AnalyticsOptInEvents
25+
import io.element.android.features.analytics.api.R
2526
import io.element.android.libraries.designsystem.components.LINK_TAG
2627
import io.element.android.libraries.designsystem.components.list.ListItemContent
2728
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
@@ -30,7 +31,6 @@ import io.element.android.libraries.designsystem.text.buildAnnotatedStringWithSt
3031
import io.element.android.libraries.designsystem.theme.components.ListItem
3132
import io.element.android.libraries.designsystem.theme.components.ListSupportingText
3233
import io.element.android.libraries.designsystem.theme.components.Text
33-
import io.element.android.libraries.ui.strings.CommonStrings
3434

3535
@Composable
3636
fun AnalyticsPreferencesView(
@@ -42,18 +42,18 @@ fun AnalyticsPreferencesView(
4242
}
4343

4444
val supportingText = stringResource(
45-
id = CommonStrings.screen_analytics_settings_help_us_improve,
45+
id = R.string.screen_analytics_settings_help_us_improve,
4646
state.applicationName
4747
)
4848
val linkText = buildAnnotatedStringWithStyledPart(
49-
CommonStrings.screen_analytics_settings_read_terms,
50-
CommonStrings.screen_analytics_settings_read_terms_content_link,
49+
R.string.screen_analytics_settings_read_terms,
50+
R.string.screen_analytics_settings_read_terms_content_link,
5151
tagAndLink = LINK_TAG to state.policyUrl,
5252
)
5353
Column(modifier) {
5454
ListItem(
5555
headlineContent = {
56-
Text(stringResource(id = CommonStrings.screen_analytics_settings_share_data))
56+
Text(stringResource(id = R.string.screen_analytics_settings_share_data))
5757
},
5858
supportingContent = {
5959
Text(supportingText)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
3+
<string name="screen_analytics_settings_share_data">"Sdílet analytická data"</string>
4+
<string name="screen_analytics_settings_help_us_improve">"Sdílejte anonymní údaje o používání, které nám pomohou identifikovat problémy."</string>
5+
<string name="screen_analytics_settings_read_terms">"Můžete si přečíst všechny naše podmínky %1$s."</string>
6+
<string name="screen_analytics_settings_read_terms_content_link">"zde"</string>
7+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
3+
<string name="screen_analytics_settings_share_data">"Analysedaten teilen"</string>
4+
<string name="screen_analytics_settings_help_us_improve">"Teile anonyme Nutzungsdaten, um uns bei der Identifizierung von Problemen zu helfen."</string>
5+
<string name="screen_analytics_settings_read_terms">"Du kannst alle unsere Bedingungen lesen %1$s."</string>
6+
<string name="screen_analytics_settings_read_terms_content_link">"hier"</string>
7+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
3+
<string name="screen_analytics_settings_share_data">"Partagez des données de statistiques d’utilisation"</string>
4+
<string name="screen_analytics_settings_help_us_improve">"Partagez des données d’utilisation anonymes pour nous aider à identifier les problèmes."</string>
5+
<string name="screen_analytics_settings_read_terms">"Vous pouvez lire toutes nos conditions %1$s."</string>
6+
<string name="screen_analytics_settings_read_terms_content_link">"ici"</string>
7+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
3+
<string name="screen_analytics_settings_share_data">"Partajați datele analitice"</string>
4+
<string name="screen_analytics_settings_help_us_improve">"Distribuiți date anonime de utilizare pentru a ne ajuta să identificăm probleme."</string>
5+
<string name="screen_analytics_settings_read_terms">"Puteți citi toate condițiile noastre %1$s."</string>
6+
<string name="screen_analytics_settings_read_terms_content_link">"aici"</string>
7+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
3+
<string name="screen_analytics_settings_share_data">"Делитесь данными аналитики"</string>
4+
<string name="screen_analytics_settings_help_us_improve">"Предоставлять анонимные данные об использовании, чтобы помочь нам выявить проблемы."</string>
5+
<string name="screen_analytics_settings_read_terms">"Вы можете ознакомиться со всеми нашими условиями %1$s."</string>
6+
<string name="screen_analytics_settings_read_terms_content_link">"здесь"</string>
7+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
3+
<string name="screen_analytics_settings_share_data">"Zdieľať analytické údaje"</string>
4+
<string name="screen_analytics_settings_help_us_improve">"Zdieľajte anonymné údaje o používaní, aby sme mohli identifikovať problémy."</string>
5+
<string name="screen_analytics_settings_read_terms">"Môžete si prečítať všetky naše podmienky %1$s."</string>
6+
<string name="screen_analytics_settings_read_terms_content_link">"tu"</string>
7+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
3+
<string name="screen_analytics_settings_share_data">"分享分析數據"</string>
4+
<string name="screen_analytics_settings_help_us_improve">"分享匿名的使用數據以協助我們釐清問題。"</string>
5+
<string name="screen_analytics_settings_read_terms">"您可以到%1$s閱讀我們的條款。"</string>
6+
<string name="screen_analytics_settings_read_terms_content_link">"這裡"</string>
7+
</resources>

0 commit comments

Comments
 (0)