Skip to content

Commit

Permalink
Fix crash on login
Browse files Browse the repository at this point in the history
Closes #45
  • Loading branch information
wingio committed Aug 28, 2024
1 parent 0289e6a commit d838ed6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class GloomActivity : ComponentActivity() {
private val auth: AuthManager by inject()

private lateinit var navigator: Navigator
private var isLastIntentOauth: Boolean = intent?.isOAuthUri() ?: false
private var isLastIntentOauth: Boolean = false

override fun onCreate(savedInstanceState: Bundle?) {
installSplashScreen()
Expand Down Expand Up @@ -79,6 +79,7 @@ class GloomActivity : ComponentActivity() {

override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
isLastIntentOauth = intent.isOAuthUri()
if (intent.isOAuthUri()) {
if (viewModel.authManager.awaitingAuthType == null) return
intent.getOAuthCode()?.let { code ->
Expand Down

0 comments on commit d838ed6

Please sign in to comment.