summaryrefslogtreecommitdiffstats
path: root/webapp/utils/async_client.jsx
diff options
context:
space:
mode:
authorDavid Lu <david.lu97@outlook.com>2016-08-11 10:32:41 -0400
committerJoram Wilander <jwawilander@gmail.com>2016-08-11 10:32:41 -0400
commitbb0b895bad5cddbc0297d0857d10a531a6ca6755 (patch)
tree3fa599d9a0a418deca030906b0793e92b09a0979 /webapp/utils/async_client.jsx
parent0cee02d4d3ca05e1e09a918f175c8e021743e992 (diff)
downloadchat-bb0b895bad5cddbc0297d0857d10a531a6ca6755.tar.gz
chat-bb0b895bad5cddbc0297d0857d10a531a6ca6755.tar.bz2
chat-bb0b895bad5cddbc0297d0857d10a531a6ca6755.zip
Removed /shortcuts from mobile (#3753)
Diffstat (limited to 'webapp/utils/async_client.jsx')
-rw-r--r--webapp/utils/async_client.jsx23
1 files changed, 13 insertions, 10 deletions
diff --git a/webapp/utils/async_client.jsx b/webapp/utils/async_client.jsx
index babfefb6d..185fa5b4e 100644
--- a/webapp/utils/async_client.jsx
+++ b/webapp/utils/async_client.jsx
@@ -10,6 +10,7 @@ import ChannelStore from 'stores/channel_store.jsx';
import PostStore from 'stores/post_store.jsx';
import UserStore from 'stores/user_store.jsx';
import * as utils from './utils.jsx';
+import * as UserAgent from './user_agent.jsx';
import ErrorStore from 'stores/error_store.jsx';
import Constants from './constants.jsx';
@@ -871,17 +872,19 @@ export function getSuggestedCommands(command, suggestionId, component) {
(data) => {
var matches = [];
data.forEach((cmd) => {
- if (('/' + cmd.trigger).indexOf(command) === 0) {
- const s = '/' + cmd.trigger;
- let hint = '';
- if (cmd.auto_complete_hint && cmd.auto_complete_hint.length !== 0) {
- hint = cmd.auto_complete_hint;
+ if (cmd.trigger !== 'shortcuts' || !UserAgent.isMobileApp()) {
+ if (('/' + cmd.trigger).indexOf(command) === 0) {
+ const s = '/' + cmd.trigger;
+ let hint = '';
+ if (cmd.auto_complete_hint && cmd.auto_complete_hint.length !== 0) {
+ hint = cmd.auto_complete_hint;
+ }
+ matches.push({
+ suggestion: s,
+ hint,
+ description: cmd.auto_complete_desc
+ });
}
- matches.push({
- suggestion: s,
- hint,
- description: cmd.auto_complete_desc
- });
}
});