Revert "chore: update left nav icons"

This reverts commit 2af03fe0d4.
This commit is contained in:
zerosoul
2022-05-31 18:35:06 +08:00
parent a728307025
commit f27f3944f8
9 changed files with 498 additions and 491 deletions
+5 -14
View File
@@ -1,16 +1,8 @@
import toast from "react-hot-toast";
import { batch } from "react-redux";
import { ContentTypes } from "../config";
import {
addChannelMsg,
removeChannelMsg,
replaceChannelMsg,
} from "../slices/message.channel";
import {
addUserMsg,
removeUserMsg,
replaceUserMsg,
} from "../slices/message.user";
import { addChannelMsg, removeChannelMsg } from "../slices/message.channel";
import { addUserMsg, removeUserMsg } from "../slices/message.user";
import { addMessage, removeMessage } from "../slices/message";
export const onMessageSendStarted = async (
{
@@ -55,8 +47,6 @@ export const onMessageSendStarted = async (
const addContextMessage = from == "channel" ? addChannelMsg : addUserMsg;
const removeContextMessage =
from == "channel" ? removeChannelMsg : removeUserMsg;
const replaceContextMsg =
from == "channel" ? replaceChannelMsg : replaceUserMsg;
if (!ignoreLocal) {
batch(() => {
dispatch(addMessage({ mid: ts, ...tmpMsg }));
@@ -68,9 +58,10 @@ export const onMessageSendStarted = async (
const { data: server_mid } = await queryFulfilled;
console.log("message server mid", server_mid);
batch(() => {
dispatch(addMessage({ mid: server_mid, ...tmpMsg }));
dispatch(replaceContextMsg({ id, localMid: ts, serverMid: server_mid }));
dispatch(removeContextMessage({ id, mid: ts }));
dispatch(removeMessage(ts));
dispatch(addMessage({ mid: server_mid, ...tmpMsg }));
dispatch(addContextMessage({ id, mid: server_mid }));
});
// dispatch(removePendingMessage({ id, mid:ts, type: from }));
} catch {