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 }