From db7540b111f8b9f983adcfc73fd897e5d83c2fef Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Wed, 8 Mar 2017 04:13:16 -0500 Subject: Add sync logic for DMs/GMs when network reconnects (#5676) --- webapp/components/needs_team.jsx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'webapp/components') diff --git a/webapp/components/needs_team.jsx b/webapp/components/needs_team.jsx index fb6029c2b..5cb714ebc 100644 --- a/webapp/components/needs_team.jsx +++ b/webapp/components/needs_team.jsx @@ -14,6 +14,8 @@ import PreferenceStore from 'stores/preference_store.jsx'; import ChannelStore from 'stores/channel_store.jsx'; import * as GlobalActions from 'actions/global_actions.jsx'; import {startPeriodicStatusUpdates, stopPeriodicStatusUpdates} from 'actions/status_actions.jsx'; +import {startPeriodicSync, stopPeriodicSync} from 'actions/websocket_actions.jsx'; + import Constants from 'utils/constants.jsx'; const TutorialSteps = Constants.TutorialSteps; const Preferences = Constants.Preferences; @@ -94,6 +96,7 @@ export default class NeedsTeam extends React.Component { GlobalActions.viewLoggedIn(); startPeriodicStatusUpdates(); + startPeriodicSync(); // Set up tracking for whether the window is active window.isActive = true; @@ -140,6 +143,7 @@ export default class NeedsTeam extends React.Component { iNoBounce.disable(); } stopPeriodicStatusUpdates(); + stopPeriodicSync(); } render() { -- cgit v1.2.3-1-g7c22 From bfc8dafe5eb03d6e4daa8fbc42f8361674474479 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Thu, 9 Mar 2017 04:14:51 -0500 Subject: Fix MFA page showing up when not active on account switch (#5687) --- webapp/components/login/login_controller.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'webapp/components') diff --git a/webapp/components/login/login_controller.jsx b/webapp/components/login/login_controller.jsx index 9bb8a4324..38c594cf7 100644 --- a/webapp/components/login/login_controller.jsx +++ b/webapp/components/login/login_controller.jsx @@ -131,8 +131,8 @@ export default class LoginController extends React.Component { checkMfa( loginId, - (data) => { - if (data && data.mfa_required === 'true') { + (requiresMfa) => { + if (requiresMfa) { this.setState({showMfa: true}); } else { this.submit(loginId, password, ''); -- cgit v1.2.3-1-g7c22 From cbead2d973fb70bf4dc644dd6a8b8c34b49ff6aa Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Thu, 9 Mar 2017 04:15:38 -0500 Subject: Remove race between clearing lists and search requests (#5686) --- webapp/components/admin_console/team_users.jsx | 5 +++-- webapp/components/channel_invite_modal.jsx | 5 +++-- webapp/components/member_list_channel.jsx | 5 +++-- webapp/components/member_list_team.jsx | 5 +++-- webapp/components/more_channels.jsx | 5 +++-- 5 files changed, 15 insertions(+), 10 deletions(-) (limited to 'webapp/components') diff --git a/webapp/components/admin_console/team_users.jsx b/webapp/components/admin_console/team_users.jsx index 0874e4c8c..5bdaedf6e 100644 --- a/webapp/components/admin_console/team_users.jsx +++ b/webapp/components/admin_console/team_users.jsx @@ -148,16 +148,17 @@ export default class UserList extends React.Component { } search(term) { + clearTimeout(this.searchTimeoutId); + if (term === '') { this.setState({search: false, users: UserStore.getProfileListInTeam(this.props.params.team)}); + this.searchTimeoutId = ''; return; } const options = {}; options[UserSearchOptions.ALLOW_INACTIVE] = true; - clearTimeout(this.searchTimeoutId); - const searchTimeoutId = setTimeout( () => { searchUsers( diff --git a/webapp/components/channel_invite_modal.jsx b/webapp/components/channel_invite_modal.jsx index 5deec0794..2f1a10a75 100644 --- a/webapp/components/channel_invite_modal.jsx +++ b/webapp/components/channel_invite_modal.jsx @@ -107,16 +107,17 @@ export default class ChannelInviteModal extends React.Component { } search(term) { + clearTimeout(this.searchTimeoutId); + this.term = term; if (term === '') { this.onChange(true); this.setState({search: false}); + this.searchTimeoutId = ''; return; } - clearTimeout(this.searchTimeoutId); - const searchTimeoutId = setTimeout( () => { searchUsers( diff --git a/webapp/components/member_list_channel.jsx b/webapp/components/member_list_channel.jsx index 6f8a266ad..d9d28bcd0 100644 --- a/webapp/components/member_list_channel.jsx +++ b/webapp/components/member_list_channel.jsx @@ -91,6 +91,8 @@ export default class MemberListChannel extends React.Component { } search(term) { + clearTimeout(this.searchTimeoutId); + if (term === '') { this.setState({ search: false, @@ -99,11 +101,10 @@ export default class MemberListChannel extends React.Component { teamMembers: Object.assign([], TeamStore.getMembersInTeam()), channelMembers: Object.assign([], ChannelStore.getMembersInChannel()) }); + this.searchTimeoutId = ''; return; } - clearTimeout(this.searchTimeoutId); - const searchTimeoutId = setTimeout( () => { searchUsers( diff --git a/webapp/components/member_list_team.jsx b/webapp/components/member_list_team.jsx index df17d7df2..41057a566 100644 --- a/webapp/components/member_list_team.jsx +++ b/webapp/components/member_list_team.jsx @@ -88,13 +88,14 @@ export default class MemberListTeam extends React.Component { } search(term) { + clearTimeout(this.searchTimeoutId); + if (term === '') { this.setState({search: false, term, users: UserStore.getProfileListInTeam(), teamMembers: Object.assign([], TeamStore.getMembersInTeam())}); + this.searchTimeoutId = ''; return; } - clearTimeout(this.searchTimeoutId); - const searchTimeoutId = setTimeout( () => { searchUsers( diff --git a/webapp/components/more_channels.jsx b/webapp/components/more_channels.jsx index d0b5f5399..10f597ad4 100644 --- a/webapp/components/more_channels.jsx +++ b/webapp/components/more_channels.jsx @@ -99,14 +99,15 @@ export default class MoreChannels extends React.Component { } search(term) { + clearTimeout(this.searchTimeoutId); + if (term === '') { this.onChange(true); this.setState({search: false}); + this.searchTimeoutId = ''; return; } - clearTimeout(this.searchTimeoutId); - const searchTimeoutId = setTimeout( () => { searchMoreChannels( -- cgit v1.2.3-1-g7c22 From 6ff46f30509819d518799561f66358dcd1ec4230 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Thu, 9 Mar 2017 20:05:11 +0500 Subject: Multiple bug fixes (#5699) * Multiple bug fixes * Fixing modal on mobile --- webapp/components/access_history_modal.jsx | 1 + webapp/components/activity_log_modal.jsx | 1 + 2 files changed, 2 insertions(+) (limited to 'webapp/components') diff --git a/webapp/components/access_history_modal.jsx b/webapp/components/access_history_modal.jsx index 28a2b6b8f..4e1e69e3e 100644 --- a/webapp/components/access_history_modal.jsx +++ b/webapp/components/access_history_modal.jsx @@ -79,6 +79,7 @@ export default class AccessHistoryModal extends React.Component { return ( Date: Thu, 9 Mar 2017 19:41:42 +0000 Subject: PLT-5772: Use standardised javascript method instead of Chrome-only one. (#5708) --- webapp/components/create_comment.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'webapp/components') diff --git a/webapp/components/create_comment.jsx b/webapp/components/create_comment.jsx index c7dbd0717..96280bbc1 100644 --- a/webapp/components/create_comment.jsx +++ b/webapp/components/create_comment.jsx @@ -349,7 +349,7 @@ export default class CreateComment extends React.Component { PostStore.storeCommentDraft(this.props.rootId, draft); // Focus on preview if needed - this.refs.preview.refs.container.scrollIntoViewIfNeeded(); + this.refs.preview.refs.container.scrollIntoView(); const enableAddButton = this.handleEnableAddButton(draft.message, draft.fileInfos); -- cgit v1.2.3-1-g7c22 From 43e5bbea372cb2c4a98d00fae19cdabd165a8f48 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Fri, 10 Mar 2017 05:17:22 -0500 Subject: Fix user list updating when removing a user from team (#5712) --- webapp/components/member_list_team.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'webapp/components') diff --git a/webapp/components/member_list_team.jsx b/webapp/components/member_list_team.jsx index 41057a566..e06d61b0a 100644 --- a/webapp/components/member_list_team.jsx +++ b/webapp/components/member_list_team.jsx @@ -43,7 +43,7 @@ export default class MemberListTeam extends React.Component { } componentDidMount() { - UserStore.addInTeamChangeListener(this.onChange); + UserStore.addInTeamChangeListener(this.onTeamChange); UserStore.addStatusesChangeListener(this.onChange); TeamStore.addChangeListener(this.onTeamChange); TeamStore.addStatsChangeListener(this.onStatsChange); @@ -53,7 +53,7 @@ export default class MemberListTeam extends React.Component { } componentWillUnmount() { - UserStore.removeInTeamChangeListener(this.onChange); + UserStore.removeInTeamChangeListener(this.onTeamChange); UserStore.removeStatusesChangeListener(this.onChange); TeamStore.removeChangeListener(this.onTeamChange); TeamStore.removeStatsChangeListener(this.onStatsChange); -- cgit v1.2.3-1-g7c22 From 89d0087ea486a24d2866a08cff85f4abe7b477a0 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Fri, 10 Mar 2017 05:19:07 -0500 Subject: PLT-5792 Fixed all ephemeral posts using system message icons (#5709) --- webapp/components/post_view/components/post.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'webapp/components') diff --git a/webapp/components/post_view/components/post.jsx b/webapp/components/post_view/components/post.jsx index 913c2af95..fba4ce9eb 100644 --- a/webapp/components/post_view/components/post.jsx +++ b/webapp/components/post_view/components/post.jsx @@ -204,9 +204,7 @@ export default class Post extends React.Component { src={PostUtils.getProfilePicSrcForPost(post, timestamp)} /> ); - } - - if (PostUtils.isSystemMessage(post)) { + } else if (PostUtils.isSystemMessage(post)) { profilePic = ( Date: Mon, 13 Mar 2017 06:57:32 -0300 Subject: Report correct session for React Native app (#5734) --- webapp/components/activity_log_modal.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'webapp/components') diff --git a/webapp/components/activity_log_modal.jsx b/webapp/components/activity_log_modal.jsx index aeebb56ae..05c09ab88 100644 --- a/webapp/components/activity_log_modal.jsx +++ b/webapp/components/activity_log_modal.jsx @@ -102,7 +102,7 @@ export default class ActivityLogModal extends React.Component { if (currentSession.props.platform === 'Windows') { devicePicture = 'fa fa-windows'; - } else if (currentSession.device_id && currentSession.device_id.indexOf('apple:') === 0) { + } else if (currentSession.device_id && currentSession.device_id.indexOf('apple') === 0) { devicePicture = 'fa fa-apple'; devicePlatform = ( ); - } else if (currentSession.device_id && currentSession.device_id.indexOf('android:') === 0) { + } else if (currentSession.device_id && currentSession.device_id.indexOf('android') === 0) { devicePlatform = ( Date: Tue, 14 Mar 2017 05:29:12 -0400 Subject: PLT-5804 Fix email blue error not showing up (#5749) --- webapp/components/error_bar.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'webapp/components') diff --git a/webapp/components/error_bar.jsx b/webapp/components/error_bar.jsx index a1981aa2a..edb929f20 100644 --- a/webapp/components/error_bar.jsx +++ b/webapp/components/error_bar.jsx @@ -30,7 +30,7 @@ export default class ErrorBar extends React.Component { this.onAnalyticsChange = this.onAnalyticsChange.bind(this); this.handleClose = this.handleClose.bind(this); - ErrorStore.clearNotificationError(); + ErrorStore.clearLastError(); let isSystemAdmin = false; const user = UserStore.getCurrentUser(); -- cgit v1.2.3-1-g7c22