[mirotalk] #240 - show pinned participants list on incoming private messages
This commit is contained in:
+19
-4
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user