From b5228b01185efe52f4042315351281e170c6fae6 Mon Sep 17 00:00:00 2001 From: hyeumm <20221159@sungshin.ac.kr> Date: Thu, 18 Apr 2024 23:48:05 +0900 Subject: [PATCH] =?UTF-8?q?chore/#6:=20scope=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=ED=95=B4=EB=B3=B4=EA=B8=B0..?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/sopt/now/compose/LoginActivity.kt | 8 +++++--- app/src/main/java/com/sopt/now/compose/SignUpActivity.kt | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/sopt/now/compose/LoginActivity.kt b/app/src/main/java/com/sopt/now/compose/LoginActivity.kt index 8518beb..1766a6f 100644 --- a/app/src/main/java/com/sopt/now/compose/LoginActivity.kt +++ b/app/src/main/java/com/sopt/now/compose/LoginActivity.kt @@ -133,9 +133,11 @@ fun isLoginAvailable( val message = when { userId != id || userPw != pw -> R.string.login_error else -> { - val intent = Intent(context, MainActivity::class.java) - intent.putExtra("userId", userId).putExtra("userPw", userPw) - .putExtra("userNick", userNick) + val intent = Intent(context, MainActivity::class.java).apply { + putExtra("userId", userId) + putExtra("userPw", userPw) + putExtra("userNick", userNick) + } context.startActivity(intent) R.string.login_success } diff --git a/app/src/main/java/com/sopt/now/compose/SignUpActivity.kt b/app/src/main/java/com/sopt/now/compose/SignUpActivity.kt index 5aa839e..3216b97 100644 --- a/app/src/main/java/com/sopt/now/compose/SignUpActivity.kt +++ b/app/src/main/java/com/sopt/now/compose/SignUpActivity.kt @@ -133,8 +133,11 @@ fun isSignUpAvailable(context: Context,id: String,pw: String,nick: String,etc: S nick.isBlank() || nick.length != nick.trim().length -> R.string.sign_up_nick_error etc.length !in 1..Int.MAX_VALUE -> R.string.sign_up_etc_error else -> { - val intent = Intent(context, LoginActivity::class.java) - intent.putExtra("userId", id).putExtra("userPw", pw).putExtra("userNick", nick) + val intent = Intent(context, LoginActivity::class.java).apply{ + putExtra("userId", id) + putExtra("userPw", pw) + putExtra("userNick", nick) + } context.startActivity(intent) R.string.sign_up_success }