summaryrefslogtreecommitdiffstats
path: root/webapp/components/suggestion/provider.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-09-06 23:04:13 -0700
committerChristopher Speller <crspeller@gmail.com>2017-09-06 23:11:58 -0700
commitd8bd57901e33a7057e26e782e295099ffcc0da89 (patch)
treee12dfc8cad42b1576756d19d7fbfd82646a009bf /webapp/components/suggestion/provider.jsx
parent7bc8e9a08dfde56387f946fdf5086252aa4d0491 (diff)
downloadchat-d8bd57901e33a7057e26e782e295099ffcc0da89.tar.gz
chat-d8bd57901e33a7057e26e782e295099ffcc0da89.tar.bz2
chat-d8bd57901e33a7057e26e782e295099ffcc0da89.zip
Removing webapp
Diffstat (limited to 'webapp/components/suggestion/provider.jsx')
-rw-r--r--webapp/components/suggestion/provider.jsx38
1 files changed, 0 insertions, 38 deletions
diff --git a/webapp/components/suggestion/provider.jsx b/webapp/components/suggestion/provider.jsx
deleted file mode 100644
index a5b54fb26..000000000
--- a/webapp/components/suggestion/provider.jsx
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-import SuggestionStore from 'stores/suggestion_store.jsx';
-
-export default class Provider {
- constructor() {
- this.latestPrefix = '';
- this.latestComplete = true;
- this.disableDispatches = false;
- }
-
- handlePretextChanged(suggestionId, pretext) { // eslint-disable-line no-unused-vars
- // NO-OP for inherited classes to override
- }
-
- startNewRequest(suggestionId, prefix) {
- this.latestPrefix = prefix;
- this.latestComplete = false;
-
- // Don't use the dispatcher here since this is only called while handling an event
- SuggestionStore.setSuggestionsPending(suggestionId, true);
- }
-
- shouldCancelDispatch(prefix) {
- if (this.disableDispatches) {
- return true;
- }
-
- if (prefix === this.latestPrefix) {
- this.latestComplete = true;
- } else if (this.latestComplete) {
- return true;
- }
-
- return false;
- }
-}