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

[AN] Club Item UI 수정 적용 #576

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ fun ClubDto.toDomain(): Club {
address = address.toDomain(),
status = status.toDomain(),
createdAt = createdAt,
allowedSize = allowedSize.map { it.toDomain() },
allowedGender = allowedGender.map { it.toDomain() },
memberCapacity = memberCapacity,
imageUrl = imageUrl,
currentMemberCount = currentMemberCount,
Expand All @@ -34,8 +32,6 @@ fun Club.toData(): ClubDto {
address = address.toData(),
status = status.toData(),
createdAt = createdAt,
allowedSize = allowedSize.map { it.toData() },
allowedGender = allowedGender.map { it.toData() },
memberCapacity = memberCapacity,
imageUrl = imageUrl,
currentMemberCount = currentMemberCount,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ data class ClubDto(
val address: ClubAddressDto,
val status: ClubStateDto,
val createdAt: LocalDateTime,
val allowedGender: List<GenderDto>,
val allowedSize: List<SizeTypeDto>,
val memberCapacity: Int,
val currentMemberCount: Int,
val imageUrl: String? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ data class Club(
val address: ClubAddress,
val status: ClubState,
val createdAt: LocalDateTime,
val allowedGender: List<Gender>,
val allowedSize: List<SizeType>,
val memberCapacity: Int,
val currentMemberCount: Int,
val imageUrl: String? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@ import androidx.recyclerview.widget.RecyclerView
import com.happy.friendogly.databinding.ItemClubBinding
import com.happy.friendogly.presentation.ui.club.common.ClubItemActionHandler
import com.happy.friendogly.presentation.ui.club.common.model.ClubItemUiModel
import com.happy.friendogly.presentation.ui.club.list.adapter.filter.FilterAdapter
import com.happy.friendogly.presentation.ui.club.list.adapter.pet.ClubPetAdapter

class ClubViewHolder(
private val binding: ItemClubBinding,
) : RecyclerView.ViewHolder(binding.root) {
private val filterAdapter = FilterAdapter()
private val woofAdapter = ClubPetAdapter()

init {
binding.rcvClubListFilterList.adapter = filterAdapter
binding.rcvClubListDogList.adapter = woofAdapter
}

Expand All @@ -24,7 +21,6 @@ class ClubViewHolder(
) {
binding.club = clubItemUiModel
binding.actionHandler = actionHandler
filterAdapter.submitList(clubItemUiModel.filters)
woofAdapter.submitList(clubItemUiModel.clubPets)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ fun Club.toPresentation(): ClubItemUiModel {
clubLocation = address.toPresentation(),
clubLeaderName = ownerMemberName,
title = title,
filters = allowedGender.toGenderGroupFilters() + allowedSize.toSizeGroupFilters(),
clubDate = createdAt,
currentNumberOfPeople = currentMemberCount,
content = content,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package com.happy.friendogly.presentation.ui.club.common.model

import com.happy.friendogly.domain.model.ClubState
import com.happy.friendogly.presentation.ui.club.common.model.clubfilter.ClubFilter
import kotlinx.datetime.LocalDateTime

data class ClubItemUiModel(
val clubId: Long,
val filters: List<ClubFilter>,
val clubPoster: String?,
val clubState: ClubState,
val title: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ fun ClubResponse.toData(): ClubDto {
address = address.toData(),
status = status.toData(),
createdAt = createdAt,
allowedGender = allowedGender.map { it.toData() },
allowedSize = allowedSize.map { it.toData() },
memberCapacity = memberCapacity,
currentMemberCount = currentMemberCount,
imageUrl = imageUrl,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ data class ClubResponse(
val status: ClubStateResponse,
@Serializable(with = LocalDateTimeSerializer::class)
val createdAt: LocalDateTime,
val allowedGender: List<GenderResponse>,
val allowedSize: List<SizeTypeResponse>,
val memberCapacity: Int,
val currentMemberCount: Int,
val imageUrl: String? = null,
Expand Down
13 changes: 0 additions & 13 deletions android/app/src/main/res/layout/item_club.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,6 @@
app:layout_constraintStart_toEndOf="@id/iv_club_list_poster"
app:layout_constraintTop_toTopOf="@id/iv_club_list_poster">

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rcv_club_list_filter_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="3dp"
android:orientation="horizontal"
android:visibility="gone"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toTopOf="@id/tv_club_list_club_state"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:listitem="@layout/item_filter" />

<TextView
android:id="@+id/tv_club_list_club_state"
style="@style/Theme.AppCompat.TextView.SemiBold.Orange.Size14"
Expand Down
Loading