Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

[IB2-340] Fixed the App hanging when pressing done button after switc…

…hing to/from Forget mode
  • Loading branch information
mahmoud-adam85 committed Aug 2, 2018
1 parent e166926 commit f1cb956b51bc683bcf3a20e63f47ef3934335006
Showing with 3 additions and 1 deletion.
  1. +1 −1 Client/Frontend/Browser/BrowserTrayAnimators.swift
  2. +2 −0 Client/Frontend/Browser/TabManager.swift
@@ -247,7 +247,7 @@ private func headerTransform(_ frame: CGRect, toFrame finalFrame: CGRect, contai

//MARK: Private Helper Methods
private func calculateCollapsedCellFrameUsingCollectionView(_ collectionView: UICollectionView, atIndex index: Int) -> CGRect {
// Cliqz: added check to prevent charing the app when clicking does after swtiching forget mode state
// Cliqz: added check to prevent crashing the app when clicking done button after swtiching forget mode state
guard collectionView.numberOfItems(inSection: 0) > index else { return .zero}

if let attr = collectionView.collectionViewLayout.layoutAttributesForItem(at: IndexPath(item: index, section: 0)) {
@@ -213,6 +213,8 @@ class TabManager: NSObject {
func willSwitchTabMode(leavingPBM: Bool) {
if shouldClearPrivateTabs() && leavingPBM {
removeAllPrivateTabs()
// Cliqz: [IB2-340] Fixed the App hanging when pressing done button after switching to/from Forget mode
selectTab(self.tabs.first)
}
}

0 comments on commit f1cb956

Please sign in to comment.