Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
data class Post(
val id: String,
val sender: String?,
val caption: String?,
val media: String?,
val timestamp: Long?
object PostDiffUtils : DiffUtil.ItemCallback<Post>() {
override fun areItemsTheSame(oldItem: Post, newItem: Post): Boolean {
return ==
override fun areContentsTheSame(oldItem: Post, newItem: Post): Boolean {
return oldItem == newItem
interface PostApiService {
fun getFeed(): Call<Response<List<Post>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment