diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-12-09 19:16:50 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-12-09 19:16:50 -0500 |
commit | 468d8ed053b1126d9821b099d4acaeaf8e11f334 (patch) | |
tree | da57414d03887a1cdff3f8c51caa0bd74db7f0c1 /web/react/utils/utils.jsx | |
parent | 985dc06e5fb9d809e4be4e5fff2c3b1ca66c1ea9 (diff) | |
parent | 99d79eee56a1b5a27f18fffd90545b4aef191bba (diff) | |
download | chat-468d8ed053b1126d9821b099d4acaeaf8e11f334.tar.gz chat-468d8ed053b1126d9821b099d4acaeaf8e11f334.tar.bz2 chat-468d8ed053b1126d9821b099d4acaeaf8e11f334.zip |
Merge pull request #1625 from florianorben/ephemeral_messages
add helper method to add ephemeral messages; also switch 'delete mess…
Diffstat (limited to 'web/react/utils/utils.jsx')
-rw-r--r-- | web/react/utils/utils.jsx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index c2e4276b0..13c7f961a 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -1254,3 +1254,8 @@ export function isFeatureEnabled(feature) { export function isSystemMessage(post) { return post.type && (post.type.lastIndexOf(Constants.SYSTEM_MESSAGE_PREFIX) === 0); } + +// convenience method to dispatch an event in JS' next event cycle +export function defer(fn) { + setTimeout(fn, 0); +} |