diff --git a/client/ui/App.tsx b/client/ui/App.tsx index dc89420..8c5ff9d 100644 --- a/client/ui/App.tsx +++ b/client/ui/App.tsx @@ -82,6 +82,10 @@ export default function App() { const [myUserProfileCache, setMyUserProfileCache]: [User, React.Dispatch>] = React.useState(null as unknown as User) + const [isShowChatFragment, setIsShowChatFragment] = React.useState(false) + + const [currentChatId, setCurrentChatId] = React.useState('') + React.useEffect(() => { ; (async () => { Split(['#SideBar', '#ChatFragment'], { @@ -144,12 +148,19 @@ export default function App() { { // 最近聊天 { + setIsShowChatFragment(true) + + }} display={navigationItemSelected == "Recents"} recentsList={recentsList} /> } { // 联系人列表 { + setIsShowChatFragment(true) + }} display={navigationItemSelected == "Contacts"} contactsMap={contactsMap} /> } @@ -157,7 +168,23 @@ export default function App() { { // 聊天页面 } - +
+ { + !isShowChatFragment &&
+ 選擇聯絡人以開始對話... +
+ } + { + isShowChatFragment && + } +
) } \ No newline at end of file