* Always dispatch thunk actions instead of calling them

* Properly dispatch actions in SwitchChannelProvider

* Fix tests relying on bad types

* Properly pass actions into ManageTokens

* Make other logic changes to support new types

* Do the big type migrations without any logic changes

* Revert "Properly dispatch actions in SwitchChannelProvider"

This reverts commit 28c8c7af2ef324c6814087a81baca66c60477daa.

* Revert "Revert "Properly dispatch actions in SwitchChannelProvider""

This reverts commit 47115c5217ae90547040e7b7de32979a33f0845b.
Этот коммит содержится в:
Harrison Healey
2024-01-10 09:47:05 -05:00
коммит произвёл GitHub
родитель 0a4e9eeb92
Коммит 978f335925
362 изменённых файлов: 2306 добавлений и 3535 удалений

Просмотреть файл

@@ -22,7 +22,6 @@ describe('components/ChannelHeader', () => {
showChannelFiles: jest.fn(),
closeRightHandSide: jest.fn(),
openModal: jest.fn(),
closeModal: jest.fn(),
getCustomEmojisInText: jest.fn(),
updateChannelNotifyProps: jest.fn(),
goToLastViewedChannel: jest.fn(),

Просмотреть файл

@@ -71,7 +71,6 @@ export type Props = {
updateChannelNotifyProps: (userId: string, channelId: string, props: Partial<ChannelNotifyProps>) => void;
goToLastViewedChannel: () => void;
openModal: <P>(modalData: ModalData<P>) => void;
closeModal: () => void;
showChannelMembers: (channelId: string, inEditingMode?: boolean) => void;
};
currentRelativeTeamUrl: string;

Просмотреть файл

@@ -4,7 +4,7 @@
import {connect} from 'react-redux';
import {withRouter} from 'react-router-dom';
import {bindActionCreators} from 'redux';
import type {ActionCreatorsMapObject, Dispatch} from 'redux';
import type {Dispatch} from 'redux';
import {
updateChannelNotifyProps,
@@ -27,7 +27,6 @@ import {
getUser,
makeGetProfilesInChannel,
} from 'mattermost-redux/selectors/entities/users';
import type {Action} from 'mattermost-redux/types/actions';
import {getUserIdFromChannelName} from 'mattermost-redux/utils/channel_utils';
import {goToLastViewedChannel} from 'actions/views/channel';
@@ -49,7 +48,6 @@ import {isFileAttachmentsEnabled} from 'utils/file_utils';
import type {GlobalState} from 'types/store';
import ChannelHeader from './channel_header';
import type {Props} from './channel_header';
const EMPTY_CHANNEL = {};
const EMPTY_CHANNEL_STATS = {member_count: 0, guest_count: 0, pinnedpost_count: 0, files_count: 0};
@@ -118,7 +116,7 @@ function makeMapStateToProps() {
}
const mapDispatchToProps = (dispatch: Dispatch) => ({
actions: bindActionCreators<ActionCreatorsMapObject<Action>, Props['actions']>({
actions: bindActionCreators({
showPinnedPosts,
showChannelFiles,
closeRightHandSide,