mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Finish converting iOS from AppAssets to AppAsset.
This commit is contained in:
@@ -72,8 +72,8 @@ enum ArticleExtractorButtonState {
|
||||
}
|
||||
|
||||
private func addAnimatedSublayer(to hostedLayer: CALayer) {
|
||||
let image1 = AppAssets.articleExtractorOffTinted.cgImage!
|
||||
let image2 = AppAssets.articleExtractorOnTinted.cgImage!
|
||||
let image1 = AppAsset.articleExtractorOffTinted.cgImage!
|
||||
let image2 = AppAsset.articleExtractorOnTinted.cgImage!
|
||||
let images = [image1, image2, image1]
|
||||
|
||||
animatedLayer = CALayer()
|
||||
|
||||
@@ -212,20 +212,20 @@ final class ArticleViewController: UIViewController {
|
||||
actionBarButtonItem.isEnabled = permalinkPresent
|
||||
|
||||
if article.status.read {
|
||||
readBarButtonItem.image = AppAssets.circleOpenImage
|
||||
readBarButtonItem.image = AppAsset.circleOpenImage
|
||||
readBarButtonItem.isEnabled = article.isAvailableToMarkUnread
|
||||
readBarButtonItem.accLabelText = NSLocalizedString("Mark Article Unread", comment: "Mark Article Unread")
|
||||
} else {
|
||||
readBarButtonItem.image = AppAssets.circleClosedImage
|
||||
readBarButtonItem.image = AppAsset.circleClosedImage
|
||||
readBarButtonItem.isEnabled = true
|
||||
readBarButtonItem.accLabelText = NSLocalizedString("Selected - Mark Article Unread", comment: "Selected - Mark Article Unread")
|
||||
}
|
||||
|
||||
if article.status.starred {
|
||||
starBarButtonItem.image = AppAssets.starClosedImage
|
||||
starBarButtonItem.image = AppAsset.starClosedImage
|
||||
starBarButtonItem.accLabelText = NSLocalizedString("Selected - Star Article", comment: "Selected - Star Article")
|
||||
} else {
|
||||
starBarButtonItem.image = AppAssets.starOpenImage
|
||||
starBarButtonItem.image = AppAsset.starOpenImage
|
||||
starBarButtonItem.accLabelText = NSLocalizedString("Star Article", comment: "Star Article")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ class ImageTransition: NSObject, UIViewControllerAnimatedTransitioning {
|
||||
let fromView = transitionContext.view(forKey: .from)!
|
||||
fromView.removeFromSuperview()
|
||||
|
||||
transitionContext.containerView.backgroundColor = AppAssets.fullScreenBackgroundColor
|
||||
transitionContext.containerView.backgroundColor = AppAsset.fullScreenBackgroundColor
|
||||
transitionContext.containerView.addSubview(imageView)
|
||||
|
||||
webViewController?.hideClickedImage()
|
||||
|
||||
@@ -817,7 +817,7 @@ private extension WebViewController {
|
||||
func prevArticleAction() -> UIAction? {
|
||||
guard coordinator.isPrevArticleAvailable else { return nil }
|
||||
let title = NSLocalizedString("Previous Article", comment: "Previous Article")
|
||||
return UIAction(title: title, image: AppAssets.prevArticleImage) { [weak self] action in
|
||||
return UIAction(title: title, image: AppAsset.prevArticleImage) { [weak self] action in
|
||||
self?.coordinator.selectPrevArticle()
|
||||
}
|
||||
}
|
||||
@@ -825,7 +825,7 @@ private extension WebViewController {
|
||||
func nextArticleAction() -> UIAction? {
|
||||
guard coordinator.isNextArticleAvailable else { return nil }
|
||||
let title = NSLocalizedString("Next Article", comment: "Next Article")
|
||||
return UIAction(title: title, image: AppAssets.nextArticleImage) { [weak self] action in
|
||||
return UIAction(title: title, image: AppAsset.nextArticleImage) { [weak self] action in
|
||||
self?.coordinator.selectNextArticle()
|
||||
}
|
||||
}
|
||||
@@ -834,7 +834,7 @@ private extension WebViewController {
|
||||
guard let article = article, !article.status.read || article.isAvailableToMarkUnread else { return nil }
|
||||
|
||||
let title = article.status.read ? NSLocalizedString("Mark as Unread", comment: "Mark as Unread") : NSLocalizedString("Mark as Read", comment: "Mark as Read")
|
||||
let readImage = article.status.read ? AppAssets.circleClosedImage : AppAssets.circleOpenImage
|
||||
let readImage = article.status.read ? AppAsset.circleClosedImage : AppAsset.circleOpenImage
|
||||
return UIAction(title: title, image: readImage) { [weak self] action in
|
||||
self?.coordinator.toggleReadForCurrentArticle()
|
||||
}
|
||||
@@ -843,7 +843,7 @@ private extension WebViewController {
|
||||
func toggleStarredAction() -> UIAction {
|
||||
let starred = article?.status.starred ?? false
|
||||
let title = starred ? NSLocalizedString("Mark as Unstarred", comment: "Mark as Unstarred") : NSLocalizedString("Mark as Starred", comment: "Mark as Starred")
|
||||
let starredImage = starred ? AppAssets.starOpenImage : AppAssets.starClosedImage
|
||||
let starredImage = starred ? AppAsset.starOpenImage : AppAsset.starClosedImage
|
||||
return UIAction(title: title, image: starredImage) { [weak self] action in
|
||||
self?.coordinator.toggleStarredForCurrentArticle()
|
||||
}
|
||||
@@ -852,7 +852,7 @@ private extension WebViewController {
|
||||
func nextUnreadArticleAction() -> UIAction? {
|
||||
guard coordinator.isAnyUnreadAvailable else { return nil }
|
||||
let title = NSLocalizedString("Next Unread Article", comment: "Next Unread Article")
|
||||
return UIAction(title: title, image: AppAssets.nextUnreadArticleImage) { [weak self] action in
|
||||
return UIAction(title: title, image: AppAsset.nextUnreadArticleImage) { [weak self] action in
|
||||
self?.coordinator.selectNextUnread()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user