Skip to content

Commit

Permalink
🐛 fix setting page item index
Browse files Browse the repository at this point in the history
  • Loading branch information
Hogu59 committed Oct 25, 2024
1 parent a901652 commit 14db395
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class EditStepsFragment : Fragment() {
EditStepsEvent.OnFetchComplete -> {
// 데이터 로딩 완료
println("EditStepsFragment : ${args.sequence}")
binding.vpStepMaking.setCurrentItem(args.sequence + 1, false)
binding.vpStepMaking.setCurrentItem(args.sequence - 1, false)
}

EditStepsEvent.OnSaveFailure -> {
Expand All @@ -108,6 +108,7 @@ class EditStepsFragment : Fragment() {
viewModel.steps.observe(viewLifecycleOwner) { steps ->
println("EditStepsFragment : $steps")
editStepsAdapter.submitList(steps)
binding.vpStepMaking.setCurrentItem(args.sequence - 1, false)
}
}
}

0 comments on commit 14db395

Please sign in to comment.