only import throttle fn
parent
35d9c02ecd
commit
c0b9d99385
|
@ -17,7 +17,7 @@ import dis from '../dispatcher';
|
||||||
import * as RoomNotifs from '../RoomNotifs';
|
import * as RoomNotifs from '../RoomNotifs';
|
||||||
import RoomListStore from './RoomListStore';
|
import RoomListStore from './RoomListStore';
|
||||||
import EventEmitter from 'events';
|
import EventEmitter from 'events';
|
||||||
import * as _ from "lodash";
|
import { throttle } from "lodash";
|
||||||
|
|
||||||
const STANDARD_TAGS_REGEX = /^(m\.(favourite|lowpriority|server_notice)|im\.vector\.fake\.(invite|recent|direct|archived))$/;
|
const STANDARD_TAGS_REGEX = /^(m\.(favourite|lowpriority|server_notice)|im\.vector\.fake\.(invite|recent|direct|archived))$/;
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ class CustomRoomTagStore extends EventEmitter {
|
||||||
this._state = {tags: {}};
|
this._state = {tags: {}};
|
||||||
// as RoomListStore gets updated by every timeline event
|
// as RoomListStore gets updated by every timeline event
|
||||||
// throttle this to only run every 500ms
|
// throttle this to only run every 500ms
|
||||||
this._getUpdatedTags = _.throttle(
|
this._getUpdatedTags = throttle(
|
||||||
this._getUpdatedTags, 500, {
|
this._getUpdatedTags, 500, {
|
||||||
leading: true,
|
leading: true,
|
||||||
trailing: true,
|
trailing: true,
|
||||||
|
|
Loading…
Reference in New Issue