diff --git a/src/common/hook/useMessageFeed.ts b/src/common/hook/useMessageFeed.ts
index bb2e0f4a..c5de8ec8 100644
--- a/src/common/hook/useMessageFeed.ts
+++ b/src/common/hook/useMessageFeed.ts
@@ -176,16 +176,12 @@ export default function useMessageFeed({ context = "channel", id }: Props) {
currPageInfo?.isLast ? 10 : 500
);
};
- const pullDown = () => {
- // 向下加载
- };
return {
mids,
appends,
hasMore,
pullUp,
- pullDown,
list: items
};
}
diff --git a/src/routes/chat/ChannelChat/index.tsx b/src/routes/chat/ChannelChat/index.tsx
index f26e510d..aa8e8e3e 100644
--- a/src/routes/chat/ChannelChat/index.tsx
+++ b/src/routes/chat/ChannelChat/index.tsx
@@ -15,11 +15,9 @@ import User from "../../../common/component/User";
import Layout from "../Layout";
import { renderMessageFragment } from "../utils";
import EditIcon from "../../../assets/icons/edit.svg";
-// import alertIcon from "../../../assets/icons/alert.svg?url";
import IconFav from "../../../assets/icons/bookmark.svg";
import IconPeople from "../../../assets/icons/people.svg";
import IconPin from "../../../assets/icons/pin.svg";
-// import searchIcon from "../../../assets/icons/search.svg?url";
import IconHeadphone from "../../../assets/icons/headphone.svg";
import addIcon from "../../../assets/icons/add.svg?url";
@@ -53,7 +51,6 @@ function ChannelChat({ cid = 0, dropFiles = [] }: Props) {
const [addMemberModalVisible, setAddMemberModalVisible] = useState(false);
const {
selects,
- // msgIds,
userIds,
data,
messageData,
@@ -64,7 +61,6 @@ function ChannelChat({ cid = 0, dropFiles = [] }: Props) {
selects: store.ui.selectMessages[`channel_${cid}`],
footprint: store.footprint,
loginUser: store.authData.user,
- // msgIds: store.channelMessage[cid] || [],
userIds: store.users.ids,
data: store.channels.byId[cid],
messageData: store.message || {}
@@ -192,7 +188,6 @@ function ChannelChat({ cid = 0, dropFiles = [] }: Props) {
)}
)}
- {/*
*/}
{feeds.map((mid, idx) => {
const curr = messageData[mid];
if (!curr) return null;
diff --git a/src/routes/chat/DMChat/index.tsx b/src/routes/chat/DMChat/index.tsx
index 18f5bf20..1572f4ed 100644
--- a/src/routes/chat/DMChat/index.tsx
+++ b/src/routes/chat/DMChat/index.tsx
@@ -4,9 +4,6 @@ import Tippy from "@tippyjs/react";
import FavList from "../FavList";
import Tooltip from "../../../common/component/Tooltip";
import FavIcon from "../../../assets/icons/bookmark.svg";
-// import searchIcon from "../../../assets/icons/search.svg?url";
-// import IconHeadphone from "../../../assets/icons/headphone.svg";
-// import useChatScroll from "../../../common/hook/useChatScroll";
import { useReadMessageMutation } from "../../../app/services/message";
import User from "../../../common/component/User";
import Layout from "../Layout";
@@ -40,8 +37,6 @@ const DMChat: FC
= ({ uid = 0, dropFiles }) => {
messageData: store.message
};
});
- // const ref = useChatScroll(msgIds);
-
if (!currUser) return null;
const readIndex = footprint.readUsers[uid];
const feeds = [...msgIds, ...appends];
@@ -51,35 +46,22 @@ const DMChat: FC = ({ uid = 0, dropFiles }) => {
context="user"
dropFiles={dropFiles}
aside={
- <>
-
- {/*-
-
-
- -
-
- */}
-
- }
- >
- -
-
-
-
-
- {/* -
-
-
*/}
-
- {/*
*/}
- {/* Third Apps */}
- >
+
}
header={
diff --git a/src/routes/chat/DMList/index.tsx b/src/routes/chat/DMList/index.tsx
index 132f8a3a..76272b5e 100644
--- a/src/routes/chat/DMList/index.tsx
+++ b/src/routes/chat/DMList/index.tsx
@@ -26,9 +26,9 @@ const DMList: FC = ({ uids, setDropFiles }) => {
const sessions = uids.map((uid) => {
const mids = userMessage[uid] || [];
if (mids.length == 0) {
- return { lastMid: null, unreads: 0, uid };
+ return { lastMid: 0, unreads: 0, uid };
}
- const lastMid = [...mids].pop();
+ const lastMid = [...mids].pop() || 0;
const readIndex = readUsers[uid];
const { unreads = 0 } = getUnreadCount({
mids,
diff --git a/src/routes/chat/LoadMore.tsx b/src/routes/chat/LoadMore.tsx
index e45c01da..97a0aea0 100644
--- a/src/routes/chat/LoadMore.tsx
+++ b/src/routes/chat/LoadMore.tsx
@@ -34,8 +34,8 @@ const LoadMore: FC = ({ pullUp = null }) => {
};
}, [ref, pullUp]);
return (
-