完善对话页面!
* 消息组件显示移植 * 最近对话直接打开的补充 * 提及的修补 * ......
This commit is contained in:
@@ -11,8 +11,10 @@ import { useContextSelector } from "use-context-selector"
|
||||
import showSnackbar from "../../utils/showSnackbar.ts"
|
||||
import MainSharedContext, { Shared } from "../MainSharedContext.ts"
|
||||
import ClientCache from "../../ClientCache.ts"
|
||||
import AppStateContext from "../app-state/AppStateContext.ts"
|
||||
|
||||
export default function RecentChatsList({ ...props }: React.HTMLAttributes<HTMLElement>) {
|
||||
const AppState = React.useContext(AppStateContext)
|
||||
const shared = useContextSelector(MainSharedContext, (context: Shared) => ({
|
||||
functions_lazy: context.functions_lazy,
|
||||
state: context.state,
|
||||
@@ -75,7 +77,7 @@ export default function RecentChatsList({ ...props }: React.HTMLAttributes<HTMLE
|
||||
).map((v) =>
|
||||
<RecentsListItem
|
||||
active={isMobileUI() ? false : shared.state.currentSelectedChatId == v.getId()}
|
||||
onClick={() => {}}
|
||||
onClick={() => AppState.openChat(v.getId())}
|
||||
key={v.getId()}
|
||||
recentChat={v} />
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user