only import throttle fn

pull/21833/head
Bruno Windels 2019-02-07 16:03:12 +00:00
parent 35d9c02ecd
commit c0b9d99385
1 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ import dis from '../dispatcher';
import * as RoomNotifs from '../RoomNotifs';
import RoomListStore from './RoomListStore';
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))$/;
@ -52,7 +52,7 @@ class CustomRoomTagStore extends EventEmitter {
this._state = {tags: {}};
// as RoomListStore gets updated by every timeline event
// throttle this to only run every 500ms
this._getUpdatedTags = _.throttle(
this._getUpdatedTags = throttle(
this._getUpdatedTags, 500, {
leading: true,
trailing: true,