From f0852b04bc08c36177498686f55f6a2d3ca69e87 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Mon, 8 Apr 2024 12:21:45 +0200 Subject: [PATCH 1/3] remove deprecated string to not clutter UI, we do not show a "reasoning bar" at all for the device chat. --- src/renderer/components/composer/DisabledMessageInput.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/composer/DisabledMessageInput.tsx b/src/renderer/components/composer/DisabledMessageInput.tsx index a84aec7e76..42384a9ddf 100644 --- a/src/renderer/components/composer/DisabledMessageInput.tsx +++ b/src/renderer/components/composer/DisabledMessageInput.tsx @@ -19,7 +19,8 @@ const DisabledMessageInput = ({ reason }: Props) => { case DisabledChatReasons.DEADDROP: return tx('messaging_disabled_deaddrop') case DisabledChatReasons.DEVICE_CHAT: - return tx('messaging_disabled_device_chat') + // no call to tx(), the bar will be removed below to no clutter UI + return 'messaging_disabled_device_chat' case DisabledChatReasons.UNKNOWN: // Unknown cases are likely to be caused by a new case introduced by a new core update that is not yet handled here, // but we don't want to crash the UI From 7fe6f0040ced330307727f60781a214d664198f0 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Mon, 8 Apr 2024 12:54:16 +0200 Subject: [PATCH 2/3] fix reason checking i think, checking for `!reason` after `switch()` is a bug; it seems one wanted to check for the outcome of the `switch()`, so `!reasonMessage` --- .../components/composer/DisabledMessageInput.tsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/renderer/components/composer/DisabledMessageInput.tsx b/src/renderer/components/composer/DisabledMessageInput.tsx index 42384a9ddf..7c99c928e3 100644 --- a/src/renderer/components/composer/DisabledMessageInput.tsx +++ b/src/renderer/components/composer/DisabledMessageInput.tsx @@ -19,8 +19,8 @@ const DisabledMessageInput = ({ reason }: Props) => { case DisabledChatReasons.DEADDROP: return tx('messaging_disabled_deaddrop') case DisabledChatReasons.DEVICE_CHAT: - // no call to tx(), the bar will be removed below to no clutter UI - return 'messaging_disabled_device_chat' + // To not clutter UI, hide reasoning bar for "Device Messages" + return null case DisabledChatReasons.UNKNOWN: // Unknown cases are likely to be caused by a new case introduced by a new core update that is not yet handled here, // but we don't want to crash the UI @@ -30,13 +30,7 @@ const DisabledMessageInput = ({ reason }: Props) => { } }, [reason, tx]) - // If no reason was given we return no component - if (!reason) { - return null - } - - // If we're in the "device message" chat we also do not want to show anything - if (reason === DisabledChatReasons.DEVICE_CHAT) { + if (!reasonMessage) { return null } From 9146b602baada7ff537c8f56ff7518ba1ed9ffab Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Mon, 8 Apr 2024 13:08:26 +0200 Subject: [PATCH 3/3] add CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87a10468b0..cadb47ea97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Changed - Update translations (2024-04-04) #3746 +- Remove deprecated translations #3756 ### Fixed - fix chat audit dialog was going out of viewport on smaller screens #3736