From 18dedb87dc7789a0ea0130cbcbef4e3e081f71f1 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Fri, 26 Jul 2024 17:58:50 +0530 Subject: [PATCH] Explicitly check if content is equal --- .../org/fossify/launcher/adapters/LaunchersAdapter.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/org/fossify/launcher/adapters/LaunchersAdapter.kt b/app/src/main/kotlin/org/fossify/launcher/adapters/LaunchersAdapter.kt index 2209403..b14dba3 100644 --- a/app/src/main/kotlin/org/fossify/launcher/adapters/LaunchersAdapter.kt +++ b/app/src/main/kotlin/org/fossify/launcher/adapters/LaunchersAdapter.kt @@ -114,5 +114,11 @@ private class AppLauncherDiffCallback : DiffUtil.ItemCallback() { return oldItem.getLauncherIdentifier().hashCode().toLong() == newItem.getLauncherIdentifier().hashCode().toLong() } - override fun areContentsTheSame(oldItem: AppLauncher, newItem: AppLauncher) = oldItem == newItem + override fun areContentsTheSame(oldItem: AppLauncher, newItem: AppLauncher): Boolean { + return oldItem.title == newItem.title && + oldItem.order == newItem.order && + oldItem.thumbnailColor == newItem.thumbnailColor && + oldItem.drawable != null && + newItem.drawable != null + } }