From f9919be76c3e25a359e68ef8c079a9db22423b70 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Sat, 11 Nov 2023 11:00:53 -0500 Subject: [PATCH 1/2] save credentials if asked when using quick connect --- components/quickConnect/QuickConnectDialog.bs | 6 +++++- components/quickConnect/QuickConnectDialog.xml | 1 + source/ShowScenes.bs | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/quickConnect/QuickConnectDialog.bs b/components/quickConnect/QuickConnectDialog.bs index 97990ce97..e1abf8499 100644 --- a/components/quickConnect/QuickConnectDialog.bs +++ b/components/quickConnect/QuickConnectDialog.bs @@ -33,7 +33,11 @@ sub OnAuthenticated() authenticated = AuthenticateViaQuickConnect(m.top.quickConnectJson.secret) if authenticated <> invalid and authenticated = true currentUser = AboutMe() - session.user.Login(currentUser) + if m.top.saveCredentials + session.user.Login(currentUser, true) + else + session.user.Login(currentUser) + end if session.user.LoadUserPreferences() LoadUserAbilities() m.top.close = true diff --git a/components/quickConnect/QuickConnectDialog.xml b/components/quickConnect/QuickConnectDialog.xml index 22a43bc03..3e360d5e6 100644 --- a/components/quickConnect/QuickConnectDialog.xml +++ b/components/quickConnect/QuickConnectDialog.xml @@ -7,5 +7,6 @@ + \ No newline at end of file diff --git a/source/ShowScenes.bs b/source/ShowScenes.bs index 79c41a197..dca7b2b28 100644 --- a/source/ShowScenes.bs +++ b/source/ShowScenes.bs @@ -506,6 +506,7 @@ function CreateSigninGroup(user = "") else ' Server user is talking to is at least 10.8 and has quick connect enabled... m.quickConnectDialog = createObject("roSGNode", "QuickConnectDialog") + m.quickConnectDialog.saveCredentials = checkbox.checkedState[0] m.quickConnectDialog.quickConnectJson = json m.quickConnectDialog.title = tr("Quick Connect") m.quickConnectDialog.message = [tr("Here is your Quick Connect code: ") + json.Code, tr("(Dialog will close automatically)")] From 5d5d7842c8bc85889b8af3e51703cb45bca5c4b1 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Sat, 11 Nov 2023 11:05:21 -0500 Subject: [PATCH 2/2] remove unnecessary if statement --- components/quickConnect/QuickConnectDialog.bs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/components/quickConnect/QuickConnectDialog.bs b/components/quickConnect/QuickConnectDialog.bs index e1abf8499..5676c3ef2 100644 --- a/components/quickConnect/QuickConnectDialog.bs +++ b/components/quickConnect/QuickConnectDialog.bs @@ -33,11 +33,7 @@ sub OnAuthenticated() authenticated = AuthenticateViaQuickConnect(m.top.quickConnectJson.secret) if authenticated <> invalid and authenticated = true currentUser = AboutMe() - if m.top.saveCredentials - session.user.Login(currentUser, true) - else - session.user.Login(currentUser) - end if + session.user.Login(currentUser, m.top.saveCredentials) session.user.LoadUserPreferences() LoadUserAbilities() m.top.close = true