From f9eb669132c3375f81481c9d9ed957c6607352f3 Mon Sep 17 00:00:00 2001 From: "tappu75e@duck.com" Date: Mon, 14 Aug 2023 22:22:31 +0300 Subject: [PATCH] replies: fix bug where it would sometimes show -1 Changelog-Fixed: Fix bug where it would sometimes show -1 in replies Closes: https://github.com/damus-io/damus/pull/1476 --- damus/Views/Events/Components/ReplyDescription.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/damus/Views/Events/Components/ReplyDescription.swift b/damus/Views/Events/Components/ReplyDescription.swift index 5bc9c89a..44a98146 100644 --- a/damus/Views/Events/Components/ReplyDescription.swift +++ b/damus/Views/Events/Components/ReplyDescription.swift @@ -47,7 +47,7 @@ func reply_desc(profiles: Profiles, event: NostrEvent, replying_to: NostrEvent?, if uniqueNames.count > 1 { let othersCount = n - pubkeys.count - if othersCount == 0 { + if othersCount <= 0 { return String(format: NSLocalizedString("Replying to %@ & %@", bundle: bundle, comment: "Label to indicate that the user is replying to 2 users."), locale: locale, uniqueNames[0], uniqueNames[1]) } else { return String(format: localizedStringFormat(key: "replying_to_two_and_others", locale: locale), locale: locale, othersCount, uniqueNames[0], uniqueNames[1])