diff --git a/src/async-components/views/dialogs/eventindex/ManageEventIndex.js b/src/async-components/views/dialogs/eventindex/ManageEventIndex.js index 8623856b2e..d9a0cdcb5d 100644 --- a/src/async-components/views/dialogs/eventindex/ManageEventIndex.js +++ b/src/async-components/views/dialogs/eventindex/ManageEventIndex.js @@ -41,8 +41,6 @@ export default class ManageEventIndex extends React.Component { this.state = { eventIndexSize: 0, - crawlingRooms: 0, - totalCrawlingRooms: 0, eventCount: 0, roomCount: 0, currentRoom: null, @@ -80,8 +78,6 @@ export default class ManageEventIndex extends React.Component { let eventIndexSize = 0; let roomCount = 0; let eventCount = 0; - let crawlingRooms = 0; - let totalCrawlingRooms = 0; let currentRoom = null; const eventIndex = EventIndexPeg.get(); @@ -94,18 +90,12 @@ export default class ManageEventIndex extends React.Component { roomCount = stats.roomCount; eventCount = stats.eventCount; - const crawledRooms = eventIndex.currentlyCrawledRooms(); - crawlingRooms = crawledRooms.crawlingRooms.size; - totalCrawlingRooms = crawledRooms.totalRooms.size; - const room = eventIndex.currentRoom(); if (room) currentRoom = room.name; } this.setState({ eventIndexSize, - crawlingRooms, - totalCrawlingRooms, eventCount, roomCount, currentRoom, diff --git a/src/indexing/EventIndex.js b/src/indexing/EventIndex.js index 09abb5d209..a10f4aff71 100644 --- a/src/indexing/EventIndex.js +++ b/src/indexing/EventIndex.js @@ -440,33 +440,6 @@ export default class EventIndex { return indexManager.getStats(); } - currentlyCrawledRooms() { - const crawlingRooms = new Set(); - const totalRooms = new Set(); - - this.crawlerCheckpoints.forEach((checkpoint, index) => { - crawlingRooms.add(checkpoint.roomId); - }); - - if (this._currentCheckpoint !== null) { - crawlingRooms.add(this._currentCheckpoint.roomId); - } - - const client = MatrixClientPeg.get(); - const rooms = client.getRooms(); - - const isRoomEncrypted = (room) => { - return client.isRoomEncrypted(room.roomId); - }; - - const encryptedRooms = rooms.filter(isRoomEncrypted); - encryptedRooms.forEach((room, index) => { - totalRooms.add(room.roomId); - }); - - return {crawlingRooms, totalRooms}; - } - /** * Get the room that we are currently crawling. *