mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-07 15:08:24 +00:00
only import throttle fn
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user