commit f9eb669132c3375f81481c9d9ed957c6607352f3
parent 066b3cdde8ee3b285b8ab085dafb95e615639299
Author: tappu75e@duck.com <tappu75e@duck.com>
Date: Mon, 14 Aug 2023 22:22:31 +0300
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
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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])