From acdab8cce6656c2fced5802c4692604773b0055b Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Sun, 18 Jun 2017 13:45:28 -0400 Subject: Fix scroll store typo and user action copy/paste errors (#6680) --- webapp/actions/user_actions.jsx | 16 ++++++++++------ webapp/stores/scroll_store.jsx | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'webapp') 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); } } -- cgit v1.2.3-1-g7c22