Skip to content

Commit 631a57e

Browse files
authored
Merge branch 'develop' into feature/fga/pinned_messages_list_remove_reaction
2 parents 73bbd1e + ba7baea commit 631a57e

File tree

82 files changed

+375
-907
lines changed

Some content is hidden

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

82 files changed

+375
-907
lines changed

CHANGES.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
Changes in Element X v0.5.3 (2024-09-10)
2+
========================================
3+
4+
### ✨ Features
5+
* Add banner for optional migration to simplified sliding sync by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3429
6+
7+
### 🙌 Improvements
8+
* Timeline : remove the encrypted history banner by @ganfra in https://github.com/element-hq/element-x-android/pull/3410
9+
10+
### 🐛 Bugfixes
11+
* Fix new logins with Simplified SS using the proxy by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3417
12+
* Ensure Call is not hang up when user is asked to grant system permissions by @bmarty in https://github.com/element-hq/element-x-android/pull/3419
13+
* Wait for a room with joined state in `/sync` after creating it by @jmartinesp in https://github.com/element-hq/element-x-android/pull/3421
14+
* [Bugfix] : fix self verification flow by @ganfra in https://github.com/element-hq/element-x-android/pull/3426
15+
16+
### 🗣 Translations
17+
* Sync Strings by @ElementBot in https://github.com/element-hq/element-x-android/pull/3425
18+
19+
### 🚧 In development 🚧
20+
* [Feature] Pinned messages list by @ganfra in https://github.com/element-hq/element-x-android/pull/3392
21+
* Pinned messages banner : adjust indicator to match design. by @ganfra in https://github.com/element-hq/element-x-android/pull/3415
22+
23+
### Dependency upgrades
24+
* Update plugin dependencycheck to v10.0.4 by @renovate in https://github.com/element-hq/element-x-android/pull/3372
25+
* Update plugin detekt to v1.23.7 by @renovate in https://github.com/element-hq/element-x-android/pull/3424
26+
27+
### Others
28+
* Delete old log files by @bmarty in https://github.com/element-hq/element-x-android/pull/3413
29+
* Recovery key formatting and wording iteration by @bmarty in https://github.com/element-hq/element-x-android/pull/3409
30+
* Change license to AGPL by @bmarty in https://github.com/element-hq/element-x-android/pull/3422
31+
* Remove Wait list screen by @bmarty in https://github.com/element-hq/element-x-android/pull/3428
32+
133
Changes in Element X v0.5.2 (2024-09-05)
234
=========================================
335

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import io.element.android.features.createroom.api.CreateRoomEntryPoint
4040
import io.element.android.features.ftue.api.FtueEntryPoint
4141
import io.element.android.features.ftue.api.state.FtueService
4242
import io.element.android.features.ftue.api.state.FtueState
43+
import io.element.android.features.logout.api.LogoutEntryPoint
4344
import io.element.android.features.networkmonitor.api.NetworkMonitor
4445
import io.element.android.features.networkmonitor.api.NetworkStatus
4546
import io.element.android.features.preferences.api.PreferencesEntryPoint
@@ -65,6 +66,7 @@ import io.element.android.libraries.matrix.api.core.UserId
6566
import io.element.android.libraries.matrix.api.core.toRoomIdOrAlias
6667
import io.element.android.libraries.matrix.api.permalink.PermalinkData
6768
import io.element.android.libraries.matrix.api.sync.SyncState
69+
import io.element.android.libraries.preferences.api.store.EnableNativeSlidingSyncUseCase
6870
import io.element.android.services.appnavstate.api.AppNavigationStateService
6971
import kotlinx.coroutines.CoroutineScope
7072
import kotlinx.coroutines.FlowPreview
@@ -96,6 +98,8 @@ class LoggedInFlowNode @AssistedInject constructor(
9698
private val shareEntryPoint: ShareEntryPoint,
9799
private val matrixClient: MatrixClient,
98100
private val sendingQueue: SendQueues,
101+
private val logoutEntryPoint: LogoutEntryPoint,
102+
private val enableNativeSlidingSyncUseCase: EnableNativeSlidingSyncUseCase,
99103
snackbarDispatcher: SnackbarDispatcher,
100104
) : BaseFlowNode<LoggedInFlowNode.NavTarget>(
101105
backstack = BackStack(
@@ -225,6 +229,9 @@ class LoggedInFlowNode @AssistedInject constructor(
225229

226230
@Parcelize
227231
data class IncomingShare(val intent: Intent) : NavTarget
232+
233+
@Parcelize
234+
data object LogoutForNativeSlidingSyncMigrationNeeded : NavTarget
228235
}
229236

230237
override fun resolve(navTarget: NavTarget, buildContext: BuildContext): Node {
@@ -271,6 +278,10 @@ class LoggedInFlowNode @AssistedInject constructor(
271278
override fun onRoomDirectorySearchClick() {
272279
backstack.push(NavTarget.RoomDirectorySearch)
273280
}
281+
282+
override fun onLogoutForNativeSlidingSyncMigrationNeeded() {
283+
backstack.push(NavTarget.LogoutForNativeSlidingSyncMigrationNeeded)
284+
}
274285
}
275286
roomListEntryPoint
276287
.nodeBuilder(this, buildContext)
@@ -407,6 +418,20 @@ class LoggedInFlowNode @AssistedInject constructor(
407418
.params(ShareEntryPoint.Params(intent = navTarget.intent))
408419
.build()
409420
}
421+
is NavTarget.LogoutForNativeSlidingSyncMigrationNeeded -> {
422+
val callback = object : LogoutEntryPoint.Callback {
423+
override fun onChangeRecoveryKeyClick() {
424+
backstack.push(NavTarget.SecureBackup())
425+
}
426+
}
427+
428+
logoutEntryPoint.nodeBuilder(this, buildContext)
429+
.onSuccessfulLogoutPendingAction {
430+
enableNativeSlidingSyncUseCase()
431+
}
432+
.callback(callback)
433+
.build()
434+
}
410435
}
411436
}
412437

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Main changes in this version: mainly bug fixes.
2+
Full changelog: https://github.com/element-hq/element-x-android/releases

features/login/impl/src/main/kotlin/io/element/android/features/login/impl/LoginFlowNode.kt

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import com.bumble.appyx.core.modality.BuildContext
1919
import com.bumble.appyx.core.node.Node
2020
import com.bumble.appyx.core.plugin.Plugin
2121
import com.bumble.appyx.navmodel.backstack.BackStack
22-
import com.bumble.appyx.navmodel.backstack.operation.newRoot
2322
import com.bumble.appyx.navmodel.backstack.operation.push
2423
import com.bumble.appyx.navmodel.backstack.operation.singleTop
2524
import dagger.assisted.Assisted
@@ -31,10 +30,8 @@ import io.element.android.features.login.impl.accountprovider.AccountProviderDat
3130
import io.element.android.features.login.impl.qrcode.QrCodeLoginFlowNode
3231
import io.element.android.features.login.impl.screens.changeaccountprovider.ChangeAccountProviderNode
3332
import io.element.android.features.login.impl.screens.confirmaccountprovider.ConfirmAccountProviderNode
34-
import io.element.android.features.login.impl.screens.loginpassword.LoginFormState
3533
import io.element.android.features.login.impl.screens.loginpassword.LoginPasswordNode
3634
import io.element.android.features.login.impl.screens.searchaccountprovider.SearchAccountProviderNode
37-
import io.element.android.features.login.impl.screens.waitlistscreen.WaitListNode
3835
import io.element.android.libraries.architecture.BackstackView
3936
import io.element.android.libraries.architecture.BaseFlowNode
4037
import io.element.android.libraries.architecture.NodeInputs
@@ -112,9 +109,6 @@ class LoginFlowNode @AssistedInject constructor(
112109
@Parcelize
113110
data object LoginPassword : NavTarget
114111

115-
@Parcelize
116-
data class WaitList(val loginFormState: LoginFormState) : NavTarget
117-
118112
@Parcelize
119113
data class OidcView(val oidcDetails: OidcDetails) : NavTarget
120114
}
@@ -181,27 +175,11 @@ class LoginFlowNode @AssistedInject constructor(
181175
createNode<SearchAccountProviderNode>(buildContext, plugins = listOf(callback))
182176
}
183177
NavTarget.LoginPassword -> {
184-
val callback = object : LoginPasswordNode.Callback {
185-
override fun onWaitListError(loginFormState: LoginFormState) {
186-
backstack.newRoot(NavTarget.WaitList(loginFormState))
187-
}
188-
}
189-
createNode<LoginPasswordNode>(buildContext, plugins = listOf(callback))
178+
createNode<LoginPasswordNode>(buildContext)
190179
}
191180
is NavTarget.OidcView -> {
192181
oidcEntryPoint.createFallbackWebViewNode(this, buildContext, navTarget.oidcDetails.url)
193182
}
194-
is NavTarget.WaitList -> {
195-
val inputs = WaitListNode.Inputs(
196-
loginFormState = navTarget.loginFormState,
197-
)
198-
val callback = object : WaitListNode.Callback {
199-
override fun onCancelClick() {
200-
navigateUp()
201-
}
202-
}
203-
createNode<WaitListNode>(buildContext, plugins = listOf(callback, inputs))
204-
}
205183
}
206184
}
207185

features/login/impl/src/main/kotlin/io/element/android/features/login/impl/error/WaitListError.kt

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

features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordNode.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import androidx.compose.ui.Modifier
1212
import com.bumble.appyx.core.modality.BuildContext
1313
import com.bumble.appyx.core.node.Node
1414
import com.bumble.appyx.core.plugin.Plugin
15-
import com.bumble.appyx.core.plugin.plugins
1615
import dagger.assisted.Assisted
1716
import dagger.assisted.AssistedInject
1817
import io.element.android.anvilannotations.ContributesNode
@@ -24,22 +23,13 @@ class LoginPasswordNode @AssistedInject constructor(
2423
@Assisted plugins: List<Plugin>,
2524
private val presenter: LoginPasswordPresenter,
2625
) : Node(buildContext, plugins = plugins) {
27-
interface Callback : Plugin {
28-
fun onWaitListError(loginFormState: LoginFormState)
29-
}
30-
31-
private fun onWaitListError(loginFormState: LoginFormState) {
32-
plugins<Callback>().forEach { it.onWaitListError(loginFormState) }
33-
}
34-
3526
@Composable
3627
override fun View(modifier: Modifier) {
3728
val state = presenter.present()
3829
LoginPasswordView(
3930
state = state,
4031
modifier = modifier,
4132
onBackClick = ::navigateUp,
42-
onWaitListError = ::onWaitListError,
4333
)
4434
}
4535
}

features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordView.kt

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ import androidx.compose.ui.unit.dp
4444
import io.element.android.compound.theme.ElementTheme
4545
import io.element.android.compound.tokens.generated.CompoundIcons
4646
import io.element.android.features.login.impl.R
47-
import io.element.android.features.login.impl.error.isWaitListError
4847
import io.element.android.features.login.impl.error.loginError
4948
import io.element.android.libraries.architecture.AsyncData
5049
import io.element.android.libraries.designsystem.atomic.molecules.ButtonColumnMolecule
@@ -72,7 +71,6 @@ import io.element.android.libraries.ui.strings.CommonStrings
7271
fun LoginPasswordView(
7372
state: LoginPasswordState,
7473
onBackClick: () -> Unit,
75-
onWaitListError: (LoginFormState) -> Unit,
7674
modifier: Modifier = Modifier,
7775
) {
7876
val isLoading by remember(state.loginAction) {
@@ -149,16 +147,9 @@ fun LoginPasswordView(
149147
}
150148

151149
if (state.loginAction is AsyncData.Failure) {
152-
when {
153-
state.loginAction.error.isWaitListError() -> {
154-
onWaitListError(state.formState)
155-
}
156-
else -> {
157-
LoginErrorDialog(error = state.loginAction.error, onDismiss = {
158-
state.eventSink(LoginPasswordEvents.ClearError)
159-
})
160-
}
161-
}
150+
LoginErrorDialog(error = state.loginAction.error, onDismiss = {
151+
state.eventSink(LoginPasswordEvents.ClearError)
152+
})
162153
}
163154
}
164155
}
@@ -302,6 +293,5 @@ internal fun LoginPasswordViewPreview(@PreviewParameter(LoginPasswordStateProvid
302293
LoginPasswordView(
303294
state = state,
304295
onBackClick = {},
305-
onWaitListError = {},
306296
)
307297
}

features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListEvents.kt

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

features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListNode.kt

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

0 commit comments

Comments
 (0)