From c2057ee8704b08ebabef70e09588b8c585553956 Mon Sep 17 00:00:00 2001 From: tmdgh1592 Date: Thu, 27 Jul 2023 15:09:39 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EA=B9=83=ED=97=88=EB=B8=8C=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=EB=A5=BC=20=ED=8C=8C=EC=8B=B1=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=ED=95=A8=EC=88=98=EB=A5=BC=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/emmsale/presentation/ui/login/LoginActivity.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/login/LoginActivity.kt b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/login/LoginActivity.kt index fee75fc0a..35a9d8bcc 100644 --- a/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/login/LoginActivity.kt +++ b/android/2023-emmsale/app/src/main/java/com/emmsale/presentation/ui/login/LoginActivity.kt @@ -87,9 +87,12 @@ class LoginActivity : AppCompatActivity() { override fun onNewIntent(intent: Intent?) { super.onNewIntent(intent) - intent?.data?.getQueryParameter(GITHUB_CODE_PARAMETER)?.let(viewModel::saveGithubCode) + intent?.parseGithubCode()?.let(viewModel::saveGithubCode) } + private fun Intent.parseGithubCode(): String? = + data?.getQueryParameter(GITHUB_CODE_PARAMETER) + companion object { private const val GITHUB_CODE_PARAMETER = "code" }