mirror of
https://github.com/kiwix/kiwix-apple.git
synced 2025-09-25 21:05:09 -04:00
fix toc fetch
This commit is contained in:
parent
0fbc2aa858
commit
251c95a698
@ -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() {
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user