From df9c135a97f4481674b8059fc65c94a88b45a737 Mon Sep 17 00:00:00 2001 From: mcarare Date: Wed, 24 Jun 2020 19:59:32 +0300 Subject: [PATCH] For #11901: Use safe call for collection item info. --- .../org/mozilla/fenix/tabtray/TabTrayViewHolder.kt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayViewHolder.kt b/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayViewHolder.kt index ea844793d91d..9745caa8ae75 100644 --- a/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayViewHolder.kt +++ b/app/src/main/java/org/mozilla/fenix/tabtray/TabTrayViewHolder.kt @@ -185,15 +185,14 @@ class TabTrayViewHolder( ) { super.onInitializeAccessibilityNodeInfo(host, info) info?.let { - val initialInfo = info.collectionItemInfo - info.collectionItemInfo = initialInfo?.let { + info.collectionItemInfo = info.collectionItemInfo?.let { initialInfo -> AccessibilityNodeInfo.CollectionItemInfo.obtain( newIndex, - it.rowSpan, - it.columnIndex, - it.columnSpan, + initialInfo.rowSpan, + initialInfo.columnIndex, + initialInfo.columnSpan, false, - it.isSelected + initialInfo.isSelected ) } }