Skip to content

Commit e567776

Browse files
committed
Merge branch 'release/0.7.4' into main
2 parents 183ffd2 + 1d0e527 commit e567776

File tree

715 files changed

+5099
-3455
lines changed

Some content is hidden

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

715 files changed

+5099
-3455
lines changed

.github/workflows/build.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
strategy:
2020
matrix:
21-
variant: [debug, release, nightly, samples]
21+
variant: [debug, release, nightly]
2222
fail-fast: false
2323
# Allow all jobs on develop. Just one per PR.
2424
concurrency:
@@ -82,6 +82,3 @@ jobs:
8282
- name: Compile nightly sources
8383
if: ${{ matrix.variant == 'nightly' }}
8484
run: ./gradlew compileGplayNightlySources -PallWarningsAsErrors=true $CI_GRADLE_ARG_PROPERTIES
85-
- name: Compile samples minimal
86-
if: ${{ matrix.variant == 'samples' }}
87-
run: ./gradlew :samples:minimal:assemble $CI_GRADLE_ARG_PROPERTIES

.github/workflows/maestro.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
uses: actions/download-artifact@v4
8080
with:
8181
name: elementx-apk-maestro
82-
- uses: mobile-dev-inc/[email protected].4
82+
- uses: mobile-dev-inc/[email protected].6
8383
if: (github.event_name == 'pull_request' && github.event.pull_request.fork == null) || github.event_name == 'workflow_dispatch'
8484
with:
8585
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
8383
# https://github.com/codecov/codecov-action
8484
- name: ☂️ Upload coverage reports to codecov
85-
uses: codecov/codecov-action@v4
85+
uses: codecov/codecov-action@v5
8686
with:
8787
fail_ci_if_error: true
8888
token: ${{ secrets.CODECOV_TOKEN }}

CHANGES.md

+62
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,65 @@
1+
Changes in Element X v0.7.3 (2024-11-08)
2+
========================================
3+
4+
## What's Changed
5+
### ✨ Features
6+
* Incoming session verification by @bmarty in https://github.com/element-hq/element-x-android/pull/3733
7+
* Remove all GPS metadata from images uploaded as media by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3781
8+
* Send caption with image and video by @bmarty in https://github.com/element-hq/element-x-android/pull/3803
9+
### 🙌 Improvements
10+
* UI iteration on the encryption settings by @bmarty in https://github.com/element-hq/element-x-android/pull/3750
11+
* Rotate firebase token in case of error by @bmarty in https://github.com/element-hq/element-x-android/pull/3755
12+
* Optimize media upload by @bmarty in https://github.com/element-hq/element-x-android/pull/3779
13+
* Iteration on caption by @bmarty in https://github.com/element-hq/element-x-android/pull/3816
14+
* Hide join call button when the user is already in the call by @bmarty in https://github.com/element-hq/element-x-android/pull/3815
15+
* Disable button during the "verifying" step. by @bmarty in https://github.com/element-hq/element-x-android/pull/3832
16+
### 🐛 Bugfixes
17+
* Fix oversize padding on captioned images/videos by @frebib in https://github.com/element-hq/element-x-android/pull/3732
18+
* Fix the onboarding flow getting stuck in some cases by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3778
19+
* bugfix: do not remove logs after sending them by @ganfra in https://github.com/element-hq/element-x-android/pull/3780
20+
* Use in-memory thumbnail APIs when possible by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3817
21+
* ElementCall: allow user to switch to another call. by @bmarty in https://github.com/element-hq/element-x-android/pull/3833
22+
* Do not delete the original file if it's not a temporary file when sending it to a room. by @bmarty in https://github.com/element-hq/element-x-android/pull/3819
23+
* Fix verification failed issue, simplify verification logic by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3830
24+
### 🗣 Translations
25+
* Sync Strings by @ElementBot in https://github.com/element-hq/element-x-android/pull/3798
26+
### 🧱 Build
27+
* Target api 35 by @bmarty in https://github.com/element-hq/element-x-android/pull/3776
28+
### 🚧 In development 🚧
29+
* Knocking : update create room flow by @ganfra in https://github.com/element-hq/element-x-android/pull/3804
30+
### Dependency upgrades
31+
* Update dependency io.nlopez.compose.rules:detekt to v0.4.17 by @renovate in https://github.com/element-hq/element-x-android/pull/3746
32+
* Update dependency com.posthog:posthog-android to v3.8.3 - autoclosed by @renovate in https://github.com/element-hq/element-x-android/pull/3742
33+
* Update dependency org.maplibre.gl:android-plugin-annotation-v9 to v3.0.2 by @renovate in https://github.com/element-hq/element-x-android/pull/3702
34+
* Update dependency com.posthog:posthog-android to v3.9.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3754
35+
* Update kotlin by @renovate in https://github.com/element-hq/element-x-android/pull/3283
36+
* Update camera to v1.4.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3765
37+
* Update dependencyAnalysis to v2.4.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3773
38+
* Update kotlin to v2.0.21-1.0.26 by @renovate in https://github.com/element-hq/element-x-android/pull/3774
39+
* Update dependency androidx.annotation:annotation-jvm to v1.9.1 - autoclosed by @renovate in https://github.com/element-hq/element-x-android/pull/3762
40+
* chore(deps): update dependencyanalysis to v2.4.2 by @renovate in https://github.com/element-hq/element-x-android/pull/3791
41+
* fix(deps): update dependency androidx.compose:compose-bom to v2024.10.01 by @renovate in https://github.com/element-hq/element-x-android/pull/3782
42+
* Update dependency androidx.constraintlayout:constraintlayout-compose to v1.1.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3770
43+
* fix(deps): update dependency androidx.constraintlayout:constraintlayout to v2.2.0 by @renovate in https://github.com/element-hq/element-x-android/pull/3784
44+
* fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v0.2.59 by @renovate in https://github.com/element-hq/element-x-android/pull/3809
45+
* Update mobile-dev-inc/action-maestro-cloud action to v1.9.4 by @renovate in https://github.com/element-hq/element-x-android/pull/3820
46+
* Update dependency com.otaliastudios:transcoder to v0.11.2 by @renovate in https://github.com/element-hq/element-x-android/pull/3805
47+
* Update plugin paparazzi to v1.3.5 by @renovate in https://github.com/element-hq/element-x-android/pull/3826
48+
* Update dependency org.matrix.rustcomponents:sdk-android to v0.2.60 by @renovate in https://github.com/element-hq/element-x-android/pull/3827
49+
### Others
50+
* Change wording to "Verify identity" by @bmarty in https://github.com/element-hq/element-x-android/pull/3751
51+
* Improve FakeMatrixRoom to be able to check all the parameters. by @bmarty in https://github.com/element-hq/element-x-android/pull/3761
52+
* Editor state fixture and preview improvement by @bmarty in https://github.com/element-hq/element-x-android/pull/3758
53+
* Enable identity pinning violation notifications unconditionally by @andybalaam in https://github.com/element-hq/element-x-android/pull/3745
54+
* Enable predictive back gesture by @frebib in https://github.com/element-hq/element-x-android/pull/3797
55+
* Update project status by @mxandreas in https://github.com/element-hq/element-x-android/pull/3806
56+
* Remove code duplication - no behavior change. by @bmarty in https://github.com/element-hq/element-x-android/pull/3823
57+
* Verification UI / UX iteration by @bmarty in https://github.com/element-hq/element-x-android/pull/3829
58+
59+
## New Contributors
60+
* @andybalaam made their first contribution in https://github.com/element-hq/element-x-android/pull/3745
61+
* @mxandreas made their first contribution in https://github.com/element-hq/element-x-android/pull/3806
62+
163
Changes in Element X v0.7.2 (2024-10-29)
264
========================================
365

CONTRIBUTING.md

-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ Please ensure that you're using the project formatting rules (which are in the p
4949

5050
This project should compile without any special action. Just clone it and open it with Android Studio, or compile from command line using `gradlew`.
5151

52-
Note: please make sure that the configuration is `app` and not `samples.minimal`.
53-
5452
## Strings
5553

5654
The strings of the project are managed externally using [https://localazy.com](https://localazy.com) and shared with Element X iOS.

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class MainActivity : NodeActivity() {
8787

8888
@Composable
8989
private fun MainNodeHost() {
90-
NodeHost(integrationPoint = appyxIntegrationPoint) {
90+
NodeHost(integrationPoint = appyxV1IntegrationPoint) {
9191
MainNode(
9292
it,
9393
plugins = listOf(

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

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<locale android:name="es"/>
1010
<locale android:name="et"/>
1111
<locale android:name="fa"/>
12+
<locale android:name="fi"/>
1213
<locale android:name="fr"/>
1314
<locale android:name="hu"/>
1415
<locale android:name="in"/>

appnav/src/main/kotlin/io/element/android/appnav/loggedin/LoggedInPresenter.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ class LoggedInPresenter @Inject constructor(
142142
.also { Timber.tag(pusherTag.value).w("No distributors available") }
143143
.also {
144144
// In this case, consider the push provider is chosen.
145-
pushService.selectPushProvider(matrixClient, pushProvider)
145+
pushService.selectPushProvider(matrixClient.sessionId, pushProvider)
146146
}
147147
.also { pusherRegistrationState.value = AsyncData.Failure(PusherRegistrationFailure.NoDistributorsAvailable()) }
148148
pushService.registerWith(matrixClient, pushProvider, distributor)
149149
} else {
150-
val currentPushDistributor = currentPushProvider.getCurrentDistributor(matrixClient)
150+
val currentPushDistributor = currentPushProvider.getCurrentDistributor(matrixClient.sessionId)
151151
if (currentPushDistributor == null) {
152152
Timber.tag(pusherTag.value).d("Register with the first available distributor")
153153
val distributor = currentPushProvider.getDistributors().firstOrNull()
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">"Kirjaudu Ulos &amp; Päivitä"</string>
4+
<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>
5+
</resources>
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">"Вийти та оновити"</string>
4+
<string name="banner_migrate_to_native_sliding_sync_force_logout_title">"Ваш домашній сервер більше не підтримує старий протокол. Будь ласка, вийдіть і увійдіть знову, щоб продовжити використання програми."</string>
5+
</resources>

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ class LoggedInPresenterTest {
378378
val lambda = lambdaRecorder<MatrixClient, PushProvider, Distributor, Result<Unit>> { _, _, _ ->
379379
Result.success(Unit)
380380
}
381-
val selectPushProviderLambda = lambdaRecorder<MatrixClient, PushProvider, Unit> { _, _ -> }
381+
val selectPushProviderLambda = lambdaRecorder<SessionId, PushProvider, Unit> { _, _ -> }
382382
val sessionVerificationService = FakeSessionVerificationService(
383383
initialSessionVerifiedStatus = SessionVerifiedStatus.Verified
384384
)
@@ -408,8 +408,8 @@ class LoggedInPresenterTest {
408408
selectPushProviderLambda.assertions()
409409
.isCalledOnce()
410410
.with(
411-
// MatrixClient
412-
any(),
411+
// SessionId
412+
value(A_SESSION_ID),
413413
// PushProvider
414414
value(pushProvider),
415415
)
@@ -481,7 +481,7 @@ class LoggedInPresenterTest {
481481
registerWithLambda: (MatrixClient, PushProvider, Distributor) -> Result<Unit> = { _, _, _ ->
482482
Result.success(Unit)
483483
},
484-
selectPushProviderLambda: (MatrixClient, PushProvider) -> Unit = { _, _ -> lambdaError() },
484+
selectPushProviderLambda: (SessionId, PushProvider) -> Unit = { _, _ -> lambdaError() },
485485
currentPushProvider: () -> PushProvider? = { null },
486486
setIgnoreRegistrationErrorLambda: (SessionId, Boolean) -> Unit = { _, _ -> lambdaError() },
487487
): PushService {

build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ allprojects {
4949
config.from(files("$rootDir/tools/detekt/detekt.yml"))
5050
}
5151
dependencies {
52-
detektPlugins("io.nlopez.compose.rules:detekt:0.4.17")
52+
detektPlugins("io.nlopez.compose.rules:detekt:0.4.19")
5353
}
5454

5555
// KtLint

docs/continuous_integration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ We want:
4040

4141
The CI checks that:
4242

43-
1. The code is compiling, without any warnings, for all the app build types and variants and for the minimal app
43+
1. The code is compiling, without any warnings, for all the app build types and variants
4444
2. The tests are passing
4545
3. The code quality is good (detekt, ktlint, lint)
4646
4. The code is running and smoke tests are passing (maestro)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Main changes in this version: bug fixes.
2+
Full changelog: https://github.com/element-hq/element-x-android/releases
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">"Jaa anonyymejä käyttötietoja auttaaksesi meitä tunnistamaan ongelmat."</string>
4+
<string name="screen_analytics_settings_read_terms">"Voit lukea kaikki ehtomme %1$s."</string>
5+
<string name="screen_analytics_settings_read_terms_content_link">"täällä"</string>
6+
<string name="screen_analytics_settings_share_data">"Jaa analytiikkatietoja"</string>
7+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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_prompt_data_usage">"Emme tallenna tai profiloi henkilötietoja"</string>
4+
<string name="screen_analytics_prompt_help_us_improve">"Jaa anonyymejä käyttötietoja auttaaksesi meitä tunnistamaan ongelmat."</string>
5+
<string name="screen_analytics_prompt_read_terms">"Voit lukea kaikki ehtomme %1$s."</string>
6+
<string name="screen_analytics_prompt_read_terms_content_link">"täällä"</string>
7+
<string name="screen_analytics_prompt_settings">"Voit poistaa tämän käytöstä milloin tahansa"</string>
8+
<string name="screen_analytics_prompt_third_party_sharing">"Emme jaa tietojasi kolmansien osapuolien kanssa"</string>
9+
<string name="screen_analytics_prompt_title">"Auta parantamaan %1$s -sovellusta"</string>
10+
</resources>

features/analytics/impl/src/main/res/values-uk/translations.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
<string name="screen_analytics_prompt_read_terms">"Ви можете прочитати всі наші умови %1$s."</string>
66
<string name="screen_analytics_prompt_read_terms_content_link">"тут"</string>
77
<string name="screen_analytics_prompt_settings">"Ви можете вимкнути цю функцію в будь-який час"</string>
8-
<string name="screen_analytics_prompt_third_party_sharing">"Ми не передаватимемо Ваші дані третім особам"</string>
9-
<string name="screen_analytics_prompt_title">"Допоможіть покращити %1$s"</string>
8+
<string name="screen_analytics_prompt_third_party_sharing">"Ми не передаватимемо ваші дані третім особам"</string>
9+
<string name="screen_analytics_prompt_title">"Допоможіть вдосконалити %1$s"</string>
1010
</resources>

features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/ActiveCallManager.kt

+22-13
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
package io.element.android.features.call.impl.utils
99

1010
import android.annotation.SuppressLint
11+
import androidx.annotation.VisibleForTesting
1112
import androidx.core.app.NotificationManagerCompat
1213
import com.squareup.anvil.annotations.ContributesBinding
1314
import io.element.android.appconfig.ElementCallConfig
@@ -56,11 +57,6 @@ interface ActiveCallManager {
5657
*/
5758
fun registerIncomingCall(notificationData: CallNotificationData)
5859

59-
/**
60-
* Called when the incoming call timed out. It will remove the active call and remove any associated UI, adding a 'missed call' notification.
61-
*/
62-
fun incomingCallTimedOut()
63-
6460
/**
6561
* Called when the active call has been hung up. It will remove any existing UI and the active call.
6662
* @param callType The type of call that the user hung up, either an external url one or a room one.
@@ -113,18 +109,24 @@ class DefaultActiveCallManager @Inject constructor(
113109

114110
// Wait for the ringing call to time out
115111
delay(ElementCallConfig.RINGING_CALL_DURATION_SECONDS.seconds)
116-
incomingCallTimedOut()
112+
incomingCallTimedOut(displayMissedCallNotification = true)
117113
}
118114
}
119115

120-
override fun incomingCallTimedOut() {
116+
/**
117+
* Called when the incoming call timed out. It will remove the active call and remove any associated UI, adding a 'missed call' notification.
118+
*/
119+
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
120+
fun incomingCallTimedOut(displayMissedCallNotification: Boolean) {
121121
val previousActiveCall = activeCall.value ?: return
122122
val notificationData = (previousActiveCall.callState as? CallState.Ringing)?.notificationData ?: return
123123
activeCall.value = null
124124

125125
cancelIncomingCallNotification()
126126

127-
displayMissedCallNotification(notificationData)
127+
if (displayMissedCallNotification) {
128+
displayMissedCallNotification(notificationData)
129+
}
128130
}
129131

130132
override fun hungUpCall(callType: CallType) {
@@ -186,28 +188,35 @@ class DefaultActiveCallManager @Inject constructor(
186188

187189
@OptIn(ExperimentalCoroutinesApi::class)
188190
private fun observeRingingCall() {
189-
// This will observe ringing calls and ensure they're terminated if the room call is cancelled
191+
// This will observe ringing calls and ensure they're terminated if the room call is cancelled or if the user
192+
// has joined the call from another session.
190193
activeCall
191194
.filterNotNull()
192195
.filter { it.callState is CallState.Ringing && it.callType is CallType.RoomCall }
193196
.flatMapLatest { activeCall ->
194197
val callType = activeCall.callType as CallType.RoomCall
195-
// Get a flow of updated `hasRoomCall` values for the room
198+
// Get a flow of updated `hasRoomCall` and `activeRoomCallParticipants` values for the room
196199
matrixClientProvider.getOrRestore(callType.sessionId).getOrNull()
197200
?.getRoom(callType.roomId)
198201
?.roomInfoFlow
199-
?.map { it.hasRoomCall }
202+
?.map {
203+
it.hasRoomCall to (callType.sessionId in it.activeRoomCallParticipants)
204+
}
200205
?: flowOf()
201206
}
202207
// We only want to check if the room active call status changes
203208
.distinctUntilChanged()
204209
// Skip the first one, we're not interested in it (if the check below passes, it had to be active anyway)
205210
.drop(1)
206-
.onEach { roomHasActiveCall ->
211+
.onEach { (roomHasActiveCall, userIsInTheCall) ->
207212
if (!roomHasActiveCall) {
208213
// The call was cancelled
209214
timedOutCallJob?.cancel()
210-
incomingCallTimedOut()
215+
incomingCallTimedOut(displayMissedCallNotification = true)
216+
} else if (userIsInTheCall) {
217+
// The user joined the call from another session
218+
timedOutCallJob?.cancel()
219+
incomingCallTimedOut(displayMissedCallNotification = false)
211220
}
212221
}
213222
.launchIn(coroutineScope)
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="call_foreground_service_channel_title_android">"Käynnissä oleva puhelu"</string>
4+
<string name="call_foreground_service_message_android">"Palaa puheluun napauttamalla"</string>
5+
<string name="call_foreground_service_title_android">"☎️ Puhelu käynnissä"</string>
6+
<string name="screen_incoming_call_subtitle_android">"Saapuva Element Call -puhelu"</string>
7+
</resources>

0 commit comments

Comments
 (0)