Skip to content

Commit 74f5ff7

Browse files
authored
Merge branch 'develop' into feature/bma/upUpdate
2 parents f096673 + 54ab4d2 commit 74f5ff7

File tree

808 files changed

+7167
-3174
lines changed

Some content is hidden

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

808 files changed

+7167
-3174
lines changed

.github/workflows/blocked.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
retention-days: 5
6666
overwrite: true
6767
if-no-files-found: error
68-
- uses: rnkdsh/action-upload-diawi@v1.5.6
68+
- uses: rnkdsh/action-upload-diawi@v1.5.7
6969
id: diawi
7070
# Do not fail the whole build if Diawi upload fails
7171
continue-on-error: true

.github/workflows/pull_request.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Pull Request
2+
on:
3+
pull_request:
4+
types: [ opened, edited, labeled, unlabeled, synchronize ]
5+
workflow_call:
6+
secrets:
7+
ELEMENT_BOT_TOKEN:
8+
required: true
9+
10+
jobs:
11+
prevent-blocked:
12+
name: Prevent blocked
13+
runs-on: ubuntu-latest
14+
permissions:
15+
pull-requests: read
16+
steps:
17+
- name: Add notice
18+
uses: actions/github-script@v7
19+
if: contains(github.event.pull_request.labels.*.name, 'X-Blocked')
20+
with:
21+
script: |
22+
core.setFailed("PR has been labeled with X-Blocked; it cannot be merged.");
23+
24+
community-prs:
25+
name: Label Community PRs
26+
runs-on: ubuntu-latest
27+
if: github.event.action == 'opened'
28+
permissions:
29+
pull-requests: write
30+
steps:
31+
- name: Check membership
32+
if: github.event.pull_request.user.login != 'renovate[bot]'
33+
uses: tspascoal/get-user-teams-membership@57e9f42acd78f4d0f496b3be4368fc5f62696662 # v3
34+
id: teams
35+
with:
36+
username: ${{ github.event.pull_request.user.login }}
37+
organization: element-hq
38+
team: Vector Core
39+
GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN_READ_ORG }}
40+
- name: Add label
41+
if: steps.teams.outputs.isTeamMember == 'false'
42+
uses: actions/github-script@v7
43+
with:
44+
script: |
45+
github.rest.issues.addLabels({
46+
issue_number: context.issue.number,
47+
owner: context.repo.owner,
48+
repo: context.repo.repo,
49+
labels: ['Z-Community-PR']
50+
});
51+
52+
close-if-fork-develop:
53+
name: Forbid develop branch fork contributions
54+
runs-on: ubuntu-latest
55+
if: >
56+
github.event.action == 'opened' &&
57+
github.event.pull_request.head.ref == 'develop' &&
58+
github.event.pull_request.head.repo.full_name != github.repository
59+
steps:
60+
- name: Close pull request
61+
uses: actions/github-script@v7
62+
with:
63+
script: |
64+
github.rest.issues.createComment({
65+
issue_number: context.issue.number,
66+
owner: context.repo.owner,
67+
repo: context.repo.repo,
68+
body: "Thanks for opening this pull request, unfortunately we do not accept contributions from the main" +
69+
" branch of your fork, please re-open once you switch to an alternative branch for everyone's sanity.",
70+
});
71+
72+
github.rest.pulls.update({
73+
pull_number: context.issue.number,
74+
owner: context.repo.owner,
75+
repo: context.repo.repo,
76+
state: 'closed'
77+
});

CHANGES.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,43 @@
1+
Changes in Element X v25.03.1
2+
=============================
3+
4+
<!-- Release notes generated using configuration in .github/release.yml at v25.03.1 -->
5+
6+
## What's Changed
7+
### ✨ Features
8+
* Enable the Event cache by default. by @bmarty in https://github.com/element-hq/element-x-android/pull/4373
9+
### 🙌 Improvements
10+
* change(create room) : use history visibility "invited" by @ganfra in https://github.com/element-hq/element-x-android/pull/4335
11+
* change(room directory) : move the the room directory entry by @ganfra in https://github.com/element-hq/element-x-android/pull/4348
12+
* [Change] Invited state room preview by @ganfra in https://github.com/element-hq/element-x-android/pull/4353
13+
* change(left room snackbar) : manage cancel knock and decline invite by @ganfra in https://github.com/element-hq/element-x-android/pull/4360
14+
### 🐛 Bugfixes
15+
* Restore manual `Client` cleanup on session logout by @jmartinesp in https://github.com/element-hq/element-x-android/pull/4333
16+
### 🗣 Translations
17+
* Sync Strings by @ElementBot in https://github.com/element-hq/element-x-android/pull/4346
18+
### 🧱 Build
19+
* Fix typo on job name. by @bmarty in https://github.com/element-hq/element-x-android/pull/4352
20+
### Dependency upgrades
21+
* chore(deps): update plugin ktlint to v12.2.0 by @renovate in https://github.com/element-hq/element-x-android/pull/4338
22+
* fix(deps): update dependency org.maplibre.gl:android-sdk to v11.8.2 by @renovate in https://github.com/element-hq/element-x-android/pull/4340
23+
* fix(deps): update dependency io.mockk:mockk to v1.13.17 by @renovate in https://github.com/element-hq/element-x-android/pull/4334
24+
* fix(deps): update kotlin to v2.1.10-1.0.31 by @renovate in https://github.com/element-hq/element-x-android/pull/4337
25+
* fix(deps): update dependency com.google.firebase:firebase-bom to v33.10.0 by @renovate in https://github.com/element-hq/element-x-android/pull/4339
26+
* Migrate to coil3 by @bmarty in https://github.com/element-hq/element-x-android/pull/4347
27+
* fix(deps): update dependency org.jsoup:jsoup to v1.19.1 by @renovate in https://github.com/element-hq/element-x-android/pull/4351
28+
* deps(rust sdk) : update to 25.03.05 by @ganfra in https://github.com/element-hq/element-x-android/pull/4370
29+
* Update dependency org.matrix.rustcomponents:sdk-android to v25.3.6 by @renovate in https://github.com/element-hq/element-x-android/pull/4371
30+
### Others
31+
* Prevent PRs with the X-Blocked label from being merged by @robintown in https://github.com/element-hq/element-x-android/pull/4350
32+
* Fix some icon colors by @bmarty in https://github.com/element-hq/element-x-android/pull/4365
33+
* Remove PreferenceText, replace by ListItem. by @bmarty in https://github.com/element-hq/element-x-android/pull/4369
34+
* Show error screens in group calls by @robintown in https://github.com/element-hq/element-x-android/pull/4297
35+
36+
## New Contributors
37+
* @robintown made their first contribution in https://github.com/element-hq/element-x-android/pull/4350
38+
39+
**Full Changelog**: https://github.com/element-hq/element-x-android/compare/v25.03.0...v25.03.1
40+
141
Changes in Element X v25.03.0
242
=============================
343

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ class MainActivity : NodeActivity() {
6464
ElementThemeApp(
6565
appPreferencesStore = appBindings.preferencesStore(),
6666
enterpriseService = appBindings.enterpriseService(),
67+
buildMeta = appBindings.buildMeta()
6768
) {
6869
CompositionLocalProvider(
6970
LocalSnackbarDispatcher provides appBindings.snackbarDispatcher(),

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import io.element.android.features.enterprise.api.EnterpriseService
1313
import io.element.android.features.lockscreen.api.LockScreenEntryPoint
1414
import io.element.android.features.lockscreen.api.LockScreenService
1515
import io.element.android.features.rageshake.api.reporter.BugReporter
16+
import io.element.android.libraries.core.meta.BuildMeta
1617
import io.element.android.libraries.designsystem.utils.snackbar.SnackbarDispatcher
1718
import io.element.android.libraries.di.AppScope
1819
import io.element.android.libraries.matrix.api.tracing.TracingService
@@ -38,4 +39,6 @@ interface AppBindings {
3839
fun analyticsService(): AnalyticsService
3940

4041
fun enterpriseService(): EnterpriseService
42+
43+
fun buildMeta(): BuildMeta
4144
}

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="en_US"/>
1010
<locale android:name="es"/>
1111
<locale android:name="et"/>
12+
<locale android:name="eu"/>
1213
<locale android:name="fa"/>
1314
<locale android:name="fi"/>
1415
<locale android:name="fr"/>

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

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,33 @@ package io.element.android.appnav
1010
import io.element.android.libraries.designsystem.utils.snackbar.SnackbarDispatcher
1111
import io.element.android.libraries.designsystem.utils.snackbar.SnackbarMessage
1212
import io.element.android.libraries.matrix.api.room.RoomMembershipObserver
13+
import io.element.android.libraries.matrix.api.timeline.item.event.MembershipChange
1314
import io.element.android.libraries.ui.strings.CommonStrings
1415
import kotlinx.coroutines.CoroutineScope
1516
import kotlinx.coroutines.Job
1617
import kotlinx.coroutines.flow.filter
1718
import kotlinx.coroutines.flow.launchIn
18-
import kotlinx.coroutines.flow.map
1919
import kotlinx.coroutines.flow.onEach
20-
import kotlinx.coroutines.launch
2120
import javax.inject.Inject
2221

2322
class LoggedInEventProcessor @Inject constructor(
2423
private val snackbarDispatcher: SnackbarDispatcher,
25-
roomMembershipObserver: RoomMembershipObserver,
24+
private val roomMembershipObserver: RoomMembershipObserver,
2625
) {
2726
private var observingJob: Job? = null
2827

29-
private val displayLeftRoomMessage = roomMembershipObserver.updates
30-
.map { !it.isUserInRoom }
31-
3228
fun observeEvents(coroutineScope: CoroutineScope) {
33-
observingJob = coroutineScope.launch {
34-
displayLeftRoomMessage
35-
.filter { it }
36-
.onEach {
37-
displayMessage(CommonStrings.common_current_user_left_room)
29+
observingJob = roomMembershipObserver.updates
30+
.filter { !it.isUserInRoom }
31+
.onEach {
32+
when (it.change) {
33+
MembershipChange.LEFT -> displayMessage(CommonStrings.common_current_user_left_room)
34+
MembershipChange.INVITATION_REJECTED -> displayMessage(CommonStrings.common_current_user_rejected_invite)
35+
MembershipChange.KNOCK_RETRACTED -> displayMessage(CommonStrings.common_current_user_canceled_knock)
36+
else -> Unit
3837
}
39-
.launchIn(this)
40-
}
38+
}
39+
.launchIn(coroutineScope)
4140
}
4241

4342
fun stopObserving() {

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

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,24 @@ import io.element.android.libraries.matrix.api.core.RoomIdOrAlias
7373
import io.element.android.libraries.matrix.api.core.UserId
7474
import io.element.android.libraries.matrix.api.core.toRoomIdOrAlias
7575
import io.element.android.libraries.matrix.api.permalink.PermalinkData
76-
import io.element.android.libraries.matrix.api.verification.SessionVerificationRequestDetails
7776
import io.element.android.libraries.matrix.api.verification.SessionVerificationServiceListener
77+
import io.element.android.libraries.matrix.api.verification.VerificationRequest
7878
import io.element.android.services.appnavstate.api.AppNavigationStateService
7979
import kotlinx.coroutines.CoroutineScope
80+
import kotlinx.coroutines.flow.first
8081
import kotlinx.coroutines.flow.launchIn
8182
import kotlinx.coroutines.flow.onEach
8283
import kotlinx.coroutines.launch
84+
import kotlinx.coroutines.withTimeout
8385
import kotlinx.parcelize.Parcelize
8486
import timber.log.Timber
87+
import java.time.Duration
88+
import java.time.Instant
8589
import java.util.Optional
8690
import java.util.UUID
91+
import kotlin.time.Duration.Companion.minutes
92+
import kotlin.time.Duration.Companion.seconds
93+
import kotlin.time.toKotlinDuration
8794

8895
@ContributesNode(SessionScope::class)
8996
class LoggedInFlowNode @AssistedInject constructor(
@@ -127,8 +134,35 @@ class LoggedInFlowNode @AssistedInject constructor(
127134
)
128135

129136
private val verificationListener = object : SessionVerificationServiceListener {
130-
override fun onIncomingSessionRequest(sessionVerificationRequestDetails: SessionVerificationRequestDetails) {
131-
backstack.singleTop(NavTarget.IncomingVerificationRequest(sessionVerificationRequestDetails))
137+
override fun onIncomingSessionRequest(verificationRequest: VerificationRequest.Incoming) {
138+
// Without this launch the rendering and actual state of this Appyx node's children gets out of sync, resulting in a crash.
139+
// This might be because this method is called back from Rust in a background thread.
140+
lifecycleScope.launch {
141+
val receivedAt = Instant.now()
142+
143+
// Wait until the app is in foreground to display the incoming verification request
144+
appNavigationStateService.appNavigationState.first { it.isInForeground }
145+
146+
// TODO there should also be a timeout for > 10 minutes elapsed since the request was created, but the SDK doesn't expose that info yet
147+
val now = Instant.now()
148+
val elapsedTimeSinceReceived = Duration.between(receivedAt, now).toKotlinDuration()
149+
150+
// Discard the incoming verification request if it has timed out
151+
if (elapsedTimeSinceReceived > 2.minutes) {
152+
Timber.w("Incoming verification request ${verificationRequest.details.flowId} discarded due to timeout.")
153+
return@launch
154+
}
155+
156+
// Wait for the RoomList UI to be ready so the incoming verification screen can be displayed on top of it
157+
// Otherwise, the RoomList UI may be incorrectly displayed on top
158+
withTimeout(5.seconds) {
159+
backstack.elements.first { elements ->
160+
elements.any { it.key.navTarget == NavTarget.RoomList }
161+
}
162+
}
163+
164+
backstack.singleTop(NavTarget.IncomingVerificationRequest(verificationRequest))
165+
}
132166
}
133167
}
134168

@@ -218,7 +252,7 @@ class LoggedInFlowNode @AssistedInject constructor(
218252
data object LogoutForNativeSlidingSyncMigrationNeeded : NavTarget
219253

220254
@Parcelize
221-
data class IncomingVerificationRequest(val data: SessionVerificationRequestDetails) : NavTarget
255+
data class IncomingVerificationRequest(val data: VerificationRequest.Incoming) : NavTarget
222256
}
223257

224258
override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node {
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
3+
<string name="banner_migrate_to_native_sliding_sync_action">"Cerrar sesión y actualizar"</string>
4+
<string name="banner_migrate_to_native_sliding_sync_app_force_logout_title">"%1$s ya no es compatible con el antiguo protocolo. Cierra sesión y vuelve a iniciarla para seguir usando la aplicación."</string>
5+
<string name="banner_migrate_to_native_sliding_sync_force_logout_title">"Tu servidor base ya no es compatible con el protocolo anterior. Cierra sesión y vuelve a iniciarla para seguir usando la aplicación."</string>
6+
</resources>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
3+
<string name="banner_migrate_to_native_sliding_sync_force_logout_title">"Zure zerbitzaria ez da bateragarria protokolo zaharrarekin. Amaitu saioa eta hasi berriro aplikazioa erabiltzen jarraitzeko."</string>
4+
</resources>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
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">"Kirjaudu Ulos &amp; Päivitä"</string>
4+
<string name="banner_migrate_to_native_sliding_sync_app_force_logout_title">"%1$s ei enää tue vanhaa protokollaa. Kirjaudu ulos ja takaisin sisään jatkaaksesi sovelluksen käyttöä."</string>
45
<string name="banner_migrate_to_native_sliding_sync_force_logout_title">"Kotipalvelimesi ei enää tue vanhaa protokollaa. Kirjaudu ulos ja takaisin sisään jatkaaksesi sovelluksen käyttöä."</string>
56
</resources>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
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">"Kijelentkezés és frissítés"</string>
4+
<string name="banner_migrate_to_native_sliding_sync_app_force_logout_title">"%1$s már nem támogatja a régi protokollt. Kérjük, jelentkezzen ki és jelentkezzen be újra az alkalmazás használatának folytatásához."</string>
45
<string name="banner_migrate_to_native_sliding_sync_force_logout_title">"A Matrix-kiszolgáló már nem támogatja a régi protokollt. Az alkalmazás további használatához jelentkezzen ki és be."</string>
56
</resources>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
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">"Esci e aggiorna"</string>
4+
<string name="banner_migrate_to_native_sliding_sync_app_force_logout_title">"%1$s non supporta più il vecchio protocollo. Esci e accedi nuovamente per continuare a utilizzare l\'app."</string>
45
<string name="banner_migrate_to_native_sliding_sync_force_logout_title">"Il tuo homeserver non supporta più il vecchio protocollo. Esci e rientra per continuare a usare l\'app."</string>
56
</resources>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
3+
<string name="banner_migrate_to_native_sliding_sync_action">"Logg ut og oppgrader"</string>
4+
<string name="banner_migrate_to_native_sliding_sync_force_logout_title">"Hjemmeserveren din støtter ikke lenger den gamle protokollen. Vennligst logg ut og inn igjen for å fortsette å bruke appen."</string>
5+
</resources>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
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">"Wyloguj się i zaktualizuj"</string>
4+
<string name="banner_migrate_to_native_sliding_sync_app_force_logout_title">"%1$s już nie wspiera starego protokołu. Zaloguj się ponownie, aby dalej korzystać z aplikacji."</string>
45
<string name="banner_migrate_to_native_sliding_sync_force_logout_title">"Twój serwer domowy już nie wspiera starego protokołu. Zaloguj się ponownie, aby kontynuować korzystanie z aplikacji."</string>
56
</resources>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
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
<string name="banner_migrate_to_native_sliding_sync_force_logout_title">"Ваш домашній сервер більше не підтримує старий протокол. Будь ласка, вийдіть і увійдіть знову, щоб продовжити використання програми."</string>
56
</resources>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
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
<string name="banner_migrate_to_native_sliding_sync_force_logout_title">"您的家伺服器不再支援舊協定。請登出並重新登入以繼續使用應用程式。"</string>
56
</resources>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Main changes in this version: Event cache / Join room by address.
2+
Full changelog: https://github.com/element-hq/element-x-android/releases
Lines changed: 7 additions & 0 deletions
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_help_us_improve">"Partekatu erabilerari buruzko datu anonimoak arazoak identifikatzen laguntzeko."</string>
4+
<string name="screen_analytics_settings_read_terms">"Gure baldintza guztiak irakur ditzakezu %1$s ."</string>
5+
<string name="screen_analytics_settings_read_terms_content_link">"hemen"</string>
6+
<string name="screen_analytics_settings_share_data">"Partekatu analisi-datuak"</string>
7+
</resources>

0 commit comments

Comments
 (0)