Continuing migrating to AppImage.

This commit is contained in:
Brent Simmons 2025-01-27 22:21:01 -08:00
parent d99e683389
commit 6ed742c5a7
13 changed files with 135 additions and 121 deletions

View File

@ -83,9 +83,9 @@ struct AppAssets {
// return RSImage(named: "MicroblogIcon")! // return RSImage(named: "MicroblogIcon")!
// }() // }()
static var faviconTemplateImage: RSImage = { // static var faviconTemplateImage: RSImage = {
return RSImage(named: "faviconTemplateImage")! // return RSImage(named: "faviconTemplateImage")!
}() // }()
static var filterActive: RSImage = { static var filterActive: RSImage = {
return NSImage(systemSymbolName: "line.horizontal.3.decrease.circle.fill", accessibilityDescription: nil)! 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) return IconImage(RSImage(named: NSImage.smartBadgeTemplateName)!, isSymbol: true, isBackgroundSuppressed: true)
}() }()
static var shareImage: RSImage = { // static var shareImage: RSImage = {
return NSImage(systemSymbolName: "square.and.arrow.up", accessibilityDescription: nil)! // return NSImage(systemSymbolName: "square.and.arrow.up", accessibilityDescription: nil)!
}() // }()
static var sidebarToggleImage: RSImage = { // static var sidebarToggleImage: RSImage = {
return NSImage(systemSymbolName: "sidebar.left", accessibilityDescription: nil)! // return NSImage(systemSymbolName: "sidebar.left", accessibilityDescription: nil)!
}() // }()
static var starClosedImage: RSImage = { static var starClosedImage: RSImage = {
return NSImage(systemSymbolName: "star.fill", accessibilityDescription: nil)! return NSImage(systemSymbolName: "star.fill", accessibilityDescription: nil)!

View File

@ -800,7 +800,7 @@ extension MainWindowController: NSToolbarDelegate {
case .share: case .share:
let title = NSLocalizedString("Share", comment: "Share") let title = NSLocalizedString("Share", comment: "Share")
return buildToolbarButton(.share, title, AppAssets.shareImage, "toolbarShowShareMenu:") return buildToolbarButton(.share, title, AppImage.share, "toolbarShowShareMenu:")
case .openInBrowser: case .openInBrowser:
let title = NSLocalizedString("Open in Browser", comment: "Open in Browser") let title = NSLocalizedString("Open in Browser", comment: "Open in Browser")

View File

@ -41,56 +41,58 @@ struct AppImage {
} }
} }
// MARK: - Article Extractor static var articleExtractorError = appImage("articleExtractorError")
static var articleExtractorOff = appImage("articleExtractorOff")
static var articleExtractorError = RSImage(named: "articleExtractorError")! static var articleExtractorOn = appImage("articleExtractorOn")
static var articleExtractorOff = RSImage(named: "articleExtractorOff")! static var faviconTemplate = appImage("faviconTemplateImage")
static var articleExtractorOn = RSImage(named: "articleExtractorOn")! static var markAllAsRead = appImage("markAllAsRead")
#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 let nnwFeedIcon = RSImage(named: "nnwFeedIcon")! static let nnwFeedIcon = RSImage(named: "nnwFeedIcon")!
static var share = systemImage("square.and.arrow.up")
} }
// MARK: - Mac-only images // MARK: - Mac
extension AppImage { extension AppImage {
#if os(macOS) #if os(macOS)
static var articleTheme = NSImage(systemSymbolName: "doc.richtext", accessibilityDescription: nil)! static var articleTheme = systemImage("doc.richtext")
static var cleanUp = NSImage(systemSymbolName: "wind", accessibilityDescription: nil)! static var cleanUp = systemImage("wind")
static var marsEditIcon = RSImage(named: "MarsEditIcon")! static var marsEditIcon = appImage("MarsEditIcon")
static var microblogIcon = RSImage(named: "MicroblogIcon")! static var microblogIcon = appImage("MicroblogIcon")
#endif #endif
} }
// MARK: - iOS-only images // MARK: - iOS
extension AppImage { extension AppImage {
#if os(iOS) #if os(iOS)
static var markBelowAsRead = UIImage(systemName: "arrowtriangle.down.circle")! static var articleExtractorOffSF = systemImage("doc.plaintext")
static var markAboveAsRead = UIImage(systemName: "arrowtriangle.up.circle")! static var articleExtractorOnSF = appImage("articleExtractorOnSF")
static var more = UIImage(systemName: "ellipsis.circle")! static var articleExtractorOffTinted = articleExtractorOff.tinted(color: AppAssets.primaryAccentColor)!
static var previousArticle = UIImage(systemName: "chevron.up")! static var articleExtractorOnTinted = articleExtractorOn.tinted(color: AppAssets.primaryAccentColor)!
static var nextArticle = UIImage(systemName: "chevron.down")! static var circleClosed = systemImage("largecircle.fill.circle")
static var nextUnreadArticle = UIImage(systemName: "chevron.down.circle")! static var circleOpen = systemImage("circle")
static var openInSidebar = UIImage(systemName: "arrow.turn.down.left")! static var copy = systemImage("doc.on.doc")
static var safari = UIImage(systemName: "safari")! static var deactivate = systemImage("minus.circle")
static var deactivate = UIImage(systemName: "minus.circle")! static var disclosure = appImage("disclosure")
static var copy = UIImage(systemName: "doc.on.doc")! static var edit = systemImage("square.and.pencil")
static var disclosure = UIImage(named: "disclosure")! 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 #endif
} }
@ -100,20 +102,32 @@ private extension AppImage {
// MARK: - Account Images // MARK: - Account Images
static var accountBazQux = RSImage(named: "accountBazQux")! static var accountBazQux = appImage("accountBazQux")
static var accountCloudKit = RSImage(named: "accountCloudKit")! static var accountCloudKit = appImage("accountCloudKit")
static var accountFeedbin = RSImage(named: "accountFeedbin")! static var accountFeedbin = appImage("accountFeedbin")
static var accountFeedly = RSImage(named: "accountFeedly")! static var accountFeedly = appImage("accountFeedly")
static var accountFreshRSS = RSImage(named: "accountFreshRSS")! static var accountFreshRSS = appImage("accountFreshRSS")
static var accountInoreader = RSImage(named: "accountInoreader")! static var accountInoreader = appImage("accountInoreader")
static var accountNewsBlur = RSImage(named: "accountNewsBlur")! static var accountNewsBlur = appImage("accountNewsBlur")
static var accountTheOldReader = RSImage(named: "accountTheOldReader")! static var accountTheOldReader = appImage("accountTheOldReader")
#if os(macOS) #if os(macOS)
static var accountLocal = RSImage(named: "accountLocal")! static var accountLocal = appImage("accountLocal")
#elseif os(iOS) #elseif os(iOS)
static var accountLocalPad = UIImage(named: "accountLocalPad")! static var accountLocalPad = appImage("accountLocalPad")
static var accountLocalPhone = UIImage(named: "accountLocalPhone")! static var accountLocalPhone = appImage("accountLocalPhone")
static var accountLocal = UIDevice.current.userInterfaceIdiom == .pad ? accountLocalPad : accountLocalPhone static var accountLocal = UIDevice.current.userInterfaceIdiom == .pad ? accountLocalPad : accountLocalPhone
#endif #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
}
} }

View File

@ -21,12 +21,12 @@ final class FaviconGenerator {
} }
let colorHash = ColorHash(feed.url) 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) let iconImage = IconImage(favicon, isBackgroundSuppressed: true)
FaviconGenerator.faviconGeneratorCache[feed.url] = iconImage FaviconGenerator.faviconGeneratorCache[feed.url] = iconImage
return iconImage return iconImage
} else { } else {
return IconImage(AppAssets.faviconTemplateImage, isBackgroundSuppressed: true) return IconImage(AppImage.faviconTemplate, isBackgroundSuppressed: true)
} }
} }

View File

@ -87,13 +87,13 @@ struct AppAssets {
return UIColor(named: "iconBackgroundColor")! return UIColor(named: "iconBackgroundColor")!
}() }()
static var circleClosedImage: UIImage = { // static var circleClosedImage: UIImage = {
return UIImage(systemName: "largecircle.fill.circle")! // return UIImage(systemName: "largecircle.fill.circle")!
}() // }()
static var circleOpenImage: UIImage = { // static var circleOpenImage: UIImage = {
return UIImage(systemName: "circle")! // return UIImage(systemName: "circle")!
}() // }()
// static var disclosureImage: UIImage = { // static var disclosureImage: UIImage = {
// return UIImage(named: "disclosure")! // return UIImage(named: "disclosure")!
@ -107,33 +107,33 @@ struct AppAssets {
// UIImage(systemName: "minus.circle")! // UIImage(systemName: "minus.circle")!
// }() // }()
static var editImage: UIImage = { // static var editImage: UIImage = {
UIImage(systemName: "square.and.pencil")! // UIImage(systemName: "square.and.pencil")!
}() // }()
static var faviconTemplateImage: RSImage = { // static var faviconTemplateImage: RSImage = {
return RSImage(named: "faviconTemplateImage")! // return RSImage(named: "faviconTemplateImage")!
}() // }()
static var filterInactiveImage: UIImage = { // static var filterInactiveImage: UIImage = {
UIImage(systemName: "line.horizontal.3.decrease.circle")! // UIImage(systemName: "line.horizontal.3.decrease.circle")!
}() // }()
static var filterActiveImage: UIImage = { // static var filterActiveImage: UIImage = {
UIImage(systemName: "line.horizontal.3.decrease.circle.fill")! // UIImage(systemName: "line.horizontal.3.decrease.circle.fill")!
}() // }()
static var folderOutlinePlus: UIImage = { // static var folderOutlinePlus: UIImage = {
UIImage(systemName: "folder.badge.plus")! // UIImage(systemName: "folder.badge.plus")!
}() // }()
static var fullScreenBackgroundColor: UIColor = { static var fullScreenBackgroundColor: UIColor = {
return UIColor(named: "fullScreenBackgroundColor")! return UIColor(named: "fullScreenBackgroundColor")!
}() }()
static var infoImage: UIImage = { // static var infoImage: UIImage = {
UIImage(systemName: "info.circle")! // UIImage(systemName: "info.circle")!
}() // }()
// static var markAllAsReadImage: UIImage = { // static var markAllAsReadImage: UIImage = {
// return UIImage(named: "markAllAsRead")! // return UIImage(named: "markAllAsRead")!
@ -163,9 +163,9 @@ struct AppAssets {
// return UIImage(systemName: "chevron.down.circle")! // return UIImage(systemName: "chevron.down.circle")!
// }() // }()
static var plus: UIImage = { // static var plus: UIImage = {
UIImage(systemName: "plus")! // UIImage(systemName: "plus")!
}() // }()
// static var prevArticleImage: UIImage = { // static var prevArticleImage: UIImage = {
// return UIImage(systemName: "chevron.up")! // return UIImage(systemName: "chevron.up")!
@ -195,13 +195,13 @@ struct AppAssets {
return UIColor(named: "sectionHeaderColor")! return UIColor(named: "sectionHeaderColor")!
}() }()
static var shareImage: UIImage = { // static var shareImage: UIImage = {
return UIImage(systemName: "square.and.arrow.up")! // return UIImage(systemName: "square.and.arrow.up")!
}() // }()
static var smartFeedImage: UIImage = { // static var smartFeedImage: UIImage = {
return UIImage(systemName: "gear")! // return UIImage(systemName: "gear")!
}() // }()
static var starColor: UIColor = { static var starColor: UIColor = {
return UIColor(named: "starColor")! return UIColor(named: "starColor")!
@ -224,19 +224,19 @@ struct AppAssets {
return UIColor(named: "tickMarkColor")! return UIColor(named: "tickMarkColor")!
}() }()
static var timelineStarImage: UIImage = { // static var timelineStarImage: UIImage = {
let image = UIImage(systemName: "star.fill")! // let image = UIImage(systemName: "star.fill")!
return image.withTintColor(AppAssets.starColor, renderingMode: .alwaysOriginal) // return image.withTintColor(AppAssets.starColor, renderingMode: .alwaysOriginal)
}() // }()
static var todayFeedImage: IconImage { static var todayFeedImage: IconImage {
let image = UIImage(systemName: "sun.max.fill")! let image = UIImage(systemName: "sun.max.fill")!
return IconImage(image, isSymbol: true, isBackgroundSuppressed: true, preferredColor: UIColor.systemOrange.cgColor) return IconImage(image, isSymbol: true, isBackgroundSuppressed: true, preferredColor: UIColor.systemOrange.cgColor)
} }
static var trashImage: UIImage = { // static var trashImage: UIImage = {
return UIImage(systemName: "trash")! // return UIImage(systemName: "trash")!
}() // }()
static var unreadFeedImage: IconImage { static var unreadFeedImage: IconImage {
let image = UIImage(systemName: "largecircle.fill.circle")! let image = UIImage(systemName: "largecircle.fill.circle")!

View File

@ -223,11 +223,11 @@ final class ArticleViewController: UIViewController {
actionBarButtonItem.isEnabled = permalinkPresent actionBarButtonItem.isEnabled = permalinkPresent
if article.status.read { if article.status.read {
readBarButtonItem.image = AppAssets.circleOpenImage readBarButtonItem.image = AppImage.circleOpen
readBarButtonItem.isEnabled = article.isAvailableToMarkUnread readBarButtonItem.isEnabled = article.isAvailableToMarkUnread
readBarButtonItem.accLabelText = NSLocalizedString("Mark Article Unread", comment: "Mark Article Unread") readBarButtonItem.accLabelText = NSLocalizedString("Mark Article Unread", comment: "Mark Article Unread")
} else { } else {
readBarButtonItem.image = AppAssets.circleClosedImage readBarButtonItem.image = AppImage.circleClosed
readBarButtonItem.isEnabled = true readBarButtonItem.isEnabled = true
readBarButtonItem.accLabelText = NSLocalizedString("Selected - Mark Article Unread", comment: "Selected - Mark Article Unread") readBarButtonItem.accLabelText = NSLocalizedString("Selected - Mark Article Unread", comment: "Selected - Mark Article Unread")
} }

View File

@ -742,7 +742,7 @@ private extension WebViewController {
guard let article = article, !article.status.read || article.isAvailableToMarkUnread else { return nil } 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 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 return UIAction(title: title, image: readImage) { [weak self] _ in
self?.coordinator.toggleReadForCurrentArticle() self?.coordinator.toggleReadForCurrentArticle()
} }
@ -776,7 +776,7 @@ private extension WebViewController {
func shareAction() -> UIAction { func shareAction() -> UIAction {
let title = NSLocalizedString("Share", comment: "Share") 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() self?.showActivityDialog()
} }
} }

View File

@ -30,7 +30,7 @@ final class IconView: UIView {
private var isDiscernable = true private var isDiscernable = true
private let imageView: UIImageView = { private let imageView: UIImageView = {
let imageView = NonIntrinsicImageView(image: AppAssets.faviconTemplateImage) let imageView = NonIntrinsicImageView(image: AppImage.faviconTemplate)
imageView.contentMode = .scaleAspectFit imageView.contentMode = .scaleAspectFit
imageView.clipsToBounds = true imageView.clipsToBounds = true
imageView.layer.cornerRadius = 2.0 imageView.layer.cornerRadius = 2.0

View File

@ -644,13 +644,13 @@ final class MainFeedViewController: UITableViewController, UndoableCommandRunner
var menuItems: [UIAction] = [] var menuItems: [UIAction] = []
let addFeedActionTitle = NSLocalizedString("Add Feed", comment: "Add Feed") 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() self.coordinator.showAddFeed()
} }
menuItems.append(addFeedAction) menuItems.append(addFeedAction)
let addWebFolderActionTitle = NSLocalizedString("Add Folder", comment: "Add Folder") 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() self.coordinator.showAddFolder()
} }
@ -751,12 +751,12 @@ private extension MainFeedViewController {
} }
func setFilterButtonToActive() { func setFilterButtonToActive() {
filterButton?.image = AppAssets.filterActiveImage filterButton?.image = AppImage.filterActive
filterButton?.accLabelText = NSLocalizedString("Selected - Filter Read Feeds", comment: "Selected - Filter Read Feeds") filterButton?.accLabelText = NSLocalizedString("Selected - Filter Read Feeds", comment: "Selected - Filter Read Feeds")
} }
func setFilterButtonToInactive() { func setFilterButtonToInactive() {
filterButton?.image = AppAssets.filterInactiveImage filterButton?.image = AppImage.filterInactive
filterButton?.accLabelText = NSLocalizedString("Filter Read Feeds", comment: "Filter Read Feeds") filterButton?.accLabelText = NSLocalizedString("Filter Read Feeds", comment: "Filter Read Feeds")
} }
@ -1081,7 +1081,7 @@ private extension MainFeedViewController {
func deleteAction(indexPath: IndexPath) -> UIAction { func deleteAction(indexPath: IndexPath) -> UIAction {
let title = NSLocalizedString("Delete", comment: "Delete") 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) self?.delete(indexPath: indexPath)
} }
return action return action
@ -1089,7 +1089,7 @@ private extension MainFeedViewController {
func renameAction(indexPath: IndexPath) -> UIAction { func renameAction(indexPath: IndexPath) -> UIAction {
let title = NSLocalizedString("Rename", comment: "Rename") 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) self?.rename(indexPath: indexPath)
} }
return action return action
@ -1101,7 +1101,7 @@ private extension MainFeedViewController {
} }
let title = NSLocalizedString("Get Info", comment: "Get Info") 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) self?.coordinator.showFeedInspector(for: feed)
} }
return action return action
@ -1109,7 +1109,7 @@ private extension MainFeedViewController {
func getAccountInfoAction(account: Account) -> UIAction { func getAccountInfoAction(account: Account) -> UIAction {
let title = NSLocalizedString("Get Info", comment: "Get Info") 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) self?.coordinator.showAccountInspector(for: account)
} }
return action return action

View File

@ -20,7 +20,7 @@ final class MainTimelineTableViewCell: VibrantTableViewCell {
private lazy var iconView = IconView() private lazy var iconView = IconView()
private lazy var starView = { private lazy var starView = {
return NonIntrinsicImageView(image: AppAssets.timelineStarImage) return NonIntrinsicImageView(image: AppImage.timelineStar)
}() }()
private var unreadIndicatorPropertyAnimator: UIViewPropertyAnimator? private var unreadIndicatorPropertyAnimator: UIViewPropertyAnimator?

View File

@ -70,7 +70,7 @@ final class TimelineViewController: UITableViewController, UndoableCommandRunner
NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground(_:)), name: UIApplication.willEnterForegroundNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(willEnterForeground(_:)), name: UIApplication.willEnterForegroundNotification, object: nil)
// Initialize Programmatic Buttons // 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(_:))) firstUnreadButton = UIBarButtonItem(image: AppImage.nextUnreadArticle, style: .plain, target: self, action: #selector(firstUnread(_:)))
// Setup the Search Controller // Setup the Search Controller
@ -282,7 +282,7 @@ final class TimelineViewController: UITableViewController, UndoableCommandRunner
completion(true) completion(true)
} }
readAction.image = article.status.read ? AppAssets.circleClosedImage : AppAssets.circleOpenImage readAction.image = article.status.read ? AppImage.circleClosed : AppImage.circleOpen
readAction.backgroundColor = AppAssets.primaryAccentColor readAction.backgroundColor = AppAssets.primaryAccentColor
return UISwipeActionsConfiguration(actions: [readAction]) return UISwipeActionsConfiguration(actions: [readAction])
@ -687,10 +687,10 @@ private extension TimelineViewController {
} }
if coordinator.isReadArticlesFiltered { if coordinator.isReadArticlesFiltered {
filterButton?.image = AppAssets.filterActiveImage filterButton?.image = AppImage.filterActive
filterButton?.accLabelText = NSLocalizedString("Selected - Filter Read Articles", comment: "Selected - Filter Read Articles") filterButton?.accLabelText = NSLocalizedString("Selected - Filter Read Articles", comment: "Selected - Filter Read Articles")
} else { } else {
filterButton?.image = AppAssets.filterInactiveImage filterButton?.image = AppImage.filterInactive
filterButton?.accLabelText = NSLocalizedString("Filter Read Articles", comment: "Filter Read Articles") filterButton?.accLabelText = NSLocalizedString("Filter Read Articles", comment: "Filter Read Articles")
} }
@ -791,7 +791,7 @@ private extension TimelineViewController {
let title = article.status.read ? let title = article.status.read ?
NSLocalizedString("Mark as Unread", comment: "Mark as Unread") : NSLocalizedString("Mark as Unread", comment: "Mark as Unread") :
NSLocalizedString("Mark as Read", comment: "Mark as Read") 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 let action = UIAction(title: title, image: image) { [weak self] _ in
self?.coordinator.toggleRead(article) self?.coordinator.toggleRead(article)
@ -1005,7 +1005,7 @@ private extension TimelineViewController {
func shareAction(_ article: Article, indexPath: IndexPath) -> UIAction? { func shareAction(_ article: Article, indexPath: IndexPath) -> UIAction? {
guard let url = article.preferredURL else { return nil } guard let url = article.preferredURL else { return nil }
let title = NSLocalizedString("Share", comment: "Share") 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) self?.shareDialogForTableCell(indexPath: indexPath, url: url, title: article.title)
} }
return action return action

View File

@ -104,7 +104,7 @@ final class ArticleThemesTableViewController: UITableViewController {
self?.present(alertController, animated: true) self?.present(alertController, animated: true)
} }
deleteAction.image = AppAssets.trashImage deleteAction.image = AppImage.trash
deleteAction.backgroundColor = UIColor.systemRed deleteAction.backgroundColor = UIColor.systemRed
return UISwipeActionsConfiguration(actions: [deleteAction]) return UISwipeActionsConfiguration(actions: [deleteAction])

View File

@ -84,7 +84,7 @@ private extension TimelinePreviewTableViewController {
status: status status: status
) )
let iconImage = IconImage(AppAssets.faviconTemplateImage.withTintColor(AppAssets.secondaryAccentColor)) let iconImage = IconImage(AppImage.faviconTemplate.withTintColor(AppAssets.secondaryAccentColor))
return MainTimelineCellData( return MainTimelineCellData(
article: prototypeArticle, article: prototypeArticle,