From 0c1f775dc5e1c5def8f432e2db51d61768f9db67 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Mon, 15 Mar 2021 20:55:42 +1300 Subject: [PATCH] Don't warn user if permission removed while they're connected --- libraries/networking/src/DomainHandler.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libraries/networking/src/DomainHandler.cpp b/libraries/networking/src/DomainHandler.cpp index b3cd14d62c..5a1d8fb4a0 100644 --- a/libraries/networking/src/DomainHandler.cpp +++ b/libraries/networking/src/DomainHandler.cpp @@ -388,7 +388,13 @@ void DomainHandler::setCanConnectWithoutAvatarEntities(bool canConnect) { bool DomainHandler::canConnectWithoutAvatarEntities() { if (!_canConnectWithoutAvatarEntities && !_haveAskedConnectWithoutAvatarEntities) { - emit confirmConnectWithoutAvatarEntities(); + if (_isConnected) { + // Already connected so don't ask. (Permission removed from user while in the domain.) + setCanConnectWithoutAvatarEntities(true); + } else { + // Ask whether to connect to the domain. + emit confirmConnectWithoutAvatarEntities(); + } } return _canConnectWithoutAvatarEntities; }