mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-05 21:33:34 +01:00
Continuing migrating to AppImage.
This commit is contained in:
parent
d99e683389
commit
6ed742c5a7
@ -83,9 +83,9 @@ struct AppAssets {
|
||||
// return RSImage(named: "MicroblogIcon")!
|
||||
// }()
|
||||
|
||||
static var faviconTemplateImage: RSImage = {
|
||||
return RSImage(named: "faviconTemplateImage")!
|
||||
}()
|
||||
// static var faviconTemplateImage: RSImage = {
|
||||
// return RSImage(named: "faviconTemplateImage")!
|
||||
// }()
|
||||
|
||||
static var filterActive: RSImage = {
|
||||
return NSImage(systemSymbolName: "line.horizontal.3.decrease.circle.fill", accessibilityDescription: nil)!
|
||||
@ -186,13 +186,13 @@ struct AppAssets {
|
||||
return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true, isBackgroundSuppressed: true)
|
||||
}()
|
||||
|
||||
static var shareImage: RSImage = {
|
||||
return NSImage(systemSymbolName: "square.and.arrow.up", accessibilityDescription: nil)!
|
||||
}()
|
||||
// static var shareImage: RSImage = {
|
||||
// return NSImage(systemSymbolName: "square.and.arrow.up", accessibilityDescription: nil)!
|
||||
// }()
|
||||
|
||||
static var sidebarToggleImage: RSImage = {
|
||||
return NSImage(systemSymbolName: "sidebar.left", accessibilityDescription: nil)!
|
||||
}()
|
||||
// static var sidebarToggleImage: RSImage = {
|
||||
// return NSImage(systemSymbolName: "sidebar.left", accessibilityDescription: nil)!
|
||||
// }()
|
||||
|
||||
static var starClosedImage: RSImage = {
|
||||
return NSImage(systemSymbolName: "star.fill", accessibilityDescription: nil)!
|
||||
|
@ -800,7 +800,7 @@ extension MainWindowController: NSToolbarDelegate {
|
||||
|
||||
case .share:
|
||||
let title = NSLocalizedString("Share", comment: "Share")
|
||||
return buildToolbarButton(.share, title, AppAssets.shareImage, "toolbarShowShareMenu:")
|
||||
return buildToolbarButton(.share, title, AppImage.share, "toolbarShowShareMenu:")
|
||||
|
||||
case .openInBrowser:
|
||||
let title = NSLocalizedString("Open in Browser", comment: "Open in Browser")
|
||||
|
@ -41,56 +41,58 @@ struct AppImage {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Article Extractor
|
||||
|
||||
static var articleExtractorError = RSImage(named: "articleExtractorError")!
|
||||
static var articleExtractorOff = RSImage(named: "articleExtractorOff")!
|
||||
static var articleExtractorOn = RSImage(named: "articleExtractorOn")!
|
||||
|
||||
#if os(iOS)
|
||||
static var articleExtractorOffSF = UIImage(systemName: "doc.plaintext")!
|
||||
static var articleExtractorOnSF = UIImage(named: "articleExtractorOnSF")!
|
||||
static var articleExtractorOffTinted = articleExtractorOff.tinted(color: AppAssets.primaryAccentColor)!
|
||||
static var articleExtractorOnTinted = articleExtractorOn.tinted(color: AppAssets.primaryAccentColor)!
|
||||
#endif
|
||||
|
||||
// MARK: - Action Images
|
||||
|
||||
static var markAllAsRead = RSImage(named: "markAllAsRead")!
|
||||
|
||||
// MARK: - Misc.
|
||||
|
||||
static var articleExtractorError = appImage("articleExtractorError")
|
||||
static var articleExtractorOff = appImage("articleExtractorOff")
|
||||
static var articleExtractorOn = appImage("articleExtractorOn")
|
||||
static var faviconTemplate = appImage("faviconTemplateImage")
|
||||
static var markAllAsRead = appImage("markAllAsRead")
|
||||
static let nnwFeedIcon = RSImage(named: "nnwFeedIcon")!
|
||||
static var share = systemImage("square.and.arrow.up")
|
||||
}
|
||||
|
||||
// MARK: - Mac-only images
|
||||
// MARK: - Mac
|
||||
|
||||
extension AppImage {
|
||||
|
||||
#if os(macOS)
|
||||
static var articleTheme = NSImage(systemSymbolName: "doc.richtext", accessibilityDescription: nil)!
|
||||
static var cleanUp = NSImage(systemSymbolName: "wind", accessibilityDescription: nil)!
|
||||
static var marsEditIcon = RSImage(named: "MarsEditIcon")!
|
||||
static var microblogIcon = RSImage(named: "MicroblogIcon")!
|
||||
static var articleTheme = systemImage("doc.richtext")
|
||||
static var cleanUp = systemImage("wind")
|
||||
static var marsEditIcon = appImage("MarsEditIcon")
|
||||
static var microblogIcon = appImage("MicroblogIcon")
|
||||
#endif
|
||||
}
|
||||
|
||||
// MARK: - iOS-only images
|
||||
// MARK: - iOS
|
||||
|
||||
extension AppImage {
|
||||
|
||||
#if os(iOS)
|
||||
static var markBelowAsRead = UIImage(systemName: "arrowtriangle.down.circle")!
|
||||
static var markAboveAsRead = UIImage(systemName: "arrowtriangle.up.circle")!
|
||||
static var more = UIImage(systemName: "ellipsis.circle")!
|
||||
static var previousArticle = UIImage(systemName: "chevron.up")!
|
||||
static var nextArticle = UIImage(systemName: "chevron.down")!
|
||||
static var nextUnreadArticle = UIImage(systemName: "chevron.down.circle")!
|
||||
static var openInSidebar = UIImage(systemName: "arrow.turn.down.left")!
|
||||
static var safari = UIImage(systemName: "safari")!
|
||||
static var deactivate = UIImage(systemName: "minus.circle")!
|
||||
static var copy = UIImage(systemName: "doc.on.doc")!
|
||||
static var disclosure = UIImage(named: "disclosure")!
|
||||
static var articleExtractorOffSF = systemImage("doc.plaintext")
|
||||
static var articleExtractorOnSF = appImage("articleExtractorOnSF")
|
||||
static var articleExtractorOffTinted = articleExtractorOff.tinted(color: AppAssets.primaryAccentColor)!
|
||||
static var articleExtractorOnTinted = articleExtractorOn.tinted(color: AppAssets.primaryAccentColor)!
|
||||
static var circleClosed = systemImage("largecircle.fill.circle")
|
||||
static var circleOpen = systemImage("circle")
|
||||
static var copy = systemImage("doc.on.doc")
|
||||
static var deactivate = systemImage("minus.circle")
|
||||
static var disclosure = appImage("disclosure")
|
||||
static var edit = systemImage("square.and.pencil")
|
||||
static var filterActive = systemImage("line.horizontal.3.decrease.circle.fill")
|
||||
static var filterInactive = systemImage("line.horizontal.3.decrease.circle")
|
||||
static var folderOutlinePlus = systemImage("folder.badge.plus")
|
||||
static var info = systemImage("info.circle")
|
||||
static var markBelowAsRead = systemImage("arrowtriangle.down.circle")
|
||||
static var markAboveAsRead = systemImage("arrowtriangle.up.circle")
|
||||
static var more = systemImage("ellipsis.circle")
|
||||
static var nextArticle = systemImage("chevron.down")
|
||||
static var nextUnreadArticle = systemImage("chevron.down.circle")
|
||||
static var openInSidebar = systemImage("arrow.turn.down.left")
|
||||
static var plus = systemImage("plus")
|
||||
static var previousArticle = systemImage("chevron.up")
|
||||
static var safari = systemImage("safari")
|
||||
static var timelineStar = systemImage("star.fill").withTintColor(AppAssets.starColor, renderingMode: .alwaysOriginal)
|
||||
static var trash = systemImage("trash")
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -100,20 +102,32 @@ private extension AppImage {
|
||||
|
||||
// MARK: - Account Images
|
||||
|
||||
static var accountBazQux = RSImage(named: "accountBazQux")!
|
||||
static var accountCloudKit = RSImage(named: "accountCloudKit")!
|
||||
static var accountFeedbin = RSImage(named: "accountFeedbin")!
|
||||
static var accountFeedly = RSImage(named: "accountFeedly")!
|
||||
static var accountFreshRSS = RSImage(named: "accountFreshRSS")!
|
||||
static var accountInoreader = RSImage(named: "accountInoreader")!
|
||||
static var accountNewsBlur = RSImage(named: "accountNewsBlur")!
|
||||
static var accountTheOldReader = RSImage(named: "accountTheOldReader")!
|
||||
static var accountBazQux = appImage("accountBazQux")
|
||||
static var accountCloudKit = appImage("accountCloudKit")
|
||||
static var accountFeedbin = appImage("accountFeedbin")
|
||||
static var accountFeedly = appImage("accountFeedly")
|
||||
static var accountFreshRSS = appImage("accountFreshRSS")
|
||||
static var accountInoreader = appImage("accountInoreader")
|
||||
static var accountNewsBlur = appImage("accountNewsBlur")
|
||||
static var accountTheOldReader = appImage("accountTheOldReader")
|
||||
|
||||
#if os(macOS)
|
||||
static var accountLocal = RSImage(named: "accountLocal")!
|
||||
static var accountLocal = appImage("accountLocal")
|
||||
#elseif os(iOS)
|
||||
static var accountLocalPad = UIImage(named: "accountLocalPad")!
|
||||
static var accountLocalPhone = UIImage(named: "accountLocalPhone")!
|
||||
static var accountLocalPad = appImage("accountLocalPad")
|
||||
static var accountLocalPhone = appImage("accountLocalPhone")
|
||||
static var accountLocal = UIDevice.current.userInterfaceIdiom == .pad ? accountLocalPad : accountLocalPhone
|
||||
#endif
|
||||
|
||||
static func appImage(_ name: String) -> RSImage {
|
||||
RSImage(named: name)!
|
||||
}
|
||||
|
||||
static func systemImage(_ name: String) -> RSImage {
|
||||
#if os(macOS)
|
||||
RSImage(systemSymbolName: name, accessibilityDescription: nil)!
|
||||
#elseif os(iOS)
|
||||
UIImage(systemName: name)!
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -21,12 +21,12 @@ final class FaviconGenerator {
|
||||
}
|
||||
|
||||
let colorHash = ColorHash(feed.url)
|
||||
if let favicon = AppAssets.faviconTemplateImage.maskWithColor(color: colorHash.color.cgColor) {
|
||||
if let favicon = AppImage.faviconTemplate.maskWithColor(color: colorHash.color.cgColor) {
|
||||
let iconImage = IconImage(favicon, isBackgroundSuppressed: true)
|
||||
FaviconGenerator.faviconGeneratorCache[feed.url] = iconImage
|
||||
return iconImage
|
||||
} else {
|
||||
return IconImage(AppAssets.faviconTemplateImage, isBackgroundSuppressed: true)
|
||||
return IconImage(AppImage.faviconTemplate, isBackgroundSuppressed: true)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -87,13 +87,13 @@ struct AppAssets {
|
||||
return UIColor(named: "iconBackgroundColor")!
|
||||
}()
|
||||
|
||||
static var circleClosedImage: UIImage = {
|
||||
return UIImage(systemName: "largecircle.fill.circle")!
|
||||
}()
|
||||
// static var circleClosedImage: UIImage = {
|
||||
// return UIImage(systemName: "largecircle.fill.circle")!
|
||||
// }()
|
||||
|
||||
static var circleOpenImage: UIImage = {
|
||||
return UIImage(systemName: "circle")!
|
||||
}()
|
||||
// static var circleOpenImage: UIImage = {
|
||||
// return UIImage(systemName: "circle")!
|
||||
// }()
|
||||
|
||||
// static var disclosureImage: UIImage = {
|
||||
// return UIImage(named: "disclosure")!
|
||||
@ -107,33 +107,33 @@ struct AppAssets {
|
||||
// UIImage(systemName: "minus.circle")!
|
||||
// }()
|
||||
|
||||
static var editImage: UIImage = {
|
||||
UIImage(systemName: "square.and.pencil")!
|
||||
}()
|
||||
// static var editImage: UIImage = {
|
||||
// UIImage(systemName: "square.and.pencil")!
|
||||
// }()
|
||||
|
||||
static var faviconTemplateImage: RSImage = {
|
||||
return RSImage(named: "faviconTemplateImage")!
|
||||
}()
|
||||
// static var faviconTemplateImage: RSImage = {
|
||||
// return RSImage(named: "faviconTemplateImage")!
|
||||
// }()
|
||||
|
||||
static var filterInactiveImage: UIImage = {
|
||||
UIImage(systemName: "line.horizontal.3.decrease.circle")!
|
||||
}()
|
||||
// static var filterInactiveImage: UIImage = {
|
||||
// UIImage(systemName: "line.horizontal.3.decrease.circle")!
|
||||
// }()
|
||||
|
||||
static var filterActiveImage: UIImage = {
|
||||
UIImage(systemName: "line.horizontal.3.decrease.circle.fill")!
|
||||
}()
|
||||
// static var filterActiveImage: UIImage = {
|
||||
// UIImage(systemName: "line.horizontal.3.decrease.circle.fill")!
|
||||
// }()
|
||||
|
||||
static var folderOutlinePlus: UIImage = {
|
||||
UIImage(systemName: "folder.badge.plus")!
|
||||
}()
|
||||
// static var folderOutlinePlus: UIImage = {
|
||||
// UIImage(systemName: "folder.badge.plus")!
|
||||
// }()
|
||||
|
||||
static var fullScreenBackgroundColor: UIColor = {
|
||||
return UIColor(named: "fullScreenBackgroundColor")!
|
||||
}()
|
||||
|
||||
static var infoImage: UIImage = {
|
||||
UIImage(systemName: "info.circle")!
|
||||
}()
|
||||
// static var infoImage: UIImage = {
|
||||
// UIImage(systemName: "info.circle")!
|
||||
// }()
|
||||
|
||||
// static var markAllAsReadImage: UIImage = {
|
||||
// return UIImage(named: "markAllAsRead")!
|
||||
@ -163,9 +163,9 @@ struct AppAssets {
|
||||
// return UIImage(systemName: "chevron.down.circle")!
|
||||
// }()
|
||||
|
||||
static var plus: UIImage = {
|
||||
UIImage(systemName: "plus")!
|
||||
}()
|
||||
// static var plus: UIImage = {
|
||||
// UIImage(systemName: "plus")!
|
||||
// }()
|
||||
|
||||
// static var prevArticleImage: UIImage = {
|
||||
// return UIImage(systemName: "chevron.up")!
|
||||
@ -195,13 +195,13 @@ struct AppAssets {
|
||||
return UIColor(named: "sectionHeaderColor")!
|
||||
}()
|
||||
|
||||
static var shareImage: UIImage = {
|
||||
return UIImage(systemName: "square.and.arrow.up")!
|
||||
}()
|
||||
// static var shareImage: UIImage = {
|
||||
// return UIImage(systemName: "square.and.arrow.up")!
|
||||
// }()
|
||||
|
||||
static var smartFeedImage: UIImage = {
|
||||
return UIImage(systemName: "gear")!
|
||||
}()
|
||||
// static var smartFeedImage: UIImage = {
|
||||
// return UIImage(systemName: "gear")!
|
||||
// }()
|
||||
|
||||
static var starColor: UIColor = {
|
||||
return UIColor(named: "starColor")!
|
||||
@ -224,19 +224,19 @@ struct AppAssets {
|
||||
return UIColor(named: "tickMarkColor")!
|
||||
}()
|
||||
|
||||
static var timelineStarImage: UIImage = {
|
||||
let image = UIImage(systemName: "star.fill")!
|
||||
return image.withTintColor(AppAssets.starColor, renderingMode: .alwaysOriginal)
|
||||
}()
|
||||
// static var timelineStarImage: UIImage = {
|
||||
// let image = UIImage(systemName: "star.fill")!
|
||||
// return image.withTintColor(AppAssets.starColor, renderingMode: .alwaysOriginal)
|
||||
// }()
|
||||
|
||||
static var todayFeedImage: IconImage {
|
||||
let image = UIImage(systemName: "sun.max.fill")!
|
||||
return IconImage(image, isSymbol: true, isBackgroundSuppressed: true, preferredColor: UIColor.systemOrange.cgColor)
|
||||
}
|
||||
|
||||
static var trashImage: UIImage = {
|
||||
return UIImage(systemName: "trash")!
|
||||
}()
|
||||
// static var trashImage: UIImage = {
|
||||
// return UIImage(systemName: "trash")!
|
||||
// }()
|
||||
|
||||
static var unreadFeedImage: IconImage {
|
||||
let image = UIImage(systemName: "largecircle.fill.circle")!
|
||||
|
@ -223,11 +223,11 @@ final class ArticleViewController: UIViewController {
|
||||
actionBarButtonItem.isEnabled = permalinkPresent
|
||||
|
||||
if article.status.read {
|
||||
readBarButtonItem.image = AppAssets.circleOpenImage
|
||||
readBarButtonItem.image = AppImage.circleOpen
|
||||
readBarButtonItem.isEnabled = article.isAvailableToMarkUnread
|
||||
readBarButtonItem.accLabelText = NSLocalizedString("Mark Article Unread", comment: "Mark Article Unread")
|
||||
} else {
|
||||
readBarButtonItem.image = AppAssets.circleClosedImage
|
||||
readBarButtonItem.image = AppImage.circleClosed
|
||||
readBarButtonItem.isEnabled = true
|
||||
readBarButtonItem.accLabelText = NSLocalizedString("Selected - Mark Article Unread", comment: "Selected - Mark Article Unread")
|
||||
}
|
||||
|
@ -742,7 +742,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 ? AppImage.circleClosed : AppImage.circleOpen
|
||||
return UIAction(title: title, image: readImage) { [weak self] _ in
|
||||
self?.coordinator.toggleReadForCurrentArticle()
|
||||
}
|
||||
@ -776,7 +776,7 @@ private extension WebViewController {
|
||||
|
||||
func shareAction() -> UIAction {
|
||||
let title = NSLocalizedString("Share", comment: "Share")
|
||||
return UIAction(title: title, image: AppAssets.shareImage) { [weak self] _ in
|
||||
return UIAction(title: title, image: AppImage.share) { [weak self] _ in
|
||||
self?.showActivityDialog()
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ final class IconView: UIView {
|
||||
private var isDiscernable = true
|
||||
|
||||
private let imageView: UIImageView = {
|
||||
let imageView = NonIntrinsicImageView(image: AppAssets.faviconTemplateImage)
|
||||
let imageView = NonIntrinsicImageView(image: AppImage.faviconTemplate)
|
||||
imageView.contentMode = .scaleAspectFit
|
||||
imageView.clipsToBounds = true
|
||||
imageView.layer.cornerRadius = 2.0
|
||||
|
@ -644,13 +644,13 @@ final class MainFeedViewController: UITableViewController, UndoableCommandRunner
|
||||
var menuItems: [UIAction] = []
|
||||
|
||||
let addFeedActionTitle = NSLocalizedString("Add Feed", comment: "Add Feed")
|
||||
let addFeedAction = UIAction(title: addFeedActionTitle, image: AppAssets.plus) { _ in
|
||||
let addFeedAction = UIAction(title: addFeedActionTitle, image: AppImage.plus) { _ in
|
||||
self.coordinator.showAddFeed()
|
||||
}
|
||||
menuItems.append(addFeedAction)
|
||||
|
||||
let addWebFolderActionTitle = NSLocalizedString("Add Folder", comment: "Add Folder")
|
||||
let addWebFolderAction = UIAction(title: addWebFolderActionTitle, image: AppAssets.folderOutlinePlus) { _ in
|
||||
let addWebFolderAction = UIAction(title: addWebFolderActionTitle, image: AppImage.folderOutlinePlus) { _ in
|
||||
self.coordinator.showAddFolder()
|
||||
}
|
||||
|
||||
@ -751,12 +751,12 @@ private extension MainFeedViewController {
|
||||
}
|
||||
|
||||
func setFilterButtonToActive() {
|
||||
filterButton?.image = AppAssets.filterActiveImage
|
||||
filterButton?.image = AppImage.filterActive
|
||||
filterButton?.accLabelText = NSLocalizedString("Selected - Filter Read Feeds", comment: "Selected - Filter Read Feeds")
|
||||
}
|
||||
|
||||
func setFilterButtonToInactive() {
|
||||
filterButton?.image = AppAssets.filterInactiveImage
|
||||
filterButton?.image = AppImage.filterInactive
|
||||
filterButton?.accLabelText = NSLocalizedString("Filter Read Feeds", comment: "Filter Read Feeds")
|
||||
}
|
||||
|
||||
@ -1081,7 +1081,7 @@ private extension MainFeedViewController {
|
||||
func deleteAction(indexPath: IndexPath) -> UIAction {
|
||||
let title = NSLocalizedString("Delete", comment: "Delete")
|
||||
|
||||
let action = UIAction(title: title, image: AppAssets.trashImage, attributes: .destructive) { [weak self] _ in
|
||||
let action = UIAction(title: title, image: AppImage.trash, attributes: .destructive) { [weak self] _ in
|
||||
self?.delete(indexPath: indexPath)
|
||||
}
|
||||
return action
|
||||
@ -1089,7 +1089,7 @@ private extension MainFeedViewController {
|
||||
|
||||
func renameAction(indexPath: IndexPath) -> UIAction {
|
||||
let title = NSLocalizedString("Rename", comment: "Rename")
|
||||
let action = UIAction(title: title, image: AppAssets.editImage) { [weak self] _ in
|
||||
let action = UIAction(title: title, image: AppImage.edit) { [weak self] _ in
|
||||
self?.rename(indexPath: indexPath)
|
||||
}
|
||||
return action
|
||||
@ -1101,7 +1101,7 @@ private extension MainFeedViewController {
|
||||
}
|
||||
|
||||
let title = NSLocalizedString("Get Info", comment: "Get Info")
|
||||
let action = UIAction(title: title, image: AppAssets.infoImage) { [weak self] _ in
|
||||
let action = UIAction(title: title, image: AppImage.info) { [weak self] _ in
|
||||
self?.coordinator.showFeedInspector(for: feed)
|
||||
}
|
||||
return action
|
||||
@ -1109,7 +1109,7 @@ private extension MainFeedViewController {
|
||||
|
||||
func getAccountInfoAction(account: Account) -> UIAction {
|
||||
let title = NSLocalizedString("Get Info", comment: "Get Info")
|
||||
let action = UIAction(title: title, image: AppAssets.infoImage) { [weak self] _ in
|
||||
let action = UIAction(title: title, image: AppImage.info) { [weak self] _ in
|
||||
self?.coordinator.showAccountInspector(for: account)
|
||||
}
|
||||
return action
|
||||
|
@ -20,7 +20,7 @@ final class MainTimelineTableViewCell: VibrantTableViewCell {
|
||||
private lazy var iconView = IconView()
|
||||
|
||||
private lazy var starView = {
|
||||
return NonIntrinsicImageView(image: AppAssets.timelineStarImage)
|
||||
return NonIntrinsicImageView(image: AppImage.timelineStar)
|
||||
}()
|
||||
|
||||
private var unreadIndicatorPropertyAnimator: UIViewPropertyAnimator?
|
||||
|
@ -70,7 +70,7 @@ final class TimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground(_:)), name: UIApplication.willEnterForegroundNotification, object: nil)
|
||||
|
||||
// Initialize Programmatic Buttons
|
||||
filterButton = UIBarButtonItem(image: AppAssets.filterInactiveImage, style: .plain, target: self, action: #selector(toggleFilter(_:)))
|
||||
filterButton = UIBarButtonItem(image: AppImage.filterInactive, style: .plain, target: self, action: #selector(toggleFilter(_:)))
|
||||
firstUnreadButton = UIBarButtonItem(image: AppImage.nextUnreadArticle, style: .plain, target: self, action: #selector(firstUnread(_:)))
|
||||
|
||||
// Setup the Search Controller
|
||||
@ -282,7 +282,7 @@ final class TimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
completion(true)
|
||||
}
|
||||
|
||||
readAction.image = article.status.read ? AppAssets.circleClosedImage : AppAssets.circleOpenImage
|
||||
readAction.image = article.status.read ? AppImage.circleClosed : AppImage.circleOpen
|
||||
readAction.backgroundColor = AppAssets.primaryAccentColor
|
||||
|
||||
return UISwipeActionsConfiguration(actions: [readAction])
|
||||
@ -687,10 +687,10 @@ private extension TimelineViewController {
|
||||
}
|
||||
|
||||
if coordinator.isReadArticlesFiltered {
|
||||
filterButton?.image = AppAssets.filterActiveImage
|
||||
filterButton?.image = AppImage.filterActive
|
||||
filterButton?.accLabelText = NSLocalizedString("Selected - Filter Read Articles", comment: "Selected - Filter Read Articles")
|
||||
} else {
|
||||
filterButton?.image = AppAssets.filterInactiveImage
|
||||
filterButton?.image = AppImage.filterInactive
|
||||
filterButton?.accLabelText = NSLocalizedString("Filter Read Articles", comment: "Filter Read Articles")
|
||||
}
|
||||
|
||||
@ -791,7 +791,7 @@ private extension TimelineViewController {
|
||||
let title = article.status.read ?
|
||||
NSLocalizedString("Mark as Unread", comment: "Mark as Unread") :
|
||||
NSLocalizedString("Mark as Read", comment: "Mark as Read")
|
||||
let image = article.status.read ? AppAssets.circleClosedImage : AppAssets.circleOpenImage
|
||||
let image = article.status.read ? AppImage.circleClosed : AppImage.circleOpen
|
||||
|
||||
let action = UIAction(title: title, image: image) { [weak self] _ in
|
||||
self?.coordinator.toggleRead(article)
|
||||
@ -1005,7 +1005,7 @@ private extension TimelineViewController {
|
||||
func shareAction(_ article: Article, indexPath: IndexPath) -> UIAction? {
|
||||
guard let url = article.preferredURL else { return nil }
|
||||
let title = NSLocalizedString("Share", comment: "Share")
|
||||
let action = UIAction(title: title, image: AppAssets.shareImage) { [weak self] _ in
|
||||
let action = UIAction(title: title, image: AppImage.share) { [weak self] _ in
|
||||
self?.shareDialogForTableCell(indexPath: indexPath, url: url, title: article.title)
|
||||
}
|
||||
return action
|
||||
|
@ -104,7 +104,7 @@ final class ArticleThemesTableViewController: UITableViewController {
|
||||
self?.present(alertController, animated: true)
|
||||
}
|
||||
|
||||
deleteAction.image = AppAssets.trashImage
|
||||
deleteAction.image = AppImage.trash
|
||||
deleteAction.backgroundColor = UIColor.systemRed
|
||||
|
||||
return UISwipeActionsConfiguration(actions: [deleteAction])
|
||||
|
@ -84,7 +84,7 @@ private extension TimelinePreviewTableViewController {
|
||||
status: status
|
||||
)
|
||||
|
||||
let iconImage = IconImage(AppAssets.faviconTemplateImage.withTintColor(AppAssets.secondaryAccentColor))
|
||||
let iconImage = IconImage(AppImage.faviconTemplate.withTintColor(AppAssets.secondaryAccentColor))
|
||||
|
||||
return MainTimelineCellData(
|
||||
article: prototypeArticle,
|
||||
|
Loading…
x
Reference in New Issue
Block a user