Fix toggleMembers
This commit is contained in:
parent
bfdaced7a0
commit
b846fbfa1c
@ -874,20 +874,16 @@ class ChatElement extends HTMLElement {
|
||||
const emojiSpan = document.createElement('span');
|
||||
emojiSpan.className = 'member-emoji';
|
||||
|
||||
const currentPairingProcess = await this.findProcessIdFromAddresses(member.sp_addresses);
|
||||
console.log('PairingProcess:', currentPairingProcess);
|
||||
|
||||
if (currentPairingProcess) {
|
||||
const emojis = await addressToEmoji(currentPairingProcess);
|
||||
const pairingProcess = await this.findProcessIdFromAddresses(member.sp_addresses);
|
||||
console.log('PairingProcess:', pairingProcess);
|
||||
if (pairingProcess) {
|
||||
//TO DO : faire apparaitre les membres avec lesquelels je suis pairé ?
|
||||
const emojis = await addressToEmoji(pairingProcess);
|
||||
console.log('Adresse pairée:', emojis);
|
||||
emojiSpan.textContent = emojis;
|
||||
|
||||
// Stocker le pairingProcess dans un attribut data-
|
||||
memberItem.setAttribute('data-pairing-process', currentPairingProcess);
|
||||
} else {
|
||||
const emojis = await addressToEmoji(member.sp_addresses[0]);
|
||||
emojiSpan.textContent = emojis;
|
||||
memberItem.setAttribute('data-pairing-process', member.sp_addresses[0]);
|
||||
}
|
||||
|
||||
memberContainer.appendChild(emojiSpan);
|
||||
@ -896,7 +892,6 @@ class ChatElement extends HTMLElement {
|
||||
memberItem.onclick = async (event) => {
|
||||
event.stopPropagation();
|
||||
try {
|
||||
const pairingProcess = memberItem.getAttribute('data-pairing-process');
|
||||
if (pairingProcess) {
|
||||
await this.loadMemberChat(pairingProcess);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user