Move Reader button to Safari button position on Article View. Issue #1260
This commit is contained in:
parent
f96d4cbf17
commit
4f1e1ef0c2
|
@ -33,7 +33,6 @@ class ArticleViewController: UIViewController {
|
||||||
@IBOutlet private weak var readBarButtonItem: UIBarButtonItem!
|
@IBOutlet private weak var readBarButtonItem: UIBarButtonItem!
|
||||||
@IBOutlet private weak var starBarButtonItem: UIBarButtonItem!
|
@IBOutlet private weak var starBarButtonItem: UIBarButtonItem!
|
||||||
@IBOutlet private weak var actionBarButtonItem: UIBarButtonItem!
|
@IBOutlet private weak var actionBarButtonItem: UIBarButtonItem!
|
||||||
@IBOutlet private weak var browserBarButtonItem: UIBarButtonItem!
|
|
||||||
@IBOutlet private weak var webViewContainer: UIView!
|
@IBOutlet private weak var webViewContainer: UIView!
|
||||||
|
|
||||||
private var articleExtractorButton: ArticleExtractorButton = {
|
private var articleExtractorButton: ArticleExtractorButton = {
|
||||||
|
@ -103,7 +102,7 @@ class ArticleViewController: UIViewController {
|
||||||
NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground(_:)), name: UIApplication.willEnterForegroundNotification, object: nil)
|
NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground(_:)), name: UIApplication.willEnterForegroundNotification, object: nil)
|
||||||
|
|
||||||
articleExtractorButton.addTarget(self, action: #selector(toggleArticleExtractor(_:)), for: .touchUpInside)
|
articleExtractorButton.addTarget(self, action: #selector(toggleArticleExtractor(_:)), for: .touchUpInside)
|
||||||
navigationItem.titleView = articleExtractorButton
|
toolbarItems?.append(UIBarButtonItem(customView: articleExtractorButton))
|
||||||
|
|
||||||
ArticleViewControllerWebViewProvider.shared.dequeueWebView() { webView in
|
ArticleViewControllerWebViewProvider.shared.dequeueWebView() { webView in
|
||||||
|
|
||||||
|
@ -133,7 +132,6 @@ class ArticleViewController: UIViewController {
|
||||||
nextArticleBarButtonItem.isEnabled = false
|
nextArticleBarButtonItem.isEnabled = false
|
||||||
readBarButtonItem.isEnabled = false
|
readBarButtonItem.isEnabled = false
|
||||||
starBarButtonItem.isEnabled = false
|
starBarButtonItem.isEnabled = false
|
||||||
browserBarButtonItem.isEnabled = false
|
|
||||||
actionBarButtonItem.isEnabled = false
|
actionBarButtonItem.isEnabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -145,7 +143,6 @@ class ArticleViewController: UIViewController {
|
||||||
articleExtractorButton.isEnabled = true
|
articleExtractorButton.isEnabled = true
|
||||||
readBarButtonItem.isEnabled = true
|
readBarButtonItem.isEnabled = true
|
||||||
starBarButtonItem.isEnabled = true
|
starBarButtonItem.isEnabled = true
|
||||||
browserBarButtonItem.isEnabled = true
|
|
||||||
actionBarButtonItem.isEnabled = true
|
actionBarButtonItem.isEnabled = true
|
||||||
|
|
||||||
let readImage = article.status.read ? AppAssets.circleOpenImage : AppAssets.circleClosedImage
|
let readImage = article.status.read ? AppAssets.circleOpenImage : AppAssets.circleClosedImage
|
||||||
|
|
|
@ -69,15 +69,6 @@
|
||||||
</connections>
|
</connections>
|
||||||
</barButtonItem>
|
</barButtonItem>
|
||||||
<barButtonItem style="plain" systemItem="flexibleSpace" id="KUq-GZ-WY9"/>
|
<barButtonItem style="plain" systemItem="flexibleSpace" id="KUq-GZ-WY9"/>
|
||||||
<barButtonItem title="Safari" image="safari" catalog="system" id="DMh-3X-ebd">
|
|
||||||
<userDefinedRuntimeAttributes>
|
|
||||||
<userDefinedRuntimeAttribute type="boolean" keyPath="accEnabled" value="YES"/>
|
|
||||||
<userDefinedRuntimeAttribute type="string" keyPath="accLabelText" value="Safari"/>
|
|
||||||
</userDefinedRuntimeAttributes>
|
|
||||||
<connections>
|
|
||||||
<action selector="openBrowser:" destination="JEX-9P-axG" id="R0r-fI-NI7"/>
|
|
||||||
</connections>
|
|
||||||
</barButtonItem>
|
|
||||||
</toolbarItems>
|
</toolbarItems>
|
||||||
<navigationItem key="navigationItem" largeTitleDisplayMode="never" id="mOI-FS-AaM">
|
<navigationItem key="navigationItem" largeTitleDisplayMode="never" id="mOI-FS-AaM">
|
||||||
<rightBarButtonItems>
|
<rightBarButtonItems>
|
||||||
|
@ -105,7 +96,6 @@
|
||||||
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
|
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="actionBarButtonItem" destination="9Ut-5B-JKP" id="9bO-kz-cTz"/>
|
<outlet property="actionBarButtonItem" destination="9Ut-5B-JKP" id="9bO-kz-cTz"/>
|
||||||
<outlet property="browserBarButtonItem" destination="DMh-3X-ebd" id="PkT-Tn-8kG"/>
|
|
||||||
<outlet property="nextArticleBarButtonItem" destination="2qz-M5-Yhk" id="IQd-jx-qEr"/>
|
<outlet property="nextArticleBarButtonItem" destination="2qz-M5-Yhk" id="IQd-jx-qEr"/>
|
||||||
<outlet property="nextUnreadBarButtonItem" destination="2w5-e9-C2V" id="xJr-5y-p1N"/>
|
<outlet property="nextUnreadBarButtonItem" destination="2w5-e9-C2V" id="xJr-5y-p1N"/>
|
||||||
<outlet property="prevArticleBarButtonItem" destination="v4j-fq-23N" id="Gny-Oh-cQa"/>
|
<outlet property="prevArticleBarButtonItem" destination="v4j-fq-23N" id="Gny-Oh-cQa"/>
|
||||||
|
@ -278,7 +268,6 @@
|
||||||
<image name="circle" catalog="system" width="64" height="60"/>
|
<image name="circle" catalog="system" width="64" height="60"/>
|
||||||
<image name="gear" catalog="system" width="64" height="58"/>
|
<image name="gear" catalog="system" width="64" height="58"/>
|
||||||
<image name="multiply.circle.fill" catalog="system" width="64" height="60"/>
|
<image name="multiply.circle.fill" catalog="system" width="64" height="60"/>
|
||||||
<image name="safari" catalog="system" width="64" height="60"/>
|
|
||||||
<image name="square.and.arrow.up" catalog="system" width="56" height="64"/>
|
<image name="square.and.arrow.up" catalog="system" width="56" height="64"/>
|
||||||
<image name="square.and.arrow.up.fill" catalog="system" width="56" height="64"/>
|
<image name="square.and.arrow.up.fill" catalog="system" width="56" height="64"/>
|
||||||
<image name="star" catalog="system" width="64" height="58"/>
|
<image name="star" catalog="system" width="64" height="58"/>
|
||||||
|
|
Loading…
Reference in New Issue