mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Ensure logged in state is not always set to False after loading from preferences
This commit is contained in:
parent
47c5dbaf84
commit
6d402806ac
1 changed files with 4 additions and 3 deletions
|
@ -28,6 +28,10 @@ class Account(QObject):
|
||||||
|
|
||||||
def __init__(self, parent = None) -> None:
|
def __init__(self, parent = None) -> None:
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
|
|
||||||
|
self._error_message = None # type: Optional[Message]
|
||||||
|
self._logged_in = False
|
||||||
|
|
||||||
self._callback_port = 32118
|
self._callback_port = 32118
|
||||||
self._oauth_root = "https://account.ultimaker.com"
|
self._oauth_root = "https://account.ultimaker.com"
|
||||||
self._cloud_api_root = "https://api.ultimaker.com"
|
self._cloud_api_root = "https://api.ultimaker.com"
|
||||||
|
@ -48,9 +52,6 @@ class Account(QObject):
|
||||||
self._authorization_service.onAuthStateChanged.connect(self._onLoginStateChanged)
|
self._authorization_service.onAuthStateChanged.connect(self._onLoginStateChanged)
|
||||||
self._authorization_service.onAuthenticationError.connect(self._onLoginStateChanged)
|
self._authorization_service.onAuthenticationError.connect(self._onLoginStateChanged)
|
||||||
|
|
||||||
self._error_message = None # type: Optional[Message]
|
|
||||||
self._logged_in = False
|
|
||||||
|
|
||||||
@pyqtProperty(bool, notify=loginStateChanged)
|
@pyqtProperty(bool, notify=loginStateChanged)
|
||||||
def isLoggedIn(self) -> bool:
|
def isLoggedIn(self) -> bool:
|
||||||
return self._logged_in
|
return self._logged_in
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue