mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 16:55:07 +02:00
Clear local ignored list upon domain change
This commit is contained in:
parent
dde5f69ac9
commit
c695878025
2 changed files with 12 additions and 1 deletions
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue