diff --git a/src/renderer/components/dialogs/ViewGroup.tsx b/src/renderer/components/dialogs/ViewGroup.tsx
index 4a87c83aa4..9e63d22750 100644
--- a/src/renderer/components/dialogs/ViewGroup.tsx
+++ b/src/renderer/components/dialogs/ViewGroup.tsx
@@ -6,9 +6,14 @@ import {
DeltaDialogBody,
DeltaDialogOkCancelFooter,
} from './DeltaDialog'
+import ChatListItem from '../chat/ChatListItem'
import { useContactSearch, AddMemberInnerDialog } from './CreateChat'
+import { useChatList } from '../chat/ChatListHelpers'
import { QrCodeShowQrInner } from './QrCode'
+import { selectChat } from '../helpers/ChatMethods'
+import { useThemeCssVar } from '../../ThemeManager'
import { ContactList2, useContactsMap } from '../contact/ContactList'
+import { useLogicVirtualChatList, ChatListPart } from '../chat/ChatList'
import {
PseudoListItemShowQrCode,
PseudoListItemAddMember,
@@ -136,6 +141,17 @@ function ViewGroupInner(props: {
const { onClose, chat, isBroadcast } = props
const tx = useTranslationFunction()
+ const [chatListIds, setChatListIds] = useState<[number, number][]>([])
+
+ useEffect(() => {
+ BackendRemote.rpc
+ .getSimilarChatlistEntries(selectedAccountId(), chat.id)
+ .then(setChatListIds)
+ }, [])
+
+ const { isChatLoaded, loadChats, chatCache } =
+ useLogicVirtualChatList(chatListIds)
+
const chatDisabled = !chat.canSend
const {
@@ -207,6 +223,14 @@ function ViewGroupInner(props: {
null
)
+ const onChatClick = (chatId: number) => {
+ selectChat(chatId)
+ onClose()
+ }
+
+ const CHATLISTITEM_CHAT_HEIGHT =
+ Number(useThemeCssVar('--SPECIAL-chatlist-item-chat-height')) || 64
+
return (
<>
{!profileContact && (
@@ -238,6 +262,32 @@ function ViewGroupInner(props: {
{groupName} {chat.isProtected &&