Skip to content

Commit

Permalink
[chore]: common 모듈 dependency 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
kangyuri1114 committed Mar 31, 2024
1 parent 7b43f23 commit 557e4f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
1 change: 1 addition & 0 deletions feature/devInfo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ android {
dependencies {
implementation(project(":domain"))
implementation(project(":core:designsystem"))
implementation(project(":core:common"))

KotlinDependencies.run {
implementation(kotlin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package com.zucchini.feature.devInfo.adapter

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListAdapter
import androidx.recyclerview.widget.RecyclerView
import com.zucchini.domain.model.DeveloperInfo
import com.zucchini.feature.devInfo.R
import com.zucchini.feature.devInfo.databinding.ItemDeveloperBinding
import com.zucchini.view.ItemDiffCallback

class DeveloperInfoAdapter :
ListAdapter<DeveloperInfo, DeveloperInfoAdapter.DeveloperInfoViewHolder>(
Expand Down Expand Up @@ -43,18 +43,3 @@ class DeveloperInfoAdapter :
}
}
}

class ItemDiffCallback<T : Any>(
val onItemsTheSame: (T, T) -> Boolean,
val onContentsTheSame: (T, T) -> Boolean,
) : DiffUtil.ItemCallback<T>() {
override fun areItemsTheSame(
oldItem: T,
newItem: T,
): Boolean = onItemsTheSame(oldItem, newItem)

override fun areContentsTheSame(
oldItem: T,
newItem: T,
): Boolean = onContentsTheSame(oldItem, newItem)
}

0 comments on commit 557e4f6

Please sign in to comment.