From a9f3285eebcf80050ffcd582d1b5922492b7d3c5 Mon Sep 17 00:00:00 2001 From: shum Date: Sat, 24 Oct 2026 17:19:56 +0000 Subject: [PATCH] core: match a name warning in the same case --- src/Simplex/Chat/View.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Simplex/Chat/View.hs b/src/Simplex/Chat/View.hs index 34ec32396b..95380ddd43 100644 --- a/src/Simplex/Chat/View.hs +++ b/src/Simplex/Chat/View.hs @@ -2847,12 +2847,12 @@ viewChatError isCmd logLevel testView = \case CEChatNotStopped -> ["error: chat not stopped"] CEChatStoreChanged -> ["error: chat store changed, please restart chat"] CEInvalidConnReq -> viewInvalidConnReq - CESimplexDomainNotReady domain (SDENameWarning w) -> [viewNameNotConnectable domain w] CESimplexDomainNotReady domain domainErr -> - let reason = case domainErr of - SDENoValidLink -> "has no valid connection link" - SDEUnknownDomain -> "is not included in the connection link's profile" - in [plain $ "SimpleX name " <> strEncode domain <> " " <> reason] + let notReady reason = [plain $ "SimpleX name " <> strEncode domain <> " " <> reason] + in case domainErr of + SDENameWarning w -> [viewNameNotConnectable domain w] + SDENoValidLink -> notReady "has no valid connection link" + SDEUnknownDomain -> notReady "is not included in the connection link's profile" CENotResolvedLocally -> ["no matching chat found, name resolution is disabled"] CEUnsupportedConnReq -> [ "", "Connection link is not supported by the your app version, please ugrade it.", plain updateStr] CEInvalidChatMessage Connection {connId} msgMeta_ msg e ->