-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] 마이핑글 뷰 & 서버통신구현 #163
Conversation
# Conflicts: # app/src/main/java/org/sopt/pingle/data/datasource/remote/PingleRemoteDataSource.kt # app/src/main/java/org/sopt/pingle/data/datasourceimpl/remote/PingleRemoteDataSourceImpl.kt # app/src/main/java/org/sopt/pingle/domain/repository/PingleRepository.kt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생핑 ㅜ 잘 하고 있슴!! 좀만 더 파이팅
enum class MyPingleType( | ||
val boolean: Boolean | ||
) { | ||
SOON(false), | ||
DONE(true) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
지린당 ~
ItemMyPingleBinding.inflate( | ||
LayoutInflater.from(parent.context), | ||
parent, | ||
false | ||
), | ||
context, | ||
navigateToMapList, | ||
navigateToWebViewWithChatLink, | ||
showDeleteModalDialogFragment, | ||
viewClickListener |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
변수가 여러개니까능,,, named argument 추가해주시면 안 될 깝쇼?
binding.tlMyPingle.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener { | ||
override fun onTabSelected(tab: TabLayout.Tab) { | ||
when (tab.position) { | ||
0 -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 값들도 타입에 넣어주면 더 깔끔해질 것 같네요
class MyPingleFragment : BindingFragment<FragmentMyPingleBinding>(R.layout.fragment_my_pingle) { | ||
private val viewModel by viewModels<MyPingleViewModel>() | ||
private lateinit var myPingleAdapter: MyPingleAdatper | ||
private var tabPosition = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이걸 만드신 이유가 따로 있을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이거 뷰모델로 옮겨주세요
when (tab?.position) { | ||
0 -> { | ||
tabPosition = MyPingleType.SOON.boolean | ||
viewModel.getPingleParticipationList(MyPingleType.SOON.boolean) | ||
} | ||
|
||
1 -> { | ||
tabPosition = MyPingleType.DONE.boolean | ||
viewModel.getPingleParticipationList(MyPingleType.DONE.boolean) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onTabSelected 와 onTabReselected에 사용되는 로직이 동일하다면 함수화 시켜주는 게 좋을 것 같습니다.
@@ -61,7 +61,7 @@ class PlanDateTimeFragment : | |||
if (selectedLocalDate.before(todayLocalDate)) { | |||
PingleSnackbar.makeSnackbar( | |||
binding.root, | |||
getString(R.string.plan_future_date_snackber), | |||
getString(R.string.plan_future_date_snackbar), | |||
126 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
추출 티비 플리즈
<androidx.constraintlayout.widget.Guideline | ||
android:id="@+id/gl_top_bottom" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal" | ||
app:layout_constraintGuide_end="@dimen/spacing20" /> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
24
android:id="@+id/layout_my_pingle_menu" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginEnd="24dp" | ||
android:background="@color/g_10" | ||
android:foreground="@drawable/shape_border_radius_8_stroke_1" | ||
android:visibility="invisible" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/iv_my_pingle_edit"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parent에 맞추기 보다는 layout에 맞추는 게 좋을 것 같습니다. 그리고 마진 16!!
|
||
<TextView | ||
android:id="@+id/tv_my_pingle_menu_trash" | ||
android:layout_width="wrap_content" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0dp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이미지에 맞춰서 중앙 정렬 해주세요
<string name="my_pingle_tab_soon">\t\t\t\t\t\t\t예정된\t\t\t\t\t\t\t\t</string> | ||
<string name="my_pingle_tab_done">\t\t\t\t\t\t참여완료\t\t\t\t\t\t</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅋㅋㅋㅋ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니당 머지하세요
Related issue 🛠
Work Description ✏️
Screenshot 📸
Recording_2024-01-18-03-41-52.mp4
Uncompleted Tasks 😅
To Reviewers 📢
급급하게 해서 코드가 많이 더럽네요 ㅠㅠㅠㅠ 양해부탁드려요
리팩토링 때 열심히 수정해볼게요~