-
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
Feature/#111 행사 상세 화면 구현 #191
The head ref may contain hidden characters: "Feature/#111-\uD589\uC0AC_\uC0C1\uC138_\uD654\uBA74_\uAD6C\uD604"
Conversation
private lateinit var binding: ActivityEventDetailBinding | ||
private val viewModel: EventDetailViewModel by viewModels { EventDetailViewModel.factory } | ||
private val eventId: Long by lazy { | ||
intent.getLongExtra(EVENT_ID_KEY, DEFAULT_EVENT_ID).apply { |
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.
apply는 왜 있는 건가요?
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.
실수요 ㅎㅎ
INFORMATION_TAB_POSITION -> tab.text = "상세 정보" | ||
COMMENT_TAB_POSITION -> tab.text = "댓글" | ||
PARTICIPANT_TAB_POSITION -> tab.text = "같이가요" |
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.
ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ
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.
나중에 한번에 하자고 하셔서... ㅠㅠ
import com.google.android.material.tabs.TabLayoutMediator | ||
|
||
class EventDetailActivity : AppCompatActivity() { | ||
private lateinit var binding: ActivityEventDetailBinding |
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.
private val binding: ActivityEventDetailBinding by lazy { ActivityEventDetailBinding.inflate(layoutInflater) }
이렇게 var를 val로 바꿔도 괜찮을 것 같습니다 😄
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.
바꿨어용~~~
val eventDetail: LiveData<EventDetailUiState> | ||
get() = _eventDetail | ||
|
||
private val _participation: MutableLiveData<Boolean> = MutableLiveData() |
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.
타입이 Boolean이라면 participation이라는 명사보다 isParticipated 같은 동사구가 국룰 아닌가요? ❓
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.
여기서 필요 없는 변수라 지웠습니다~ 제가 참가자 목록이랑 함께 작업하다 보니 섞인게 많아요 ㅎㅎ
import com.emmsale.R | ||
import com.emmsale.presentation.utils.extension.px | ||
|
||
class EventTag : AppCompatCheckBox { |
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.
저도 급하게 코드를 작성하느라 CheckBox의 checkable 속성을 false로 설정해두고 사용하고 있지만,
선택할 필요가 없는 View이기 때문에 TextView로 변경하는 것이 좋을 것 같습니다 : )
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.
그렇겠네요 오래 안걸리면 바꿔볼게요
android:layout_height="wrap_content" | ||
android:layout_marginStart="17dp" | ||
android:ems="12" | ||
android:text="@{eventDetail.name}" |
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.
eventDetail은 EventDetailUiState.Success 타입인데 observable을 구현한 타입이 아니라서 변경을 관찰할 수 없습니다.
나중에 새로고침 기능을 추가한다면 문제가 생길 것 같습니다 😢
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.
EventDetail 을 새로고침할 일이 없을 것 같긴 해서... 이 작업은 시간이 오래걸릴 것 같고 논의 해야할 사항이라서 일단은 나중에 더 고려해보겠습니다.
import com.emmsale.data.common.ApiResult | ||
|
||
interface EventDetailRepository { | ||
suspend fun fetchEventDetail(eventId: Long): ApiResult<EventDetail> |
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.
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.
이 부분도 사실 다시 고려해 봐야할 것 같아요. viewModel 에서만 fetch를 쓰고 서버에서는 get 을 쓰는게 좀 어색합니다. fetch 가 좀더 서버에서 쓰이는 언어같은데... 일단은 놔두고 다음 회의 때 한번 더 정했으면 좋겠습니다.
EventDetailUiState.from( | ||
result.data, | ||
), |
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.
넵!
#️⃣연관된 이슈
#111
📝작업 내용
행사 상세정보 화면 구현했어요.
스크린샷 (선택)
예상 소요 시간 및 실제 소요 시간
💬리뷰 요구사항(선택)
EventDetail 부분만 봐주세요. 너무 아니다 싶은 부분만 리뷰 달아주세요 머지가 시급합니다.
presentation 리뷰 커밋
data 리뷰 커밋