mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 20:33:09 +02:00
Don't consider changes to location details as update-worthy if we're not discoverable.
This commit is contained in:
parent
3a7edebb94
commit
af25e0e21f
1 changed files with 23 additions and 21 deletions
|
@ -51,12 +51,13 @@ void DiscoverabilityManager::updateLocation() {
|
|||
|
||||
QString pathString = addressManager->currentPath();
|
||||
|
||||
const QString PATH_KEY_IN_LOCATION = "path";
|
||||
locationObject.insert(PATH_KEY_IN_LOCATION, pathString);
|
||||
|
||||
const QString CONNECTED_KEY_IN_LOCATION = "connected";
|
||||
locationObject.insert(CONNECTED_KEY_IN_LOCATION, discoverable && domainHandler.isConnected());
|
||||
|
||||
if (discoverable) { // Don't consider changes to these as update-worthy if we're not discoverable.
|
||||
const QString PATH_KEY_IN_LOCATION = "path";
|
||||
locationObject.insert(PATH_KEY_IN_LOCATION, pathString);
|
||||
|
||||
if (!addressManager->getRootPlaceID().isNull()) {
|
||||
const QString PLACE_ID_KEY_IN_LOCATION = "place_id";
|
||||
locationObject.insert(PLACE_ID_KEY_IN_LOCATION,
|
||||
|
@ -76,6 +77,7 @@ void DiscoverabilityManager::updateLocation() {
|
|||
|
||||
const QString NETWORK_ADDRESS_PORT_IN_LOCATION = "network_port";
|
||||
locationObject.insert(NETWORK_ADDRESS_PORT_IN_LOCATION, domainSockAddr.getPort());
|
||||
}
|
||||
|
||||
const QString AVAILABILITY_KEY_IN_LOCATION = "availability";
|
||||
locationObject.insert(AVAILABILITY_KEY_IN_LOCATION, findableByString(static_cast<Discoverability::Mode>(_mode.get())));
|
||||
|
|
Loading…
Reference in a new issue