Skip to content

Commit fd2f1cf

Browse files
committed
♻️ Refactor profile button and edit steps
1 parent 376dee3 commit fd2f1cf

File tree

2 files changed

+1
-54
lines changed

2 files changed

+1
-54
lines changed

android/app/src/main/java/net/pengcook/android/presentation/edit/step/EditStepsFragment.kt

-4
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,15 @@ class EditStepsFragment : Fragment() {
8383
}
8484

8585
EditStepsEvent.ExitEvent -> {
86-
// 나가기
8786
findNavController().navigateUp()
8887
}
8988

9089
EditStepsEvent.TempSaveEvent -> {
91-
// 임시저장
9290
viewModel.saveData()
9391
Toast.makeText(requireContext(), "임시저장되었습니다.", Toast.LENGTH_SHORT).show()
9492
}
9593

9694
EditStepsEvent.OnFetchComplete -> {
97-
// 데이터 로딩 완료
9895
println("EditStepsFragment : ${args.sequence}")
9996
binding.vpStepMaking.setCurrentItem(args.sequence - 1, false)
10097
}
@@ -106,7 +103,6 @@ class EditStepsFragment : Fragment() {
106103
}
107104

108105
viewModel.steps.observe(viewLifecycleOwner) { steps ->
109-
println("EditStepsFragment : $steps")
110106
editStepsAdapter.submitList(steps)
111107
binding.vpStepMaking.setCurrentItem(args.sequence - 1, false)
112108
}

android/app/src/main/res/layout/item_profile_button.xml

+1-50
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,13 @@
1313
name="settings"
1414
type="String" />
1515

16-
<variable
17-
name="followList"
18-
type="String" />
19-
20-
<variable
21-
name="commentList"
22-
type="String" />
23-
24-
2516
<variable
2617
name="profileButtonClickListener"
2718
type="net.pengcook.android.presentation.profile.ProfileButtonClickListener" />
2819
</data>
2920

3021
<LinearLayout
31-
android:paddingHorizontal="8dp"
22+
android:paddingHorizontal="1dp"
3223
android:orientation="vertical"
3324
android:layout_width="match_parent"
3425
android:layout_height="wrap_content">
@@ -72,45 +63,5 @@
7263
tools:text="Next" />
7364

7465
</LinearLayout>
75-
76-
<LinearLayout
77-
android:layout_width="match_parent"
78-
android:layout_height="wrap_content"
79-
android:orientation="horizontal"
80-
android:paddingBottom="12dp">
81-
82-
<TextView
83-
android:id="@+id/btn_follows"
84-
style="@style/BasicButton.RadiusButton.ThinButton"
85-
android:layout_width="match_parent"
86-
android:layout_height="wrap_content"
87-
android:layout_weight="1"
88-
android:onClick="@{() -> profileButtonClickListener.onFollowListBtnClick()}"
89-
android:paddingVertical="8dp"
90-
android:text="@{followList}"
91-
app:layout_constraintEnd_toEndOf="parent"
92-
app:layout_constraintStart_toStartOf="parent"
93-
app:layout_constraintTop_toTopOf="parent"
94-
tools:text="Next" />
95-
96-
<View
97-
android:layout_width="8dp"
98-
android:layout_height="8dp" />
99-
100-
<TextView
101-
android:id="@+id/btn_comments"
102-
style="@style/BasicButton.RadiusButton.ThinButton"
103-
android:layout_width="match_parent"
104-
android:layout_height="wrap_content"
105-
android:layout_weight="1"
106-
android:onClick="@{() -> profileButtonClickListener.onCommentListBtnClick()}"
107-
android:paddingVertical="8dp"
108-
android:text="@{commentList}"
109-
app:layout_constraintEnd_toEndOf="parent"
110-
app:layout_constraintStart_toStartOf="parent"
111-
app:layout_constraintTop_toTopOf="parent"
112-
tools:text="Next" />
113-
114-
</LinearLayout>
11566
</LinearLayout>
11667
</layout>

0 commit comments

Comments
 (0)