Skip to content

Commit

Permalink
[chore] #83 코드리뷰 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
HAJIEUN02 committed Jan 9, 2024
1 parent b867ede commit 337fe8f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ class PlanActivity : BindingActivity<ActivityPlanBinding>(R.layout.activity_plan
fragmentList.size - 1 -> {
binding.btnPlan.text = getString(R.string.plan_pingle)
binding.btnPlan.setOnClickListener {
Intent(this, MainActivity::class.java).apply {
startActivity(this)
}
navigateToMain()
}
}
// TODO 다른 다음으로 스트링과 합치기
Expand All @@ -117,14 +115,18 @@ class PlanActivity : BindingActivity<ActivityPlanBinding>(R.layout.activity_plan
buttonText = getString(R.string.plan_exit_modal_dialog_btn_text),
textButtonText = getString(R.string.plan_exit_modal_dialog_text_btn_text),
clickBtn = {
Intent(this, MainActivity::class.java).apply {
startActivity(this)
}
navigateToMain()
},
clickTextBtn = { finish() }
).show(supportFragmentManager, EXIT_MODAL)
}

private fun navigateToMain() {
Intent(this, MainActivity::class.java).apply {
startActivity(this)
}
}

companion object {
private const val EXIT_MODAL = "exitModal"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,23 @@ class PlanAnnouncementActivity :

private fun addListeners() {
binding.ivPlanAnnouncementExitBtn.setOnClickListener {
Intent(this, MainActivity::class.java).apply {
startActivity(this)
}
navigateToMain()
}

binding.btnPlanAnnouncement.setOnClickListener {
Intent(this, PlanActivity::class.java).apply {
startActivity(this)
}
navigateToPlan()
}
}

private fun navigateToMain() {
Intent(this, MainActivity::class.java).apply {
startActivity(this)
}
}

private fun navigateToPlan() {
Intent(this, PlanActivity::class.java).apply {
startActivity(this)
}
}

Expand Down

0 comments on commit 337fe8f

Please sign in to comment.