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

History Panel Fix

  • Loading branch information
Tim Palade authored and mahmoud-adam85 committed May 11, 2018
1 parent bfc4e54 commit ca5f44990b6b2fb568bef8591ecb12ccb6dd6584
Showing with 4 additions and 1 deletion.
  1. +4 −1 Cliqz/HomePanel/CliqzHomePanelViewController.swift
@@ -59,6 +59,7 @@ class CliqzHomePanelViewController: UIViewController, UITextFieldDelegate {
}

fileprivate var currentIndexType: IndexType = .notSet
fileprivate var currentOrientation: DeviceOrientation? = nil

override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {

@@ -127,9 +128,11 @@ class CliqzHomePanelViewController: UIViewController, UITextFieldDelegate {
}

let indexType = index2type(segmentedControl.selectedSegmentIndex)
let orientation = UIDevice.current.getDeviceAndOrientation().1

guard currentIndexType != indexType else { return }
guard currentIndexType != indexType || currentOrientation != orientation else { return }
currentIndexType = indexType
currentOrientation = orientation

if segmentedControl.selectedSegmentIndex < 1 {
backgroundView.image = UIImage.cliqzBackgroundImage()

0 comments on commit ca5f449

Please sign in to comment.