mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 22:13:58 -06:00
Connect signals before loading auth data
CURA-5744
This commit is contained in:
parent
47c5dbaf84
commit
f8369703ed
1 changed files with 5 additions and 6 deletions
|
@ -42,15 +42,14 @@ class Account(QObject):
|
|||
AUTH_SUCCESS_REDIRECT="{}/app/auth-success".format(self._oauth_root),
|
||||
AUTH_FAILED_REDIRECT="{}/app/auth-error".format(self._oauth_root)
|
||||
)
|
||||
|
||||
self._authorization_service = AuthorizationService(Application.getInstance().getPreferences(), self._oauth_settings)
|
||||
self._authorization_service.loadAuthDataFromPreferences()
|
||||
self._authorization_service.onAuthStateChanged.connect(self._onLoginStateChanged)
|
||||
self._authorization_service.onAuthenticationError.connect(self._onLoginStateChanged)
|
||||
|
||||
self._error_message = None # type: Optional[Message]
|
||||
self._logged_in = False
|
||||
|
||||
self._authorization_service = AuthorizationService(Application.getInstance().getPreferences(), self._oauth_settings)
|
||||
self._authorization_service.onAuthStateChanged.connect(self._onLoginStateChanged)
|
||||
self._authorization_service.onAuthenticationError.connect(self._onLoginStateChanged)
|
||||
self._authorization_service.loadAuthDataFromPreferences()
|
||||
|
||||
@pyqtProperty(bool, notify=loginStateChanged)
|
||||
def isLoggedIn(self) -> bool:
|
||||
return self._logged_in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue