mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:29:32 +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 actionButtonWidth: 75
|
||||||
property int nameCardWidth: width - actionButtonWidth*(iAmAdmin ? 4 : 2) - 4
|
property int nameCardWidth: width - actionButtonWidth*(iAmAdmin ? 4 : 2) - 4
|
||||||
property var myData: ({displayName: "", userName: "", audioLevel: 0.0}) // valid dummy until set
|
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 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 var userModelData: [] // This simple list is essentially a mirror of the userModel listModel without all the extra complexities.
|
||||||
property bool iAmAdmin: false
|
property bool iAmAdmin: false
|
||||||
|
@ -478,6 +477,9 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'clearIgnored':
|
||||||
|
ignored = ({});
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
console.log('Unrecognized message:', JSON.stringify(message));
|
console.log('Unrecognized message:', JSON.stringify(message));
|
||||||
}
|
}
|
||||||
|
|
|
@ -332,6 +332,13 @@ button.clicked.connect(onClicked);
|
||||||
pal.visibleChanged.connect(onVisibleChanged);
|
pal.visibleChanged.connect(onVisibleChanged);
|
||||||
pal.closed.connect(off);
|
pal.closed.connect(off);
|
||||||
Users.usernameFromIDReply.connect(usernameFromIDReply);
|
Users.usernameFromIDReply.connect(usernameFromIDReply);
|
||||||
|
function clearIgnoredInQMLAndRefreshPAL() {
|
||||||
|
pal.sendToQml({ method: 'clearIgnored' });
|
||||||
|
removeOverlays();
|
||||||
|
populateUserList();
|
||||||
|
}
|
||||||
|
Window.domainChanged.connect(clearIgnoredInQMLAndRefreshPAL);
|
||||||
|
Window.domainConnectionRefused.connect(clearIgnoredInQMLAndRefreshPAL);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Cleanup.
|
// Cleanup.
|
||||||
|
@ -342,6 +349,8 @@ Script.scriptEnding.connect(function () {
|
||||||
pal.visibleChanged.disconnect(onVisibleChanged);
|
pal.visibleChanged.disconnect(onVisibleChanged);
|
||||||
pal.closed.disconnect(off);
|
pal.closed.disconnect(off);
|
||||||
Users.usernameFromIDReply.disconnect(usernameFromIDReply);
|
Users.usernameFromIDReply.disconnect(usernameFromIDReply);
|
||||||
|
Window.domainChanged.disconnect(clearIgnoredInQMLAndRefreshPAL);
|
||||||
|
Window.domainConnectionRefused.disconnect(clearIgnoredInQMLAndRefreshPAL);
|
||||||
off();
|
off();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue