Send "Link new device" to the link-new-device flow again

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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017y1etzTCPzowrNcPyRBdjm
This commit is contained in:
Yan Minagawa
2026-09-26 16:48:46 +02:00
parent 4bf2a094c7
commit 83a01eb880
@@ -186,7 +186,7 @@ class PreferencesFlowNode(
}
override fun navigateToLinkNewDevice() {
callback.navigateToAddAccount()
callback.navigateToLinkNewDevice()
}
override fun navigateToUserProfile(matrixUser: MatrixUser) {