Improve Redux types part 3/Remove old ActionFunc (#25983)

* Remove ActionFunc from actions/apps

* Remove ActionFunc from actions/channel_actions

* actions/cloud

* actions/hosted_customer

* actions/integration_actions

* actions/marketplace

* Replace ActionFuncVariantDoNotUse with ThunkActionFunc

* actions/apps

* actions/new_post and actions/post_actions

* actions/status_actions

* actions/team_actions

* actions/views/drafts

* actions/commands

* components/posts/actions

* actions/views/login

* components/channel_layout/channel_identifier_router/actions

* hooks/usePreference

* components/interactive_dialog/interactive_dialog

* Various tests

* components/team_controller

* components/threading/thread_viewer

* mattermost-redux/actions/admin

* mattermost-redux/actions/boards

* mattermost-redux/actions/channel_categories

* mattermost-redux/actions/channels

* mattermost-redux/actions/emojis

* mattermost-redux/actions/errors

* mattermost-redux/actions/files

* mattermost-redux/actions/general

* mattermost-redux/actions/preferences

* mattermost-redux/actions/search

* mattermost-redux/actions/teams

* mattermost-redux/actions/users

* mattermost-redux/actions/websocket

* Remove ActionFunc

* Remove TODO comments that I'm not going to address

* Remove another TODO comment

* And one last one
Этот коммит содержится в:
Harrison Healey
2024-01-23 09:05:23 -05:00
коммит произвёл GitHub
родитель 79e961e239
Коммит 8a869b0623
65 изменённых файлов: 459 добавлений и 486 удалений

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

@@ -11,6 +11,7 @@ import type {AdminConfig} from '@mattermost/types/config';
import type {DeepPartial} from '@mattermost/types/utilities';
import PluginState from 'mattermost-redux/constants/plugins';
import type {ActionResult} from 'mattermost-redux/types/actions';
import ConfirmModal from 'components/confirm_modal';
import ExternalLink from 'components/external_link';
@@ -460,13 +461,13 @@ type Props = BaseProps & {
plugins: any;
appsFeatureFlagEnabled: boolean;
actions: {
uploadPlugin: (fileData: File, force: boolean) => any;
removePlugin: (pluginId: string) => any;
getPlugins: () => unknown;
getPluginStatuses: () => any;
enablePlugin: (pluginId: string) => any;
disablePlugin: (pluginId: string) => any;
installPluginFromUrl: (url: string, force: boolean) => any;
uploadPlugin: (fileData: File, force: boolean) => Promise<ActionResult>;
removePlugin: (pluginId: string) => Promise<ActionResult>;
getPlugins: () => Promise<ActionResult>;
getPluginStatuses: () => Promise<ActionResult>;
enablePlugin: (pluginId: string) => Promise<ActionResult>;
disablePlugin: (pluginId: string) => Promise<ActionResult>;
installPluginFromUrl: (url: string, force: boolean) => Promise<ActionResult>;
};
} & WrappedComponentProps;

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

@@ -5,11 +5,8 @@ import React, {useState} from 'react';
import {FormattedMessage} from 'react-intl';
import {useDispatch} from 'react-redux';
import type {ServerError} from '@mattermost/types/errors';
import {revokeSessionsForAllUsers} from 'mattermost-redux/actions/users';
import {Permissions} from 'mattermost-redux/constants';
import type {ActionResult} from 'mattermost-redux/types/actions';
import {emitUserLoggedOutEvent} from 'actions/global_actions';
@@ -26,7 +23,7 @@ function RevokeSessionsButton() {
}
async function handleModalConfirm() {
const {data} = await dispatch(revokeSessionsForAllUsers()) as ActionResult<boolean, ServerError>;
const {data} = await dispatch(revokeSessionsForAllUsers());
if (data) {
emitUserLoggedOutEvent();