From 85ac64b2eef3234ffaf3e4d63c9623f9a12d2ee6 Mon Sep 17 00:00:00 2001 From: Ajesh R Pai Date: Thu, 12 Oct 2023 17:21:03 +0530 Subject: [PATCH] * Fixes: Divider color between quick link items --- .../quicklinksitem/QuickLinkRibbonViewHolder.kt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/mysite/cards/quicklinksitem/QuickLinkRibbonViewHolder.kt b/WordPress/src/main/java/org/wordpress/android/ui/mysite/cards/quicklinksitem/QuickLinkRibbonViewHolder.kt index b8f7f41a6e26..76fe6808eef8 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/mysite/cards/quicklinksitem/QuickLinkRibbonViewHolder.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/mysite/cards/quicklinksitem/QuickLinkRibbonViewHolder.kt @@ -21,18 +21,18 @@ class QuickLinkRibbonViewHolder( layoutManager = LinearLayoutManager(context, RecyclerView.VERTICAL, false) adapter = QuickLinksItemAdapter() } + this.addItemDecoration( + MaterialDividerItemDecoration( + this.context, + DividerItemDecoration.VERTICAL + ).apply { + isLastItemDecorated = false + } + ) } } fun bind(quickLinksItem: QuickLinksItem) = with(binding) { - quickLinksItemList.addItemDecoration( - MaterialDividerItemDecoration( - quickLinksItemList.context, - DividerItemDecoration.VERTICAL - ).apply { - isLastItemDecorated = false - } - ) (quickLinksItemList.adapter as QuickLinksItemAdapter).update(quickLinksItem.quickLinkItems) if (quickLinksItem.showMoreFocusPoint) { quickLinksItemList.smoothScrollToPosition(quickLinksItemList.adapter!!.itemCount - 1)