Add option to disable Emoji suggestions
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
parent
94ec11d3e1
commit
b2de016b35
4 changed files with 11 additions and 0 deletions
|
@ -25,6 +25,7 @@ import {PillCompletion} from './Components';
|
|||
import type {SelectionRange, Completion} from './Autocompleter';
|
||||
import _uniq from 'lodash/uniq';
|
||||
import _sortBy from 'lodash/sortBy';
|
||||
import UserSettingsStore from '../UserSettingsStore';
|
||||
|
||||
import EmojiData from '../stripped-emoji.json';
|
||||
|
||||
|
@ -96,6 +97,10 @@ export default class EmojiProvider extends AutocompleteProvider {
|
|||
}
|
||||
|
||||
async getCompletions(query: string, selection: SelectionRange) {
|
||||
if (UserSettingsStore.getSyncedSetting("MessageComposerInput.dontSuggestEmoji")) {
|
||||
return []; // don't give any suggestions if the user doesn't want them
|
||||
}
|
||||
|
||||
const EmojiText = sdk.getComponent('views.elements.EmojiText');
|
||||
|
||||
let completions = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue