Finish converting iOS from AppAssets to AppAsset.

This commit is contained in:
Brent Simmons
2024-10-30 21:40:11 -07:00
parent c3fbdbc4e1
commit 4b12dc6056
31 changed files with 149 additions and 154 deletions

View File

@@ -161,12 +161,12 @@ class FeedTableViewCell : VibrantTableViewCell {
let iconTintColor: UIColor
if isHighlighted || isSelected {
iconTintColor = AppAssets.vibrantTextColor
iconTintColor = AppAsset.vibrantTextColor
} else {
if let preferredColor = iconImage?.preferredColor {
iconTintColor = UIColor(cgColor: preferredColor)
} else {
iconTintColor = AppAssets.secondaryAccentColor
iconTintColor = AppAsset.secondaryAccentColor
}
}
@@ -198,8 +198,8 @@ private extension FeedTableViewCell {
disclosureButton = NonIntrinsicButton(type: .roundedRect)
disclosureButton!.addTarget(self, action: #selector(buttonPressed(_:)), for: UIControl.Event.touchUpInside)
disclosureButton?.setImage(AppAssets.disclosureImage, for: .normal)
disclosureButton?.tintColor = AppAssets.controlBackgroundColor
disclosureButton?.setImage(AppAsset.disclosureImage, for: .normal)
disclosureButton?.tintColor = AppAsset.controlBackgroundColor
disclosureButton?.imageView?.contentMode = .center
disclosureButton?.imageView?.clipsToBounds = false
disclosureButton?.addInteraction(UIPointerInteraction())

View File

@@ -91,7 +91,7 @@ class FeedTableViewSectionHeader: UITableViewHeaderFooterView {
let button = NonIntrinsicButton()
button.tintColor = UIColor.tertiaryLabel
button.setImage(AppAssets.disclosureImage, for: .normal)
button.setImage(AppAsset.disclosureImage, for: .normal)
button.contentMode = .center
button.addInteraction(UIPointerInteraction())
button.addTarget(self, action: #selector(toggleDisclosure), for: .touchUpInside)
@@ -206,7 +206,7 @@ private extension FeedTableViewSectionHeader {
func addBackgroundView() {
self.backgroundView = UIView(frame: self.bounds)
self.backgroundView?.backgroundColor = AppAssets.sectionHeaderColor
self.backgroundView?.backgroundColor = AppAsset.sectionHeaderColor
}
}

View File

@@ -15,7 +15,7 @@ class FeedUnreadCountView : UIView {
}
let cornerRadius = 8.0
let bgColor = AppAssets.controlBackgroundColor
let bgColor = AppAsset.controlBackgroundColor
var textColor: UIColor {
return UIColor.white
}

View File

@@ -597,13 +597,13 @@ class SidebarViewController: UITableViewController, UndoableCommandRunner {
var menuItems: [UIAction] = []
let addFeedActionTitle = NSLocalizedString("Add Web Feed", comment: "Add Web Feed")
let addFeedAction = UIAction(title: addFeedActionTitle, image: AppAssets.plus) { _ in
let addFeedAction = UIAction(title: addFeedActionTitle, image: AppAsset.plus) { _ in
self.coordinator.showAddFeed()
}
menuItems.append(addFeedAction)
let addFolderActionTitle = NSLocalizedString("Add Folder", comment: "Add Folder")
let addFolderAction = UIAction(title: addFolderActionTitle, image: AppAssets.folderOutlinePlus) { _ in
let addFolderAction = UIAction(title: addFolderActionTitle, image: AppAsset.folderOutlinePlus) { _ in
self.coordinator.showAddFolder()
}
@@ -927,7 +927,7 @@ private extension SidebarViewController {
}
let title = NSLocalizedString("Open Home Page", comment: "Open Home Page")
let action = UIAction(title: title, image: AppAssets.safariImage) { [weak self] action in
let action = UIAction(title: title, image: AppAsset.safariImage) { [weak self] action in
self?.coordinator.showBrowserForFeed(indexPath)
}
return action
@@ -953,7 +953,7 @@ private extension SidebarViewController {
}
let title = NSLocalizedString("Copy Feed URL", comment: "Copy Feed URL")
let action = UIAction(title: title, image: AppAssets.copyImage) { action in
let action = UIAction(title: title, image: AppAsset.copyImage) { action in
UIPasteboard.general.url = url
}
return action
@@ -981,7 +981,7 @@ private extension SidebarViewController {
}
let title = NSLocalizedString("Copy Home Page URL", comment: "Copy Home Page URL")
let action = UIAction(title: title, image: AppAssets.copyImage) { action in
let action = UIAction(title: title, image: AppAsset.copyImage) { action in
UIPasteboard.general.url = url
}
return action
@@ -1037,7 +1037,7 @@ private extension SidebarViewController {
func deleteAction(indexPath: IndexPath) -> UIAction {
let title = NSLocalizedString("Delete", comment: "Delete")
let action = UIAction(title: title, image: AppAssets.trashImage, attributes: .destructive) { [weak self] action in
let action = UIAction(title: title, image: AppAsset.trashImage, attributes: .destructive) { [weak self] action in
self?.delete(indexPath: indexPath)
}
return action
@@ -1045,7 +1045,7 @@ private extension SidebarViewController {
func renameAction(indexPath: IndexPath) -> UIAction {
let title = NSLocalizedString("Rename", comment: "Rename")
let action = UIAction(title: title, image: AppAssets.editImage) { [weak self] action in
let action = UIAction(title: title, image: AppAsset.editImage) { [weak self] action in
self?.rename(indexPath: indexPath)
}
return action
@@ -1057,7 +1057,7 @@ private extension SidebarViewController {
}
let title = NSLocalizedString("Get Info", comment: "Get Info")
let action = UIAction(title: title, image: AppAssets.infoImage) { [weak self] action in
let action = UIAction(title: title, image: AppAsset.infoImage) { [weak self] action in
self?.coordinator.showFeedInspector(for: feed)
}
return action
@@ -1065,7 +1065,7 @@ private extension SidebarViewController {
func getAccountInfoAction(account: Account) -> UIAction {
let title = NSLocalizedString("Get Info", comment: "Get Info")
let action = UIAction(title: title, image: AppAssets.infoImage) { [weak self] action in
let action = UIAction(title: title, image: AppAsset.infoImage) { [weak self] action in
self?.coordinator.showAccountInspector(for: account)
}
return action
@@ -1073,7 +1073,7 @@ private extension SidebarViewController {
func deactivateAccountAction(account: Account) -> UIAction {
let title = NSLocalizedString("Deactivate", comment: "Deactivate")
let action = UIAction(title: title, image: AppAssets.deactivateImage) { action in
let action = UIAction(title: title, image: AppAsset.deactivateImage) { action in
account.isActive = false
}
return action