From 106977ccd45aacf1d72966280c0fe5544d84bcf4 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 16 May 2026 12:31:07 +0000 Subject: [PATCH] fix(relay-members): route NIP-43 join/leave through launchSigner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The join/leave-request buttons launched a raw scope.launch(Dispatchers.IO) and called account.signer.sign() directly. When the signer threw — TimedOutException from a Samsung-A53 / Android-16 Amber prompt the user didn't respond to in 30s, or any other SignerException — the failure escaped the composable's scope and was reported as an uncaught crash instead of being toasted/logged like every other signing operation. Route both buttons through accountViewModel.launchSigner so the same SignerExceptions handling that every other signing entry point uses applies here too. --- .../ui/screen/loggedIn/relays/nip43/RelayMembersScreen.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/nip43/RelayMembersScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/nip43/RelayMembersScreen.kt index a484d2d034..d4709a5e0a 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/nip43/RelayMembersScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/relays/nip43/RelayMembersScreen.kt @@ -154,13 +154,13 @@ fun RelayMembersScreen( joinRequestSent = joinRequestSent, leaveRequestSent = leaveRequestSent, onJoinRequest = { - scope.launch(Dispatchers.IO) { + accountViewModel.launchSigner { sendJoinRequest(normalizedRelayUrl, accountViewModel) joinRequestSent = true } }, onLeaveRequest = { - scope.launch(Dispatchers.IO) { + accountViewModel.launchSigner { sendLeaveRequest(normalizedRelayUrl, accountViewModel) leaveRequestSent = true }