EventIndex: Fix some lint errors.
This commit is contained in:
parent
c397de18bd
commit
3c46a56391
3 changed files with 10 additions and 11 deletions
|
@ -113,11 +113,11 @@ export default class PreferencesUserSettingsTab extends React.Component {
|
|||
let crawlingRooms = 0;
|
||||
let totalCrawlingRooms = 0;
|
||||
|
||||
let eventIndex = EventIndexPeg.get();
|
||||
const eventIndex = EventIndexPeg.get();
|
||||
|
||||
if (eventIndex !== null) {
|
||||
eventIndexSize = await eventIndex.indexSize();
|
||||
let crawledRooms = eventIndex.currentlyCrawledRooms();
|
||||
const crawledRooms = eventIndex.currentlyCrawledRooms();
|
||||
crawlingRooms = crawledRooms.crawlingRooms.size;
|
||||
totalCrawlingRooms = crawledRooms.totalRooms.size;
|
||||
}
|
||||
|
@ -211,8 +211,7 @@ export default class PreferencesUserSettingsTab extends React.Component {
|
|||
|
||||
if (!this.state.eventIndexingEnabled) {
|
||||
crawlerState = <div>{_t("Message downloader is stopped.")}</div>;
|
||||
}
|
||||
else if (this.state.crawlingRooms === 0) {
|
||||
} else if (this.state.crawlingRooms === 0) {
|
||||
crawlerState = <div>{_t("Message downloader is currently idle.")}</div>;
|
||||
} else {
|
||||
crawlerState = (
|
||||
|
@ -232,7 +231,7 @@ export default class PreferencesUserSettingsTab extends React.Component {
|
|||
{
|
||||
_t( "To enable search in encrypted rooms, Riot needs to run " +
|
||||
"a background process to download historical messages " +
|
||||
"from those rooms to your computer."
|
||||
"from those rooms to your computer.",
|
||||
)
|
||||
}
|
||||
<div className='mx_SettingsTab_subsectionText'>
|
||||
|
|
|
@ -431,8 +431,8 @@ export default class EventIndex {
|
|||
}
|
||||
|
||||
currentlyCrawledRooms() {
|
||||
let crawlingRooms = new Set();
|
||||
let totalRooms = new Set();
|
||||
const crawlingRooms = new Set();
|
||||
const totalRooms = new Set();
|
||||
|
||||
this.crawlerCheckpoints.forEach((checkpoint, index) => {
|
||||
crawlingRooms.add(checkpoint.roomId);
|
||||
|
@ -454,6 +454,6 @@ export default class EventIndex {
|
|||
totalRooms.add(room.roomId);
|
||||
});
|
||||
|
||||
return {crawlingRooms, totalRooms}
|
||||
return {crawlingRooms, totalRooms};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -495,5 +495,5 @@ export const SETTINGS = {
|
|||
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
||||
displayName: _td("How long should the crawler wait between requests"),
|
||||
default: true,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue