From 2acd962a704e58c4e0777760f4ed3a28e2c6b935 Mon Sep 17 00:00:00 2001 From: Nicolas Mauri Date: Mon, 6 Feb 2023 18:11:24 +0100 Subject: [PATCH 1/2] Hide the presence info if the presence status is unknown --- Riot/Utils/Tools.m | 3 +++ changelog.d/6597.change | 1 + 2 files changed, 4 insertions(+) create mode 100644 changelog.d/6597.change diff --git a/Riot/Utils/Tools.m b/Riot/Utils/Tools.m index 77ae6837e..ad2eab90d 100644 --- a/Riot/Utils/Tools.m +++ b/Riot/Utils/Tools.m @@ -37,6 +37,9 @@ break; case MXPresenceUnknown: // Do like matrix-js-sdk + presenceText = @""; + break; + case MXPresenceOffline: presenceText = [VectorL10n roomParticipantsOffline]; break; diff --git a/changelog.d/6597.change b/changelog.d/6597.change new file mode 100644 index 000000000..46ca176a7 --- /dev/null +++ b/changelog.d/6597.change @@ -0,0 +1 @@ +Hide the presence info if the presence status is unknown. From 72902f77af054c27b6292a890ababd8ef10bdeb7 Mon Sep 17 00:00:00 2001 From: Nicolas Mauri Date: Tue, 7 Feb 2023 11:15:26 +0100 Subject: [PATCH 2/2] Cleanup --- Riot/Utils/Tools.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Riot/Utils/Tools.m b/Riot/Utils/Tools.m index ad2eab90d..128fe3694 100644 --- a/Riot/Utils/Tools.m +++ b/Riot/Utils/Tools.m @@ -36,9 +36,10 @@ presenceText = [VectorL10n roomParticipantsIdle]; break; - case MXPresenceUnknown: // Do like matrix-js-sdk - presenceText = @""; - break; + case MXPresenceUnknown: + // Fix https://github.com/vector-im/element-ios/issues/6597 + // Return nil because we don't want to display anything if the status is unknown + return nil; case MXPresenceOffline: presenceText = [VectorL10n roomParticipantsOffline];