mirror of
https://github.com/overte-org/overte.git
synced 2025-04-18 14:57:00 +02:00
send location updates immediately on mode change and startup
This commit is contained in:
parent
258c5308db
commit
fb09efc0c9
2 changed files with 6 additions and 0 deletions
|
@ -676,6 +676,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) :
|
|||
connect(&nodeList->getDomainHandler(), &DomainHandler::connectedToDomain,
|
||||
discoverabilityManager.data(), &DiscoverabilityManager::updateLocation);
|
||||
|
||||
// send a location update immediately
|
||||
discoverabilityManager->updateLocation();
|
||||
|
||||
connect(nodeList.data(), &NodeList::nodeAdded, this, &Application::nodeAdded);
|
||||
connect(nodeList.data(), &NodeList::nodeKilled, this, &Application::nodeKilled);
|
||||
connect(nodeList.data(), &NodeList::nodeActivated, this, &Application::nodeActivated);
|
||||
|
|
|
@ -144,6 +144,9 @@ void DiscoverabilityManager::setDiscoverabilityMode(Discoverability::Mode discov
|
|||
if (static_cast<int>(_mode.get()) == Discoverability::None) {
|
||||
// if we just got set to no discoverability, make sure that we delete our location in DB
|
||||
removeLocation();
|
||||
} else {
|
||||
// we have a discoverability mode that says we should send a location, do that right away
|
||||
updateLocation();
|
||||
}
|
||||
|
||||
emit discoverabilityModeChanged(discoverabilityMode);
|
||||
|
|
Loading…
Reference in a new issue