fix toc fetch

This commit is contained in:
Chris Li 2016-10-13 17:23:09 -04:00
parent 0fbc2aa858
commit 251c95a698
3 changed files with 4 additions and 10 deletions

View File

@ -114,13 +114,6 @@ class MainController: UIViewController {
}
}
// MARK: - Tasks
func setTableOfContentIfNeeded() {
guard traitCollection.horizontalSizeClass == .Regular && isShowingTableOfContents else {return}
tableOfContentsController?.headings = JSInjection.getTableOfContents(webView)
}
// MARK: - Configure
func configureUIElements(horizontalSizeClass: UIUserInterfaceSizeClass) {
@ -164,7 +157,7 @@ class MainController: UIViewController {
}
func configureTableOfContents() {
guard traitCollection.horizontalSizeClass == .Regular && isShowingTableOfContents else {return}
guard isShowingTableOfContents else {return}
tableOfContentsController?.headings = JSInjection.getTableOfContents(webView)
}
@ -201,6 +194,7 @@ class MainController: UIViewController {
func tableOfContentButtonTapped(sender: UIBarButtonItem) {
guard let _ = article else {return}
isShowingTableOfContents ? hideTableOfContentsController() : showTableOfContentsController()
configureTableOfContents()
}
func showLibraryButtonTapped() {

View File

@ -49,7 +49,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.8.1739</string>
<string>1.8.1744</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>

View File

@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.8.1739</string>
<string>1.8.1744</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionMainStoryboard</key>