forked from mattermost/mattermost-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MM-9787: Transition [lr]hs open state to redux, fixing Safari race co…
…ndition. (mattermost#991) * move the [lr]hs open state into redux This eliminates race conditions around toggling classes all over the code base in an attempt to slide the various components around. It also has the nice side effect of getting rid of doStrangeThings. WebRTC remains in beta, and remains functional with these changes, but the absolute minimum set of changes were made to integrate the old flux store with the new state. This remains intentionally hacky, as the medium-term vision is to rip this feature out and replace it as a plugin. * fix a rendering issue with PermalinkView Now that opening the sidebar triggers a re-render (vs. just toggling classes), the PermalinkView would incorrectly transition between valid and invalid internal states even if the target permalink hadn't changed. This resulted in a flashing when opening the sidebar, e.g. to view flagged messages. This restricts the handling of a permalink event to when the post id has actually changed. * remove unused initTeamChangeActions in lhs actions
- Loading branch information
1 parent
0f5d6e5
commit c3b1c2f
Showing
54 changed files
with
1,260 additions
and
610 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
// Copyright (c) 2018-present Mattermost, Inc. All Rights Reserved. | ||
// See License.txt for license information. | ||
|
||
import {fetchMyChannelsAndMembers} from 'mattermost-redux/actions/channels'; | ||
import {ActionTypes} from 'utils/constants.jsx'; | ||
|
||
import {loadProfilesForSidebar} from 'actions/user_actions.jsx'; | ||
import {loadStatusesForChannelAndSidebar} from 'actions/status_actions.jsx'; | ||
import store from 'stores/redux_store.jsx'; | ||
export const toggle = () => (dispatch) => dispatch({ | ||
type: ActionTypes.TOGGLE_LHS, | ||
}); | ||
|
||
const dispatch = store.dispatch; | ||
const getState = store.getState; | ||
export const open = () => (dispatch) => dispatch({ | ||
type: ActionTypes.OPEN_LHS, | ||
}); | ||
|
||
export async function initTeamChangeActions(teamId) { | ||
await fetchMyChannelsAndMembers(teamId)(dispatch, getState); | ||
loadStatusesForChannelAndSidebar(); | ||
loadProfilesForSidebar(); | ||
} | ||
export const close = () => (dispatch) => dispatch({ | ||
type: ActionTypes.CLOSE_LHS, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright (c) 2018-present Mattermost, Inc. All Rights Reserved. | ||
// See License.txt for license information. | ||
|
||
import {ActionTypes} from 'utils/constants.jsx'; | ||
|
||
export const initWebrtc = (userId, isCaller) => (dispatch) => dispatch({ | ||
type: ActionTypes.INIT_WEBRTC, | ||
userId, | ||
isCaller, | ||
}); | ||
|
||
export const closeWebrtc = () => (dispatch) => dispatch({ | ||
type: ActionTypes.CLOSE_WEBRTC, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.