Skip to content

Commit

Permalink
mod/#6: PR 적용 - 함수 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeeum committed Apr 26, 2024
1 parent 13839c3 commit d61212e
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions app/src/main/java/com/sopt/now/compose/SignUpActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,20 @@ 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).apply{
putExtra("userId", id)
putExtra("userPw", pw)
putExtra("userNick", nick)
}
context.startActivity(intent)
sendUserInfo(context,id,pw,nick)
R.string.sign_up_success
}
}
Toast.makeText(context, message, Toast.LENGTH_SHORT).show()
}

fun sendUserInfo(context: Context,id: String,pw: String,nick:String){
val intent = Intent(context, LoginActivity::class.java).apply{
putExtra("userId", id)
putExtra("userPw", pw)
putExtra("userNick", nick)
}
context.startActivity(intent)
}
@Preview(showBackground = true)
@Composable
fun GreetingPreview3() {
Expand Down

0 comments on commit d61212e

Please sign in to comment.