fix: bugs

This commit is contained in:
zerosoul
2022-04-22 17:08:26 +08:00
parent c513289513
commit dc9df5c18c
4 changed files with 14 additions and 10 deletions
+1 -2
View File
@@ -2,7 +2,7 @@ import { createApi } from "@reduxjs/toolkit/query/react";
// import toast from "react-hot-toast";
import baseQuery from "./base.query";
import BASE_URL, { ContentTypes } from "../config";
import { updateChannel, removeChannel } from "../slices/channels";
import { updateChannel } from "../slices/channels";
import { removeMessage } from "../slices/message";
import { removeChannelSession } from "../slices/message.channel";
import { removeReactionMessage } from "../slices/message.reaction";
@@ -96,7 +96,6 @@ export const channelApi = createApi({
const { channelMessage } = getState();
try {
await queryFulfilled;
dispatch(removeChannel(id));
// 删掉该channel下的所有消息&reaction
const mids = channelMessage[id];
if (mids) {