diff --git a/interface/resources/qml/hifi/Pal.qml b/interface/resources/qml/hifi/Pal.qml index c9adb03d24..565809762e 100644 --- a/interface/resources/qml/hifi/Pal.qml +++ b/interface/resources/qml/hifi/Pal.qml @@ -42,7 +42,6 @@ Item { property int actionButtonWidth: 75 property int nameCardWidth: width - actionButtonWidth*(iAmAdmin ? 4 : 2) - 4 property var myData: ({displayName: "", userName: "", audioLevel: 0.0}) // valid dummy until set - // FIXME: Need to determine & handle when this list gets reset. property var ignored: ({}); // Keep a local list of ignored avatars & their data. Necessary because HashMap is slow to respond after ignoring. property var userModelData: [] // This simple list is essentially a mirror of the userModel listModel without all the extra complexities. property bool iAmAdmin: false @@ -478,6 +477,9 @@ Item { } } break; + case 'clearIgnored': + ignored = ({}); + break; default: console.log('Unrecognized message:', JSON.stringify(message)); } diff --git a/scripts/system/pal.js b/scripts/system/pal.js index 378d62c69c..505c1840da 100644 --- a/scripts/system/pal.js +++ b/scripts/system/pal.js @@ -332,6 +332,13 @@ button.clicked.connect(onClicked); pal.visibleChanged.connect(onVisibleChanged); pal.closed.connect(off); Users.usernameFromIDReply.connect(usernameFromIDReply); +function clearIgnoredInQMLAndRefreshPAL() { + pal.sendToQml({ method: 'clearIgnored' }); + removeOverlays(); + populateUserList(); +} +Window.domainChanged.connect(clearIgnoredInQMLAndRefreshPAL); +Window.domainConnectionRefused.connect(clearIgnoredInQMLAndRefreshPAL); // // Cleanup. @@ -342,6 +349,8 @@ Script.scriptEnding.connect(function () { pal.visibleChanged.disconnect(onVisibleChanged); pal.closed.disconnect(off); Users.usernameFromIDReply.disconnect(usernameFromIDReply); + Window.domainChanged.disconnect(clearIgnoredInQMLAndRefreshPAL); + Window.domainConnectionRefused.disconnect(clearIgnoredInQMLAndRefreshPAL); off(); });