修改了两个对话列表

This commit is contained in:
CrescentLeaf
2025-12-13 00:46:09 +08:00
parent 20986af1ba
commit 991a8a729d
2 changed files with 5 additions and 4 deletions

View File

@@ -14,6 +14,7 @@ export default function AllChatsList({ ...props }: React.HTMLAttributes<HTMLElem
const shared = useContextSelector(MainSharedContext, (context: Shared) => ({
myProfileCache: context.myProfileCache,
functions_lazy: context.functions_lazy,
currentSelectedChatId: context.currentSelectedChatId,
}))
const searchRef = React.useRef<HTMLElement>(null)
@@ -68,7 +69,7 @@ export default function AllChatsList({ ...props }: React.HTMLAttributes<HTMLElem
chat.getId().includes(searchText)
).map((v) =>
<AllChatsListItem
active={isMobileUI() ? false : currentChatId == v.getId()}
active={isMobileUI() ? false : shared.currentSelectedChatId == v.getId()}
key={v.getId()}
onClick={() => {
openChatInfoDialog(v)

View File

@@ -14,9 +14,9 @@ export default function FavouriteChatsList({ ...props }: React.HTMLAttributes<HT
const shared = useContextSelector(MainSharedContext, (context: Shared) => ({
myProfileCache: context.myProfileCache,
setShowAddFavourtieChatDialog: context.setShowAddFavourtieChatDialog,
functions_lazy: context.functions_lazy,
favouriteChats: context.favouriteChats,
currentSelectedChatId: context.currentSelectedChatId,
values_lazy: context.values_lazy,
functions_lazy: context.functions_lazy,
}))
const searchRef = React.useRef<HTMLElement>(null)
@@ -34,7 +34,7 @@ export default function FavouriteChatsList({ ...props }: React.HTMLAttributes<HT
try {
const ls = await shared.myProfileCache!.getMyFavouriteChatsOrThrow()
setFavouriteChatsList(ls)
shared.favourite_chats
shared.favouriteChats
} catch (e) {
if (e instanceof CallbackError)
if (e.code != 401 && e.code != 400)