mirror of https://github.com/vector-im/riot-web
only import throttle fn
parent
35d9c02ecd
commit
c0b9d99385
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue