Skip to content

Commit a20faaf

Browse files
authored
Merge pull request #247 from 0xsequence/Fix/hideLoadingScreenWhenCancellingSocialSignIn
Hide loading screen when returning from a social login and not loggin…
2 parents 5c62291 + 5607128 commit a20faaf

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

Packages/Sequence-Unity/Sequence/SequenceFrontend/Scripts/UI/LoginPage.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Sequence.EmbeddedWallet;
44
using TMPro;
55
using UnityEngine;
6+
using System.Collections;
67

78
namespace Sequence.Demo
89
{
@@ -160,5 +161,24 @@ private void EnableLoadingScreen(bool enable)
160161
{
161162
_loadingScreen.SetActive(enable);
162163
}
164+
165+
private void OnApplicationFocus(bool hasFocus)
166+
{
167+
#if !UNITY_IOS
168+
if (hasFocus)
169+
{
170+
StartCoroutine(DisableLoadingScreenIfNotLoggingIn());
171+
}
172+
#endif
173+
}
174+
175+
private IEnumerator DisableLoadingScreenIfNotLoggingIn()
176+
{
177+
yield return new WaitForSecondsRealtime(0.1f);
178+
if (!LoginHandler.IsLoggingIn())
179+
{
180+
EnableLoadingScreen(false);
181+
}
182+
}
163183
}
164184
}

Packages/Sequence-Unity/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "xyz.0xsequence.waas-unity",
3-
"version": "3.17.4",
3+
"version": "3.17.5",
44
"displayName": "Sequence Embedded Wallet SDK",
55
"description": "A Unity SDK for the Sequence WaaS API",
66
"unity": "2021.3",

0 commit comments

Comments
 (0)