mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 07:23:00 +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;
|
id: reloadNearby;
|
||||||
width: reloadNearby.height;
|
width: reloadNearby.height;
|
||||||
glyph: hifi.glyphs.reload;
|
glyph: hifi.glyphs.reload;
|
||||||
onClicked: refreshNearbyWithFilter();
|
onClicked: {
|
||||||
|
refreshNearbyWithFilter();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1188,6 +1190,8 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sortModel();
|
sortModel();
|
||||||
|
reloadNearby.glyph = hifi.glyphs.reload;
|
||||||
|
reloadNearby.color = 0;
|
||||||
break;
|
break;
|
||||||
case 'connections':
|
case 'connections':
|
||||||
var data = message.params;
|
var data = message.params;
|
||||||
|
@ -1278,6 +1282,10 @@ Rectangle {
|
||||||
var sessionID = message.params[0];
|
var sessionID = message.params[0];
|
||||||
delete ignored[sessionID];
|
delete ignored[sessionID];
|
||||||
break;
|
break;
|
||||||
|
case 'palIsStale':
|
||||||
|
reloadNearby.glyph = hifi.glyphs.alert;
|
||||||
|
reloadNearby.color = 2;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
console.log('Unrecognized message:', JSON.stringify(message));
|
console.log('Unrecognized message:', JSON.stringify(message));
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,11 @@
|
||||||
|
|
||||||
(function() { // BEGIN LOCAL_SCOPE
|
(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
|
// hardcoding these as it appears we cannot traverse the originalTextures in overlays??? Maybe I've missed
|
||||||
// something, will revisit as this is sorta horrible.
|
// something, will revisit as this is sorta horrible.
|
||||||
|
@ -691,6 +695,9 @@ function startup() {
|
||||||
Messages.subscribe(CHANNEL);
|
Messages.subscribe(CHANNEL);
|
||||||
Messages.messageReceived.connect(receiveMessage);
|
Messages.messageReceived.connect(receiveMessage);
|
||||||
Users.avatarDisconnected.connect(avatarDisconnected);
|
Users.avatarDisconnected.connect(avatarDisconnected);
|
||||||
|
AvatarList.avatarAddedEvent.connect(avatarAdded);
|
||||||
|
AvatarList.avatarRemovedEvent.connect(avatarRemoved);
|
||||||
|
AvatarList.avatarSessionChangedEvent.connect(avatarSessionChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
startup();
|
startup();
|
||||||
|
@ -841,6 +848,18 @@ function clearLocalQMLDataAndClosePAL() {
|
||||||
sendToQml({ method: 'clearLocalQMLData' });
|
sendToQml({ method: 'clearLocalQMLData' });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function avatarAdded() {
|
||||||
|
sendToQml({ method: 'palIsStale' });
|
||||||
|
}
|
||||||
|
|
||||||
|
function avatarRemoved() {
|
||||||
|
sendToQml({ method: 'palIsStale' });
|
||||||
|
}
|
||||||
|
|
||||||
|
function avatarSessionChanged() {
|
||||||
|
sendToQml({ method: 'palIsStale' });
|
||||||
|
}
|
||||||
|
|
||||||
function shutdown() {
|
function shutdown() {
|
||||||
if (onPalScreen) {
|
if (onPalScreen) {
|
||||||
tablet.gotoHomeScreen();
|
tablet.gotoHomeScreen();
|
||||||
|
@ -854,6 +873,9 @@ function shutdown() {
|
||||||
Messages.subscribe(CHANNEL);
|
Messages.subscribe(CHANNEL);
|
||||||
Messages.messageReceived.disconnect(receiveMessage);
|
Messages.messageReceived.disconnect(receiveMessage);
|
||||||
Users.avatarDisconnected.disconnect(avatarDisconnected);
|
Users.avatarDisconnected.disconnect(avatarDisconnected);
|
||||||
|
AvatarList.avatarAddedEvent.disconnect(avatarAdded);
|
||||||
|
AvatarList.avatarRemovedEvent.disconnect(avatarRemoved);
|
||||||
|
AvatarList.avatarSessionChangedEvent.disconnect(avatarSessionChanged);
|
||||||
off();
|
off();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue