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

View File

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

View File

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