 
     @objc private func cancelComparison(_ sender: UIBarButtonItem?) {
         state = .idle
-    }
-
-    private func resetComparisonSelectionButtons() {
-        firstComparisonSelectionButton.setTitle(nil, for: .normal)
-        firstComparisonSelectionButton.setImage(nil, for: .normal)
-        secondComparisonSelectionButton.setTitle(nil, for: .normal)
-        secondComparisonSelectionButton.setImage(nil, for: .normal)
-        firstComparisonSelectionButton.backgroundColor = theme.colors.paperBackground
-        secondComparisonSelectionButton.backgroundColor = theme.colors.paperBackground
-    }
-
-    @objc private func tappedCompare(_ sender: UIBarButtonItem) {
-        guard let firstIndexPath = indexPathsSelectedForComparisonGroupedByButtonTags[0], let secondIndexPath = indexPathsSelectedForComparisonGroupedByButtonTags[1] else {
-            return
-        }
-        let revision1 = pageHistorySections[firstIndexPath.section].items[firstIndexPath.item]
-        let revision2 = pageHistorySections[secondIndexPath.section].items[secondIndexPath.item]
-        
-        guard let date1 = revision1.revisionDate,
-            let date2 = revision2.revisionDate else {
-                return
-        }
-        
-        //show older revision as "from" no matter what order was selected
-        let fromRevision: WMFPageHistoryRevision
-        let toRevision: WMFPageHistoryRevision
-        if date1.compare(date2) == .orderedAscending {
-            fromRevision = revision1
-            toRevision = revision2
-        } else {
-            fromRevision = revision2
-            toRevision = revision1
-        }
-        
-        showDiff(from: fromRevision, to: toRevision, type: .compare(articleTitle: pageTitle))
     }
     
     private func showDiff(from: WMFPageHistoryRevision, to: WMFPageHistoryRevision, type: DiffContainerViewModel.DiffType) {

        }
    }

    private func updateComparisonButton(_ button: UIButton, with themeModel: SelectionThemeModel, cell: PageHistoryCollectionViewCell) {
        button.backgroundColor = themeModel.backgroundColor
        button.setImage(cell.authorImage, for: .normal)
        button.setTitle(cell.time, for: .normal)
        button.imageView?.tintColor = themeModel.authorColor
        button.setTitleColor(themeModel.authorColor, for: .normal)
        button.tintColor = themeModel.authorColor
    }

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

    func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath) {
        selectedCellsCount -= 1
        pageHistoryHintController?.hide(true, presenter: self, theme: theme)

    }
    private var indexPathsSelectedForComparison = Set<IndexPath>()

    private func selectionThemeModelForSelectionIndex(_ selectionIndex: Int) -> SelectionThemeModel? {
        assert(0...1 ~= selectionIndex, "Unsupported selection index")
        if selectionIndex == 0 {
            return firstSelectionThemeModel
        } else if selectionIndex == 1 {
            return secondSelectionThemeModel
        } else {
            return nil
        }
    }

    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
        
        if state == .editing {
            selectedCellsCount += 1

            defer {
                comparisonSelectionViewController.setCompareButtonEnabled(maxNumberOfRevisionsSelected)
            }

            guard let cell = collectionView.cellForItem(at: indexPath) as? PageHistoryCollectionViewCell else {
                return
            }

            if maxNumberOfRevisionsSelected {
                assert(indexPathsSelectedForComparisonGroupedByButtonTags.count == 1)
                if let previouslySelectedIndexPath = indexPathsSelectedForComparisonGroupedByButtonTags.first?.value, let previouslySelectedCell = collectionView.cellForItem(at: previouslySelectedIndexPath) as?  PageHistoryCollectionViewCell {
                    if previouslySelectedIndexPath > indexPath, previouslySelectedCell.selectionIndex == 0 {
                        comparisonSelectionViewController.updateSelectionButtonWithTag(1, with: secondSelectionThemeModel, cell: previouslySelectedCell)
                        indexPathsSelectedForComparisonGroupedByButtonTags[1] = previouslySelectedIndexPath
                        updateSelectionIndex(openSelectionIndex, for: previouslySelectedCell, at: previouslySelectedIndexPath)
                        updateSelectionThemeModel(secondSelectionThemeModel, for: previouslySelectedCell, at: previouslySelectedIndexPath)
                        openSelectionIndex = 0
                    } else if previouslySelectedIndexPath < indexPath, previouslySelectedCell.selectionIndex == 1 {
                        comparisonSelectionViewController.updateSelectionButtonWithTag(0, with: firstSelectionThemeModel, cell: previouslySelectedCell)
                        indexPathsSelectedForComparisonGroupedByButtonTags[0] = previouslySelectedIndexPath
                        updateSelectionIndex(openSelectionIndex, for: previouslySelectedCell, at: previouslySelectedIndexPath)
                        updateSelectionThemeModel(firstSelectionThemeModel, for: previouslySelectedCell, at: previouslySelectedIndexPath)
                        openSelectionIndex = 1
