mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
* PLT-5860 Updated copyright date in about modal * PLT-5860 Updated copyright notice in JSX files * PLT-5860 Updated copyright notice in go files * Fixed misc copyright dates * Fixed component snapshots
29 lines
723 B
JavaScript
29 lines
723 B
JavaScript
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
export default class Provider {
|
|
constructor() {
|
|
this.latestPrefix = '';
|
|
this.latestComplete = true;
|
|
}
|
|
|
|
handlePretextChanged(suggestionId, pretext) { // eslint-disable-line no-unused-vars
|
|
// NO-OP for inherited classes to override
|
|
}
|
|
|
|
startNewRequest(prefix) {
|
|
this.latestPrefix = prefix;
|
|
this.latestComplete = false;
|
|
}
|
|
|
|
shouldCancelDispatch(prefix) {
|
|
if (prefix === this.latestPrefix) {
|
|
this.latestComplete = true;
|
|
} else if (this.latestComplete) {
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
}
|