Skip to content

Commit

Permalink
style: ktlint 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
chaehyuns committed Jul 25, 2024
1 parent 2a296bc commit 39d1872
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ enum class OfferingStatus(
Scheduling("일정확정", "일정수정", R.drawable.ic_comment_detail_scheduling),
Purchasing("구매확정", "일정수정", R.drawable.ic_comment_detail_purchasing),
Dealing("거래확정", "신고하기", R.drawable.ic_comment_detail_dealing),
Completed("거래완료", "신고하기", R.drawable.ic_comment_detail_completed);

Completed("거래완료", "신고하기", R.drawable.ic_comment_detail_completed),
;

companion object {
fun nextStatus(currentStatus: OfferingStatus): OfferingStatus {
return entries[(currentStatus.ordinal + 1) % entries.size]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ fun ImageView.setOfferingsProductImageResource(imageUrl: String?) {
}

@BindingAdapter("imageResource")
fun setImageResource(imageView: ImageView, @DrawableRes resource: Int) {
fun setImageResource(
imageView: ImageView,
@DrawableRes resource: Int,
) {
imageView.setImageResource(resource)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ class CommentDetailViewModel(

private var cachedComments: List<Comment> = emptyList()
private var pollJob: Job? = null

private val _offeringStatus = MutableLiveData(OfferingStatus.Recruiting)
val offeringStatus: LiveData<OfferingStatus> get() = _offeringStatus

init {
startPolling()
}

fun updateStatus() {
_offeringStatus.value = _offeringStatus.value?.let { OfferingStatus.nextStatus(it) }
}
Expand Down

0 comments on commit 39d1872

Please sign in to comment.