修改了两个对话列表
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user