File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
universal_adapter/src/main/java/com/yogeshpaliyal/universalAdapter/adapter Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
package com.yogeshpaliyal.universalAdapter.adapter
2
2
3
+ import android.annotation.SuppressLint
3
4
import android.view.LayoutInflater
4
5
import android.view.ViewGroup
5
6
import androidx.databinding.DataBindingUtil
@@ -34,12 +35,13 @@ class ContentListAdapter<T>(
34
35
} ? : false
35
36
}
36
37
38
+
37
39
override fun areContentsTheSame (oldItem : T , newItem : T ): Boolean {
38
40
return if (oldItem is BaseDiffUtil && newItem is BaseDiffUtil ) {
39
- oldItem.getDiffBody()?.equals( newItem.getDiffBody() )
41
+ oldItem.getDiffBody() == newItem.getDiffBody()
40
42
} else {
41
- oldItem?.toString()?.equals( newItem?.toString() )
42
- } ? : false
43
+ oldItem?.toString() == newItem?.toString()
44
+ }
43
45
}
44
46
45
47
}).build()) {
You can’t perform that action at this time.
0 commit comments