 
     var openSelectionIndex = 0
     private var postedMaxRevisionsSelectedAccessibilityNotification = false
-    
+    private var indexPathsSelectedForComparison = [Int: IndexPath]()
+
     func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
         selectedCellsCount += 1
         defer {

        button.contentHorizontalAlignment = .leading
        button.leftPadding = 10
        button.rightPadding = 10
        return button
    }


            button.imageView?.tintColor = themeModel.authorColor
            button.setTitleColor(themeModel.authorColor, for: .normal)
            button.tintColor = themeModel.authorColor
            indexPathsSelectedForComparison[button.tag] = indexPath
        }
        updateSelectionIndex(openSelectionIndex, for: cell, at: indexPath)
        updateSelectionThemeModel(themeModel, for: cell, at: indexPath)
        cell.apply(theme: theme)

        openSelectionIndex += 1
    }

    @objc private func scrollToComparisonSelection(_ sender: UIButton) {
        guard let indexPath = indexPathsSelectedForComparison[sender.tag] else {
            return
        }
        collectionView.scrollToItem(at: indexPath, at: .centeredVertically, animated: true)
    }

    func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath) {
