From fb5a85db818360c6bd0ce90817efacc41d89273c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 12 Sep 2019 15:12:18 +0200 Subject: [PATCH] put min room count in constant --- src/components/views/rooms/RoomBreadcrumbs.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomBreadcrumbs.js b/src/components/views/rooms/RoomBreadcrumbs.js index 6f180ff4a5..2cbdc31464 100644 --- a/src/components/views/rooms/RoomBreadcrumbs.js +++ b/src/components/views/rooms/RoomBreadcrumbs.js @@ -29,6 +29,7 @@ import DMRoomMap from "../../../utils/DMRoomMap"; import {_t} from "../../../languageHandler"; const MAX_ROOMS = 20; +const MIN_ROOMS_BEFORE_ENABLED = 10; export default class RoomBreadcrumbs extends React.Component { constructor(props) { @@ -159,7 +160,7 @@ export default class RoomBreadcrumbs extends React.Component { const joinedRoomCount = client.getRooms().reduce((count, r) => { return count + (r.getMyMembership() === "join" ? 1 : 0); }, 0); - return joinedRoomCount >= 10; + return joinedRoomCount >= MIN_ROOMS_BEFORE_ENABLED; } _loadRoomIds(roomIds) {