From 83a01eb88043784cf83694913501858f6e81b0bf Mon Sep 17 00:00:00 2001 From: Yan Minagawa Date: Sat, 26 Sep 2026 16:48:46 +0200 Subject: [PATCH] Send "Link new device" to the link-new-device flow again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PreferencesFlowNode routed navigateToLinkNewDevice() to callback.navigateToAddAccount(), so tapping "Link new device" under Account settings opened the "Add an account" screen instead — the opposite direction, signing an extra account into this device rather than authorising a new one. The correct destination was already implemented and simply unreachable: LoggedInFlowNode handles navigateToLinkNewDevice() by pushing NavTarget.LinkNewDevice. Call that instead. Regression from 9b2577f1dd ("Split settings: app settings / account settings"); the previous code called callback.navigateToLinkNewDevice(). It went unnoticed because FeatureFlags.QrCodeLogin defaults to false, which hides the entry point on default builds. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_017y1etzTCPzowrNcPyRBdjm --- .../android/features/preferences/impl/PreferencesFlowNode.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/PreferencesFlowNode.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/PreferencesFlowNode.kt index 5d8bb2bf42..d9db0219d4 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/PreferencesFlowNode.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/PreferencesFlowNode.kt @@ -186,7 +186,7 @@ class PreferencesFlowNode( } override fun navigateToLinkNewDevice() { - callback.navigateToAddAccount() + callback.navigateToLinkNewDevice() } override fun navigateToUserProfile(matrixUser: MatrixUser) {