mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 15:23:56 +02:00
Stale PAL Notification
This commit is contained in:
parent
6c4b23195b
commit
d16acc5a7f
2 changed files with 32 additions and 2 deletions
|
@ -279,7 +279,9 @@ Rectangle {
|
|||
id: reloadNearby;
|
||||
width: reloadNearby.height;
|
||||
glyph: hifi.glyphs.reload;
|
||||
onClicked: refreshNearbyWithFilter();
|
||||
onClicked: {
|
||||
refreshNearbyWithFilter();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1188,6 +1190,8 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
sortModel();
|
||||
reloadNearby.glyph = hifi.glyphs.reload;
|
||||
reloadNearby.color = 0;
|
||||
break;
|
||||
case 'connections':
|
||||
var data = message.params;
|
||||
|
@ -1278,6 +1282,10 @@ Rectangle {
|
|||
var sessionID = message.params[0];
|
||||
delete ignored[sessionID];
|
||||
break;
|
||||
case 'palIsStale':
|
||||
reloadNearby.glyph = hifi.glyphs.alert;
|
||||
reloadNearby.color = 2;
|
||||
break;
|
||||
default:
|
||||
console.log('Unrecognized message:', JSON.stringify(message));
|
||||
}
|
||||
|
|
|
@ -14,7 +14,11 @@
|
|||
|
||||
(function() { // BEGIN LOCAL_SCOPE
|
||||
|
||||
var populateNearbyUserList, color, textures, removeOverlays, controllerComputePickRay, onTabletButtonClicked, onTabletScreenChanged, receiveMessage, avatarDisconnected, clearLocalQMLDataAndClosePAL, createAudioInterval, tablet, CHANNEL, getConnectionData, findableByChanged; // forward references;
|
||||
var populateNearbyUserList, color, textures, removeOverlays,
|
||||
controllerComputePickRay, onTabletButtonClicked, onTabletScreenChanged,
|
||||
receiveMessage, avatarDisconnected, clearLocalQMLDataAndClosePAL,
|
||||
createAudioInterval, tablet, CHANNEL, getConnectionData, findableByChanged,
|
||||
avatarAdded, avatarRemoved, avatarSessionChanged; // forward references;
|
||||
|
||||
// hardcoding these as it appears we cannot traverse the originalTextures in overlays??? Maybe I've missed
|
||||
// something, will revisit as this is sorta horrible.
|
||||
|
@ -691,6 +695,9 @@ function startup() {
|
|||
Messages.subscribe(CHANNEL);
|
||||
Messages.messageReceived.connect(receiveMessage);
|
||||
Users.avatarDisconnected.connect(avatarDisconnected);
|
||||
AvatarList.avatarAddedEvent.connect(avatarAdded);
|
||||
AvatarList.avatarRemovedEvent.connect(avatarRemoved);
|
||||
AvatarList.avatarSessionChangedEvent.connect(avatarSessionChanged);
|
||||
}
|
||||
|
||||
startup();
|
||||
|
@ -841,6 +848,18 @@ function clearLocalQMLDataAndClosePAL() {
|
|||
sendToQml({ method: 'clearLocalQMLData' });
|
||||
}
|
||||
|
||||
function avatarAdded() {
|
||||
sendToQml({ method: 'palIsStale' });
|
||||
}
|
||||
|
||||
function avatarRemoved() {
|
||||
sendToQml({ method: 'palIsStale' });
|
||||
}
|
||||
|
||||
function avatarSessionChanged() {
|
||||
sendToQml({ method: 'palIsStale' });
|
||||
}
|
||||
|
||||
function shutdown() {
|
||||
if (onPalScreen) {
|
||||
tablet.gotoHomeScreen();
|
||||
|
@ -854,6 +873,9 @@ function shutdown() {
|
|||
Messages.subscribe(CHANNEL);
|
||||
Messages.messageReceived.disconnect(receiveMessage);
|
||||
Users.avatarDisconnected.disconnect(avatarDisconnected);
|
||||
AvatarList.avatarAddedEvent.disconnect(avatarAdded);
|
||||
AvatarList.avatarRemovedEvent.disconnect(avatarRemoved);
|
||||
AvatarList.avatarSessionChangedEvent.disconnect(avatarSessionChanged);
|
||||
off();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue