Skip to content
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

Merged
merged 37 commits into from
Jan 18, 2024
Merged

Conversation

Doreminwoo
Copy link
Member

@Doreminwoo Doreminwoo commented Jan 17, 2024

Related issue 🛠

Work Description ✏️

  • 탭 레이아웃 커스텀 뷰 구현 (예정된, 참여완료)
  • 리사이클러뷰 아이템 구현 및 어댑터 연결
  • ... 눌러서 대화하기 및 참여 취소하기 보여주기
  • 유저가 참여자인 경우 참여 취소하기 모달 보여주기
  • 예정된, 참여완료 탭 Empty Text 비저블처리
  • 마이핑글 불러오기 api 연결
  • 참여 취소하기 (개최자일 때, 참여자일 때 나눠서) api 연결

Screenshot 📸

Recording_2024-01-18-03-41-52.mp4

Uncompleted Tasks 😅

  • 유저가 개최자인 경우 핑글 삭제하기 모달 보여주기
  • 아이템 이외에 클릭 시 아이템 팝업메뉴 사라지는 기능..

To Reviewers 📢

급급하게 해서 코드가 많이 더럽네요 ㅠㅠㅠㅠ 양해부탁드려요
리팩토링 때 열심히 수정해볼게요~

# 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
# Conflicts:
#	app/src/main/java/org/sopt/pingle/di/UseCaseModule.kt
#	app/src/main/res/values/strings.xml
Copy link
Collaborator

@jihyunniiii jihyunniiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생핑 ㅜ 잘 하고 있슴!! 좀만 더 파이팅

Comment on lines +3 to +8
enum class MyPingleType(
val boolean: Boolean
) {
SOON(false),
DONE(true)
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

지린당 ~

Comment on lines 26 to 35
ItemMyPingleBinding.inflate(
LayoutInflater.from(parent.context),
parent,
false
),
context,
navigateToMapList,
navigateToWebViewWithChatLink,
showDeleteModalDialogFragment,
viewClickListener
Copy link
Collaborator

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 -> {
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이걸 만드신 이유가 따로 있을까요?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 뷰모델로 옮겨주세요

Comment on lines 74 to 82
when (tab?.position) {
0 -> {
tabPosition = MyPingleType.SOON.boolean
viewModel.getPingleParticipationList(MyPingleType.SOON.boolean)
}

1 -> {
tabPosition = MyPingleType.DONE.boolean
viewModel.getPingleParticipationList(MyPingleType.DONE.boolean)
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

추출 티비 플리즈

Comment on lines +77 to +83
<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" />

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

24

Comment on lines +291 to +299
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">
Copy link
Collaborator

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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0dp

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이미지에 맞춰서 중앙 정렬 해주세요

Comment on lines +179 to +180
<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>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ㅋㅋㅋㅋ

Copy link
Collaborator

@jihyunniiii jihyunniiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니당 머지하세요

@Doreminwoo Doreminwoo merged commit 1c08c47 into develop Jan 18, 2024
1 check passed
@Doreminwoo Doreminwoo deleted the feat-my-pingle-view branch January 18, 2024 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[feat] 마이핑글 뷰 & 서버통신구현
2 participants