mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-20 09:01:17 -08:00
patch dm room nicknames applying to many rooms
This commit is contained in:
1 file changed
+5
-1
@@ -27,7 +27,11 @@ export const useRoomName = (room: Room): string => {
|
||||
room.recalculate();
|
||||
}
|
||||
|
||||
const nextName = dmNickname ?? room.name;
|
||||
// small room = dm i promise trust
|
||||
const memberCount = room.getJoinedMemberCount();
|
||||
const isSmallRoom = memberCount <= 2;
|
||||
|
||||
const nextName = isSmallRoom && dmNickname ? dmNickname : room.name;
|
||||
setName((prev) => (prev !== nextName ? nextName : prev));
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user