[mirotalk] #240 - show pinned participants list on incoming private messages

This commit is contained in:
Miroslav Pejic
2026-03-31 09:29:39 +02:00
parent 084b34ff58
commit 65979da07c
+19 -4
View File
@@ -6079,10 +6079,7 @@ function setParticipantsBtn() {
chatPin();
}
msgerDraggable.classList.add('msger-pinned-sidebar-open');
msgerCPBtn.classList.add('active');
searchPeerBarName?.focus();
screenReaderAccessibility.announceMessage('Pinned chat participants opened');
openPinnedParticipantsSidebar(true);
return;
}
@@ -6092,6 +6089,20 @@ function setParticipantsBtn() {
});
}
function openPinnedParticipantsSidebar(announce = false) {
if (!isChatPinned) {
return;
}
msgerDraggable.classList.add('msger-pinned-sidebar-open');
msgerCPBtn.classList.add('active');
searchPeerBarName?.focus();
if (announce) {
screenReaderAccessibility.announceMessage('Pinned chat participants opened');
}
}
/**
* Caption room buttons click event
*/
@@ -9860,6 +9871,10 @@ function handleDataChannelChat(dataMessage) {
if (msgPrivate) {
if (!isConversationCurrentlyVisible('private', msgFrom, msgFromId)) {
addUnreadMessage('private', msgFromId);
if (isChatRoomVisible && isChatPinned) {
openPinnedParticipantsSidebar();
}
}
} else if (!isConversationCurrentlyVisible('public')) {
addUnreadMessage('public');