total + first member shows as one too many room members

i was confused when a room with me and two friends showed as "user1" and
3 others.
This commit is contained in:
Adasauce 2020-03-02 21:30:19 -04:00
parent 1a2b8b7a6b
commit 309461dcba
No known key found for this signature in database
GPG key ID: B4FD3151235211CB

View file

@ -1530,7 +1530,7 @@ Cache::getRoomName(lmdb::txn &txn, lmdb::dbi &statesdb, lmdb::dbi &membersdb)
if (total == 2)
return first_member;
else if (total > 2)
return QString("%1 and %2 others").arg(first_member).arg(total);
return QString("%1 and %2 others").arg(first_member).arg(total - 1);
return "Empty Room";
}