Skip to content

Instantly share code, notes, and snippets.

@frosty
Created August 4, 2016 08:54
Show Gist options
  • Select an option

  • Save frosty/2d2257a22d27d10c80d6c06248e51c82 to your computer and use it in GitHub Desktop.

Select an option

Save frosty/2d2257a22d27d10c80d6c06248e51c82 to your computer and use it in GitHub Desktop.
diff --git a/WordPress/Classes/ViewRelated/Post/AbstractPostListViewController.swift b/WordPress/Classes/ViewRelated/Post/AbstractPostListViewController.swift
index 49d4673..9dc5ec7 100644
--- a/WordPress/Classes/ViewRelated/Post/AbstractPostListViewController.swift
+++ b/WordPress/Classes/ViewRelated/Post/AbstractPostListViewController.swift
@@ -162,10 +162,6 @@ class AbstractPostListViewController : UIViewController, WPContentSyncHelperDele
override func viewWillDisappear(animated: Bool) {
super.viewWillDisappear(animated)
- if searchController.active {
- searchController.active = false
- }
-
NSNotificationCenter.defaultCenter().removeObserver(self, name: UIApplicationDidBecomeActiveNotification, object: nil)
unregisterForKeyboardNotifications()
}
@@ -986,7 +982,6 @@ class AbstractPostListViewController : UIViewController, WPContentSyncHelperDele
}
func updateSearchResultsForSearchController(searchController: UISearchController) {
- resetTableViewContentOffset()
searchHelper.searchUpdated(searchController.searchBar.text)
}
}
diff --git a/WordPress/Classes/ViewRelated/Themes/ThemeBrowserViewController.swift b/WordPress/Classes/ViewRelated/Themes/ThemeBrowserViewController.swift
index ce3706c..a38afbc 100644
--- a/WordPress/Classes/ViewRelated/Themes/ThemeBrowserViewController.swift
+++ b/WordPress/Classes/ViewRelated/Themes/ThemeBrowserViewController.swift
@@ -267,11 +267,6 @@ public protocol ThemePresenter: class
}
public override func viewWillDisappear(animated: Bool) {
-
- if searchController.active {
- searchController.active = false
- }
-
super.viewWillDisappear(animated)
unregisterForKeyboardNotifications()
@@ -727,13 +722,7 @@ public protocol ThemePresenter: class
}
webViewController.navigationItem.rightBarButtonItems = buttons
- if searchController.active {
- searchController.dismissViewControllerAnimated(true, completion: {
- self.navigationController?.pushViewController(webViewController, animated:true)
- })
- } else {
- navigationController?.pushViewController(webViewController, animated:true)
- }
+ self.navigationController?.pushViewController(webViewController, animated:true)
}
public func activatePresentingTheme() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment