Fix GOTO dialog's connection status and location not always updating

This commit is contained in:
David Rowe 2017-11-09 10:51:21 +13:00
parent 0d21e0be11
commit c5c1ead400
2 changed files with 7 additions and 3 deletions

View file

@ -84,7 +84,6 @@ StackView {
anchors.centerIn = parent;
}
function resetAfterTeleport() {
//storyCardFrame.shown = root.shown = false;
}
@ -135,7 +134,8 @@ StackView {
bottom: parent.bottom
}
onHostChanged: updateLocationTextTimer.start();
onHostChanged: updateLocationTextTimer.restart();
Rectangle {
id: navBar
width: parent.width
@ -358,7 +358,7 @@ StackView {
// Delay updating location text a bit to avoid flicker of content and so that connection status is valid.
id: updateLocationTextTimer
running: false
interval: 500 // ms
interval: 1000 // ms
repeat: false
onTriggered: updateLocationText(false);
}

View file

@ -40,6 +40,10 @@ AddressBarDialog::AddressBarDialog(QQuickItem* parent) : OffscreenQmlDialog(pare
_backEnabled = !(DependencyManager::get<AddressManager>()->getBackStack().isEmpty());
_forwardEnabled = !(DependencyManager::get<AddressManager>()->getForwardStack().isEmpty());
connect(addressManager.data(), &AddressManager::hostChanged, this, &AddressBarDialog::hostChanged);
auto nodeList = DependencyManager::get<NodeList>();
const DomainHandler& domainHandler = nodeList->getDomainHandler();
connect(&domainHandler, &DomainHandler::connectedToDomain, this, &AddressBarDialog::hostChanged);
connect(&domainHandler, &DomainHandler::disconnectedFromDomain, this, &AddressBarDialog::hostChanged);
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::setUseFeed, this, &AddressBarDialog::setUseFeed);
connect(qApp, &Application::receivedHifiSchemeURL, this, &AddressBarDialog::receivedHifiSchemeURL);
}