Skip to content

Commit

Permalink
[#1012] StartArgs -> Argument로 네이밍 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
l2hyunwoo committed Jan 1, 2025
1 parent 92c5444 commit bc4bec6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class HomeActivity : AppCompatActivity() {
tracker.track(type = EventType.CLICK, name = "mypage", properties = mapOf("view_type" to args?.userStatus?.value))
lifecycleScope.launch {
startActivity(
MyPageActivity.getIntent(this@HomeActivity, MyPageActivity.StartArgs(viewModel.userActiveState.value))
MyPageActivity.getIntent(this@HomeActivity, MyPageActivity.Argument(viewModel.userActiveState.value))
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class NavigatorProviderIntent @Inject constructor(

override fun getMyPageActivityIntent(name: String) = MyPageActivity.getIntent(
context,
MyPageActivity.StartArgs(UserActiveState.valueOf(name))
MyPageActivity.Argument(UserActiveState.valueOf(name))
)

override fun getAttendanceActivityIntent() = AttendanceActivity.newInstance(context)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ import javax.inject.Inject
@AndroidEntryPoint
class MyPageActivity : AppCompatActivity() {
private val viewModel by viewModels<MyPageViewModel>()
private val args by serializableExtra(StartArgs(UserActiveState.UNAUTHENTICATED))
private val args by serializableExtra(Argument(UserActiveState.UNAUTHENTICATED))

@Inject
lateinit var navigatorProvider: NavigatorProvider
Expand Down Expand Up @@ -224,15 +224,15 @@ class MyPageActivity : AppCompatActivity() {
}
}

data class StartArgs(
data class Argument(
val userActiveState: UserActiveState
) : Serializable

companion object {
@JvmStatic
fun getIntent(context: Context, args: StartArgs) = Intent(context, MyPageActivity::class.java).apply {
putExtra("args", args)
}
fun getIntent(context: Context, args: Argument) = Intent(context, MyPageActivity::class.java)
.putExtra("args", args)

}
}

Expand Down

0 comments on commit bc4bec6

Please sign in to comment.