Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
For #11901: Use safe call for collection item info.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarare committed Jun 24, 2020
1 parent f5ff9e4 commit df9c135
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app/src/main/java/org/mozilla/fenix/tabtray/TabTrayViewHolder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}
}
Expand Down

0 comments on commit df9c135

Please sign in to comment.