Divide Conversation into ConversationInfos, ConversationMember, and ConversationSummary
- ConversationSummary is used to display ConversationList.
- Having the three separated will help managing queries.
- Adding ConversationSummary required to solve some inconsistencies in ConversationList, which was mixing contacts and conversations. ContactSearchResultList has been added as a quick fix . It will need more work.
- Some tools to uniformize conversation names have been introduced. They will need more work.
Note the diplaying of ConversationList is left broken in this commit.
Change-Id: I29337906cc43781a9c4790735490a6ee2cc51cb0
diff --git a/client/src/pages/CallPending.tsx b/client/src/pages/CallPending.tsx
index 2ef27f2..a7566db 100644
--- a/client/src/pages/CallPending.tsx
+++ b/client/src/pages/CallPending.tsx
@@ -35,7 +35,7 @@
export const CallPending = () => {
const { localStream } = useWebRtcContext();
- const { conversation } = useConversationContext();
+ const { conversationDisplayName } = useConversationContext();
const { callRole } = useCallContext();
const localVideoRef = useRef<VideoElementWithSinkId | null>(null);
@@ -99,7 +99,7 @@
/>
<ConversationAvatar
alt="contact profile picture"
- displayName={conversation.getDisplayNameNoFallback()}
+ displayName={conversationDisplayName}
style={{
width: '100%',
height: '100%',
@@ -148,8 +148,8 @@
export const CallPendingCallerInterface = () => {
const { callStatus } = useCallContext();
const { t } = useTranslation();
- const { conversation } = useConversationContext();
- const memberName = useMemo(() => conversation.getFirstMember().contact.registeredName, [conversation]);
+ const { members } = useConversationContext();
+ const memberName = useMemo(() => members[0].getDisplayName(), [members]);
let title = t('loading');
@@ -182,8 +182,8 @@
const { callStatus } = useCallContext();
const { t } = useTranslation();
- const { conversation } = useConversationContext();
- const memberName = useMemo(() => conversation.getFirstMember().contact.registeredName, [conversation]);
+ const { members } = useConversationContext();
+ const memberName = useMemo(() => members[0].getDisplayName(), [members]);
let title = t('loading');