summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-06-18 13:45:28 -0400
committerGitHub <noreply@github.com>2017-06-18 13:45:28 -0400
commitacdab8cce6656c2fced5802c4692604773b0055b (patch)
treefd8722674a2fb51ce157dbf861d3487278854c59 /webapp
parent64eb968b7d080645f96c489b034f31bb9ed70ba4 (diff)
downloadchat-acdab8cce6656c2fced5802c4692604773b0055b.tar.gz
chat-acdab8cce6656c2fced5802c4692604773b0055b.tar.bz2
chat-acdab8cce6656c2fced5802c4692604773b0055b.zip
Fix scroll store typo and user action copy/paste errors (#6680)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/actions/user_actions.jsx16
-rw-r--r--webapp/stores/scroll_store.jsx2
2 files changed, 11 insertions, 7 deletions
diff --git a/webapp/actions/user_actions.jsx b/webapp/actions/user_actions.jsx
index cd8b05562..88325de3e 100644
--- a/webapp/actions/user_actions.jsx
+++ b/webapp/actions/user_actions.jsx
@@ -37,7 +37,9 @@ import {Preferences as PreferencesRedux} from 'mattermost-redux/constants';
export function loadMe(callback) {
UserActions.loadMe()(dispatch, getState).then(
() => {
- loadCurrentLocale();
+ if (window.mm_config) {
+ loadCurrentLocale();
+ }
if (callback) {
callback();
@@ -68,6 +70,8 @@ export function loadMeAndConfig(callback) {
});
}
+ loadCurrentLocale();
+
getLicenseConfig()(store.dispatch, store.getState).then(
(license) => { // eslint-disable-line max-nested-callbacks
global.window.mm_license = license;
@@ -471,7 +475,7 @@ export function searchUsersNotInTeam(term, teamId = TeamStore.getCurrentId(), op
export function autocompleteUsersInChannel(username, channelId, success) {
const channel = ChannelStore.get(channelId);
const teamId = channel ? channel.team_id : TeamStore.getCurrentId();
- UserActions.autocompleteRedux(username, teamId, channelId)(dispatch, getState).then(
+ UserActions.autocomplete(username, teamId, channelId)(dispatch, getState).then(
(data) => {
if (success) {
success(data);
@@ -481,7 +485,7 @@ export function autocompleteUsersInChannel(username, channelId, success) {
}
export function autocompleteUsersInTeam(username, success) {
- UserActions.autocompleteRedux(username, TeamStore.getCurrentId())(dispatch, getState).then(
+ UserActions.autocomplete(username, TeamStore.getCurrentId())(dispatch, getState).then(
(data) => {
if (success) {
success(data);
@@ -491,7 +495,7 @@ export function autocompleteUsersInTeam(username, success) {
}
export function autocompleteUsers(username, success) {
- UserActions.autocompleteRedux(username)(dispatch, getState).then(
+ UserActions.autocomplete(username)(dispatch, getState).then(
(data) => {
if (success) {
success(data);
@@ -540,7 +544,7 @@ export function updateUserNotifyProps(props, success, error) {
}
export function updateUserRoles(userId, newRoles, success, error) {
- UserActions.updateUserRolesRedux(userId, newRoles)(dispatch, getState).then(
+ UserActions.updateUserRoles(userId, newRoles)(dispatch, getState).then(
(data) => {
if (data && success) {
success(data);
@@ -584,7 +588,7 @@ export function checkMfa(loginId, success, error) {
return;
}
- UserActions.checkMfaRedux(loginId)(dispatch, getState).then(
+ UserActions.checkMfa(loginId)(dispatch, getState).then(
(data) => {
if (data != null && success) {
success(data);
diff --git a/webapp/stores/scroll_store.jsx b/webapp/stores/scroll_store.jsx
index 03a5f4e08..4f5abd64a 100644
--- a/webapp/stores/scroll_store.jsx
+++ b/webapp/stores/scroll_store.jsx
@@ -14,7 +14,7 @@ class ScrollStoreClass extends EventEmitter {
this.on(UPDATE_POST_SCROLL_EVENT, callback);
}
- removePostScrollLisener(callback) {
+ removePostScrollListener(callback) {
this.removeListener(UPDATE_POST_SCROLL_EVENT, callback);
}
}