From 69ae436ea4ff95da40155f69226262f31a96f3c5 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 26 Jan 2025 21:38:40 -0800 Subject: [PATCH] Create shared AppAsset and start using it. --- Mac/AppAssets.swift | 114 +++++++-------- .../AccountsReaderAPIWindowController.swift | 10 +- NetNewsWire.xcodeproj/project.pbxproj | 1 + Shared/AppAsset.swift | 80 +++++++++++ Shared/Extensions/RSImage-AppIcons.swift | 2 +- Shared/Extensions/SmallIconProvider.swift | 2 +- .../CloudKitAccountViewController.swift | 2 +- .../FeedbinAccountViewController.swift | 2 +- iOS/Account/LocalAccountViewController.swift | 2 +- .../NewsBlurAccountViewController.swift | 2 +- .../ReaderAPIAccountViewController.swift | 8 +- iOS/AppAssets.swift | 130 +++++++++--------- .../AccountInspectorViewController.swift | 2 +- iOS/Settings/AddAccountViewController.swift | 8 +- iOS/Settings/SettingsViewController.swift | 2 +- .../ShareFolderPickerController.swift | 2 +- 16 files changed, 224 insertions(+), 145 deletions(-) create mode 100644 Shared/AppAsset.swift diff --git a/Mac/AppAssets.swift b/Mac/AppAssets.swift index 9a2b2aa74..86a5d7ac5 100644 --- a/Mac/AppAssets.swift +++ b/Mac/AppAssets.swift @@ -12,43 +12,43 @@ import Account struct AppAssets { - static var accountBazQux: RSImage! = { - return RSImage(named: "accountBazQux") - }() +// static var accountBazQux: RSImage! = { +// return RSImage(named: "accountBazQux") +// }() - static var accountCloudKit: RSImage! = { - return RSImage(named: "accountCloudKit") - }() +// static var accountCloudKit: RSImage! = { +// return RSImage(named: "accountCloudKit") +// }() +// +// static var accountFeedbin: RSImage! = { +// return RSImage(named: "accountFeedbin") +// }() +// +// static var accountFeedly: RSImage! = { +// return RSImage(named: "accountFeedly") +// }() +// +// static var accountFreshRSS: RSImage! = { +// return RSImage(named: "accountFreshRSS") +// }() +// +// static var accountInoreader: RSImage! = { +// return RSImage(named: "accountInoreader") +// }() +// +// static var accountLocal: RSImage! = { +// return RSImage(named: "accountLocal") +// }() +// +// static var accountNewsBlur: RSImage! = { +// return RSImage(named: "accountNewsBlur") +// }() +// +// static var accountTheOldReader: RSImage! = { +// return RSImage(named: "accountTheOldReader") +// }() - static var accountFeedbin: RSImage! = { - return RSImage(named: "accountFeedbin") - }() - - static var accountFeedly: RSImage! = { - return RSImage(named: "accountFeedly") - }() - - static var accountFreshRSS: RSImage! = { - return RSImage(named: "accountFreshRSS") - }() - - static var accountInoreader: RSImage! = { - return RSImage(named: "accountInoreader") - }() - - static var accountLocal: RSImage! = { - return RSImage(named: "accountLocal") - }() - - static var accountNewsBlur: RSImage! = { - return RSImage(named: "accountNewsBlur") - }() - - static var accountTheOldReader: RSImage! = { - return RSImage(named: "accountTheOldReader") - }() - - static let nnwFeedIcon = RSImage(named: "nnwFeedIcon")! +// static let nnwFeedIcon = RSImage(named: "nnwFeedIcon")! @available(macOS 11.0, *) static var addNewSidebarItemImage: RSImage = { @@ -259,27 +259,27 @@ struct AppAssets { return NSColor(named: NSColor.Name("StarColor"))! }() - static func image(for accountType: AccountType) -> NSImage? { - switch accountType { - case .onMyMac: - return AppAssets.accountLocal - case .cloudKit: - return AppAssets.accountCloudKit - case .bazQux: - return AppAssets.accountBazQux - case .feedbin: - return AppAssets.accountFeedbin - case .feedly: - return AppAssets.accountFeedly - case .freshRSS: - return AppAssets.accountFreshRSS - case .inoreader: - return AppAssets.accountInoreader - case .newsBlur: - return AppAssets.accountNewsBlur - case .theOldReader: - return AppAssets.accountTheOldReader - } - } +// static func image(for accountType: AccountType) -> NSImage? { +// switch accountType { +// case .onMyMac: +// return AppAssets.accountLocal +// case .cloudKit: +// return AppAssets.accountCloudKit +// case .bazQux: +// return AppAsset.accountBazQuxImage +// case .feedbin: +// return AppAssets.accountFeedbin +// case .feedly: +// return AppAssets.accountFeedly +// case .freshRSS: +// return AppAssets.accountFreshRSS +// case .inoreader: +// return AppAssets.accountInoreader +// case .newsBlur: +// return AppAssets.accountNewsBlur +// case .theOldReader: +// return AppAssets.accountTheOldReader +// } +// } } diff --git a/Mac/Preferences/Accounts/AccountsReaderAPIWindowController.swift b/Mac/Preferences/Accounts/AccountsReaderAPIWindowController.swift index 4544088ce..301a457dc 100644 --- a/Mac/Preferences/Accounts/AccountsReaderAPIWindowController.swift +++ b/Mac/Preferences/Accounts/AccountsReaderAPIWindowController.swift @@ -39,23 +39,23 @@ final class AccountsReaderAPIWindowController: NSWindowController { if let accountType = accountType { switch accountType { case .freshRSS: - titleImageView.image = AppAssets.accountFreshRSS + titleImageView.image = AppAsset.image(accountType: .freshRSS) titleLabel.stringValue = NSLocalizedString("Sign in to your FreshRSS account.", comment: "FreshRSS") noAccountTextField.stringValue = NSLocalizedString("Don’t have a FreshRSS instance?", comment: "No FreshRSS") createAccountButton.title = NSLocalizedString("Find out more", comment: "No FreshRSS Button") apiURLTextField.placeholderString = NSLocalizedString("fresh.rss.net/api/greader.php", comment: "FreshRSS API Helper") case .inoreader: - titleImageView.image = AppAssets.accountInoreader + titleImageView.image = AppAsset.image(accountType: .inoreader) titleLabel.stringValue = NSLocalizedString("Sign in to your InoReader account.", comment: "InoReader") gridView.row(at: 2).isHidden = true noAccountTextField.stringValue = NSLocalizedString("Don’t have an InoReader account?", comment: "No InoReader") case .bazQux: - titleImageView.image = AppAssets.accountBazQux + titleImageView.image = AppAsset.image(accountType: .bazQux) titleLabel.stringValue = NSLocalizedString("Sign in to your BazQux account.", comment: "BazQux") gridView.row(at: 2).isHidden = true noAccountTextField.stringValue = NSLocalizedString("Don’t have a BazQux account?", comment: "No BazQux") case .theOldReader: - titleImageView.image = AppAssets.accountTheOldReader + titleImageView.image = AppAsset.image(accountType: .theOldReader) titleLabel.stringValue = NSLocalizedString("Sign in to your The Old Reader account.", comment: "The Old Reader") gridView.row(at: 2).isHidden = true noAccountTextField.stringValue = NSLocalizedString("Don’t have a The Old Reader account?", comment: "No OldReader") @@ -175,9 +175,7 @@ final class AccountsReaderAPIWindowController: NSWindowController { case .failure: self.errorMessageLabel.stringValue = NSLocalizedString("Network error. Try again later.", comment: "Credentials Error") } - } - } @IBAction func createAccountWithProvider(_ sender: Any) { diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index 8046d4b1d..7a2f39453 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -421,6 +421,7 @@ 84C1ECED2CDFE49100C7456A /* PBXFileSystemSynchronizedBuildFileExceptionSet */ = { isa = PBXFileSystemSynchronizedBuildFileExceptionSet; membershipExceptions = ( + AppAsset.swift, Defaults/AppDefaults.swift, Defaults/ArticleTextSize.swift, Defaults/FontSize.swift, diff --git a/Shared/AppAsset.swift b/Shared/AppAsset.swift new file mode 100644 index 000000000..86f71e3d0 --- /dev/null +++ b/Shared/AppAsset.swift @@ -0,0 +1,80 @@ +// +// AppAsset.swift +// NetNewsWire +// +// Created by Brent Simmons on 1/26/25. +// Copyright © 2025 Ranchero Software. All rights reserved. +// + +#if os(macOS) +import AppKit +#elseif os(iOS) +import UIKit +#endif +import RSCore +import Account + +struct AppAsset { + + // MARK: - Account images + + static func image(accountType: AccountType) -> RSImage? { + switch accountType { + case .onMyMac: + AppAsset.accountLocalImage + case .cloudKit: + AppAsset.accountCloudKitImage + case .feedbin: + AppAsset.accountFeedbinImage + case .feedly: + AppAsset.accountFeedlyImage + case .freshRSS: + AppAsset.accountFreshRSSImage + case .newsBlur: + AppAsset.accountNewsBlurImage + case .inoreader: + AppAsset.accountInoreaderImage + case .bazQux: + AppAsset.accountBazQuxImage + case .theOldReader: + AppAsset.accountTheOldReaderImage + } + } + + // MARK: - Misc. + + static let nnwFeedIcon = RSImage(named: "nnwFeedIcon")! + + +} + +private extension AppAsset { + + static var accountBazQuxImage = RSImage(named: "accountBazQux")! + static var accountCloudKitImage = RSImage(named: "accountCloudKit")! + static var accountFeedbinImage = RSImage(named: "accountFeedbin")! + static var accountFeedlyImage = RSImage(named: "accountFeedly")! + static var accountFreshRSSImage = RSImage(named: "accountFreshRSS")! + static var accountInoreaderImage = RSImage(named: "accountInoreader")! + static var accountNewsBlurImage = RSImage(named: "accountNewsBlur")! + static var accountTheOldReaderImage = RSImage(named: "accountTheOldReader")! + +#if os(macOS) + static var accountLocalMacImage = RSImage(named: "accountLocal")! +#elseif os(iOS) + static var accountLocalPadImage = UIImage(named: "accountLocalPad")! + static var accountLocalPhoneImage = UIImage(named: "accountLocalPhone")! +#endif + + static var accountLocalImage: RSImage = { +#if os(macOS) + accountLocalMacImage +#elseif os(iOS) + if UIDevice.current.userInterfaceIdiom == .pad { + return accountLocalPadImage + } else { + return accountLocalPhoneImage + } +#endif + }() +} diff --git a/Shared/Extensions/RSImage-AppIcons.swift b/Shared/Extensions/RSImage-AppIcons.swift index f464eef33..860153731 100644 --- a/Shared/Extensions/RSImage-AppIcons.swift +++ b/Shared/Extensions/RSImage-AppIcons.swift @@ -34,5 +34,5 @@ extension IconImage { return nil }() - static let nnwFeedIcon = IconImage(AppAssets.nnwFeedIcon) + static let nnwFeedIcon = IconImage(AppAsset.nnwFeedIcon) } diff --git a/Shared/Extensions/SmallIconProvider.swift b/Shared/Extensions/SmallIconProvider.swift index 86d34462f..f08133ef5 100644 --- a/Shared/Extensions/SmallIconProvider.swift +++ b/Shared/Extensions/SmallIconProvider.swift @@ -18,7 +18,7 @@ protocol SmallIconProvider { extension Account: SmallIconProvider { var smallIcon: IconImage? { - if let image = AppAssets.image(for: type) { + if let image = AppAsset.image(accountType: type) { return IconImage(image) } return nil diff --git a/iOS/Account/CloudKitAccountViewController.swift b/iOS/Account/CloudKitAccountViewController.swift index b1262d503..cc60f5383 100644 --- a/iOS/Account/CloudKitAccountViewController.swift +++ b/iOS/Account/CloudKitAccountViewController.swift @@ -57,7 +57,7 @@ final class CloudKitAccountViewController: UITableViewController { override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { if section == 0 { let headerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: "SectionHeader") as! ImageHeaderView - headerView.imageView.image = AppAssets.image(for: .cloudKit) + headerView.imageView.image = AppAsset.image(accountType: .cloudKit) return headerView } else { return super.tableView(tableView, viewForHeaderInSection: section) diff --git a/iOS/Account/FeedbinAccountViewController.swift b/iOS/Account/FeedbinAccountViewController.swift index 44b7c837f..56a3d3719 100644 --- a/iOS/Account/FeedbinAccountViewController.swift +++ b/iOS/Account/FeedbinAccountViewController.swift @@ -59,7 +59,7 @@ final class FeedbinAccountViewController: UITableViewController { override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { if section == 0 { let headerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: "SectionHeader") as! ImageHeaderView - headerView.imageView.image = AppAssets.image(for: .feedbin) + headerView.imageView.image = AppAsset.image(accountType: .feedbin) return headerView } else { return super.tableView(tableView, viewForHeaderInSection: section) diff --git a/iOS/Account/LocalAccountViewController.swift b/iOS/Account/LocalAccountViewController.swift index 698d2701a..f7c188003 100644 --- a/iOS/Account/LocalAccountViewController.swift +++ b/iOS/Account/LocalAccountViewController.swift @@ -46,7 +46,7 @@ final class LocalAccountViewController: UITableViewController { override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { if section == 0 { let headerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: "SectionHeader") as! ImageHeaderView - headerView.imageView.image = AppAssets.image(for: .onMyMac) + headerView.imageView.image = AppAsset.image(accountType: .onMyMac) return headerView } else { return super.tableView(tableView, viewForHeaderInSection: section) diff --git a/iOS/Account/NewsBlurAccountViewController.swift b/iOS/Account/NewsBlurAccountViewController.swift index 3f9a638f8..c54074db6 100644 --- a/iOS/Account/NewsBlurAccountViewController.swift +++ b/iOS/Account/NewsBlurAccountViewController.swift @@ -58,7 +58,7 @@ final class NewsBlurAccountViewController: UITableViewController { override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { if section == 0 { let headerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: "SectionHeader") as! ImageHeaderView - headerView.imageView.image = AppAssets.image(for: .newsBlur) + headerView.imageView.image = AppAsset.image(accountType: .newsBlur) return headerView } else { return super.tableView(tableView, viewForHeaderInSection: section) diff --git a/iOS/Account/ReaderAPIAccountViewController.swift b/iOS/Account/ReaderAPIAccountViewController.swift index de016db65..3e111f419 100644 --- a/iOS/Account/ReaderAPIAccountViewController.swift +++ b/iOS/Account/ReaderAPIAccountViewController.swift @@ -210,13 +210,13 @@ final class ReaderAPIAccountViewController: UITableViewController { if let accountType = accountType { switch accountType { case .bazQux: - return AppAssets.accountBazQuxImage + return AppAsset.image(accountType: .bazQux) case .inoreader: - return AppAssets.accountInoreaderImage + return AppAsset.image(accountType: .inoreader) case .theOldReader: - return AppAssets.accountTheOldReaderImage + return AppAsset.image(accountType: .theOldReader) case .freshRSS: - return AppAssets.accountFreshRSSImage + return AppAsset.image(accountType: .freshRSS) default: return nil } diff --git a/iOS/AppAssets.swift b/iOS/AppAssets.swift index 16e3d2d31..c9e6ddcbd 100644 --- a/iOS/AppAssets.swift +++ b/iOS/AppAssets.swift @@ -11,47 +11,47 @@ import Account struct AppAssets { - static var accountBazQuxImage: UIImage = { - return UIImage(named: "accountBazQux")! - }() +// static var accountBazQuxImage: UIImage = { +// return UIImage(named: "accountBazQux")! +// }() - static var accountCloudKitImage: UIImage = { - return UIImage(named: "accountCloudKit")! - }() +// static var accountCloudKitImage: UIImage = { +// return UIImage(named: "accountCloudKit")! +// }() +// +// static var accountFeedbinImage: UIImage = { +// return UIImage(named: "accountFeedbin")! +// }() +// +// static var accountFeedlyImage: UIImage = { +// return UIImage(named: "accountFeedly")! +// }() +// +// static var accountFreshRSSImage: UIImage = { +// return UIImage(named: "accountFreshRSS")! +// }() +// +// static var accountInoreaderImage: UIImage = { +// return UIImage(named: "accountInoreader")! +// }() +// +// static var accountLocalPadImage: UIImage = { +// return UIImage(named: "accountLocalPad")! +// }() +// +// static var accountLocalPhoneImage: UIImage = { +// return UIImage(named: "accountLocalPhone")! +// }() +// +// static var accountNewsBlurImage: UIImage = { +// return UIImage(named: "accountNewsBlur")! +// }() +// +// static var accountTheOldReaderImage: UIImage = { +// return UIImage(named: "accountTheOldReader")! +// }() - static var accountFeedbinImage: UIImage = { - return UIImage(named: "accountFeedbin")! - }() - - static var accountFeedlyImage: UIImage = { - return UIImage(named: "accountFeedly")! - }() - - static var accountFreshRSSImage: UIImage = { - return UIImage(named: "accountFreshRSS")! - }() - - static var accountInoreaderImage: UIImage = { - return UIImage(named: "accountInoreader")! - }() - - static var accountLocalPadImage: UIImage = { - return UIImage(named: "accountLocalPad")! - }() - - static var accountLocalPhoneImage: UIImage = { - return UIImage(named: "accountLocalPhone")! - }() - - static var accountNewsBlurImage: UIImage = { - return UIImage(named: "accountNewsBlur")! - }() - - static var accountTheOldReaderImage: UIImage = { - return UIImage(named: "accountTheOldReader")! - }() - - static let nnwFeedIcon = RSImage(named: "nnwFeedIcon")! +// static let nnwFeedIcon = RSImage(named: "nnwFeedIcon")! static var articleExtractorError: UIImage = { return UIImage(named: "articleExtractorError")! @@ -251,31 +251,31 @@ struct AppAssets { return UIColor(named: "controlBackgroundColor")! }() - static func image(for accountType: AccountType) -> UIImage? { - switch accountType { - case .onMyMac: - if UIDevice.current.userInterfaceIdiom == .pad { - return AppAssets.accountLocalPadImage - } else { - return AppAssets.accountLocalPhoneImage - } - case .cloudKit: - return AppAssets.accountCloudKitImage - case .feedbin: - return AppAssets.accountFeedbinImage - case .feedly: - return AppAssets.accountFeedlyImage - case .freshRSS: - return AppAssets.accountFreshRSSImage - case .newsBlur: - return AppAssets.accountNewsBlurImage - case .inoreader: - return AppAssets.accountInoreaderImage - case .bazQux: - return AppAssets.accountBazQuxImage - case .theOldReader: - return AppAssets.accountTheOldReaderImage - } - } +// static func image(for accountType: AccountType) -> UIImage? { +// switch accountType { +// case .onMyMac: +// if UIDevice.current.userInterfaceIdiom == .pad { +// return AppAssets.accountLocalPadImage +// } else { +// return AppAssets.accountLocalPhoneImage +// } +// case .cloudKit: +// return AppAssets.accountCloudKitImage +// case .feedbin: +// return AppAssets.accountFeedbinImage +// case .feedly: +// return AppAssets.accountFeedlyImage +// case .freshRSS: +// return AppAssets.accountFreshRSSImage +// case .newsBlur: +// return AppAssets.accountNewsBlurImage +// case .inoreader: +// return AppAssets.accountInoreaderImage +// case .bazQux: +// return AppAsset.accountBazQuxImage +// case .theOldReader: +// return AppAssets.accountTheOldReaderImage +// } +// } } diff --git a/iOS/Inspector/AccountInspectorViewController.swift b/iOS/Inspector/AccountInspectorViewController.swift index f27a99fdd..08ce1c3da 100644 --- a/iOS/Inspector/AccountInspectorViewController.swift +++ b/iOS/Inspector/AccountInspectorViewController.swift @@ -169,7 +169,7 @@ extension AccountInspectorViewController { if section == 0 { let headerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: "SectionHeader") as! ImageHeaderView - headerView.imageView.image = AppAssets.image(for: account.type) + headerView.imageView.image = AppAsset.image(accountType: account.type) return headerView } else { return super.tableView(tableView, viewForHeaderInSection: section) diff --git a/iOS/Settings/AddAccountViewController.swift b/iOS/Settings/AddAccountViewController.swift index b355c3df8..33a98b9e4 100644 --- a/iOS/Settings/AddAccountViewController.swift +++ b/iOS/Settings/AddAccountViewController.swift @@ -127,17 +127,17 @@ final class AddAccountViewController: UITableViewController, AddAccountDismissDe switch indexPath.section { case AddAccountSections.local.rawValue: cell.comboNameLabel?.text = AddAccountSections.local.sectionContent[indexPath.row].localizedAccountName() - cell.comboImage?.image = AppAssets.image(for: .onMyMac) + cell.comboImage?.image = AppAsset.image(accountType: .onMyMac) case AddAccountSections.icloud.rawValue: cell.comboNameLabel?.text = AddAccountSections.icloud.sectionContent[indexPath.row].localizedAccountName() - cell.comboImage?.image = AppAssets.image(for: AddAccountSections.icloud.sectionContent[indexPath.row]) + cell.comboImage?.image = AppAsset.image(accountType: AddAccountSections.icloud.sectionContent[indexPath.row]) if AppDefaults.isDeveloperBuild || AccountManager.shared.accounts.contains(where: { $0.type == .cloudKit }) { cell.isUserInteractionEnabled = false cell.comboNameLabel?.isEnabled = false } case AddAccountSections.web.rawValue: cell.comboNameLabel?.text = AddAccountSections.web.sectionContent[indexPath.row].localizedAccountName() - cell.comboImage?.image = AppAssets.image(for: AddAccountSections.web.sectionContent[indexPath.row]) + cell.comboImage?.image = AppAsset.image(accountType: AddAccountSections.web.sectionContent[indexPath.row]) let type = AddAccountSections.web.sectionContent[indexPath.row] if (type == .feedly || type == .inoreader) && AppDefaults.isDeveloperBuild { cell.isUserInteractionEnabled = false @@ -145,7 +145,7 @@ final class AddAccountViewController: UITableViewController, AddAccountDismissDe } case AddAccountSections.selfhosted.rawValue: cell.comboNameLabel?.text = AddAccountSections.selfhosted.sectionContent[indexPath.row].localizedAccountName() - cell.comboImage?.image = AppAssets.image(for: AddAccountSections.selfhosted.sectionContent[indexPath.row]) + cell.comboImage?.image = AppAsset.image(accountType: AddAccountSections.selfhosted.sectionContent[indexPath.row]) default: return cell diff --git a/iOS/Settings/SettingsViewController.swift b/iOS/Settings/SettingsViewController.swift index a0406010f..36bc3ec84 100644 --- a/iOS/Settings/SettingsViewController.swift +++ b/iOS/Settings/SettingsViewController.swift @@ -121,7 +121,7 @@ final class SettingsViewController: UITableViewController { let acctCell = tableView.dequeueReusableCell(withIdentifier: "SettingsComboTableViewCell", for: indexPath) as! SettingsComboTableViewCell acctCell.applyThemeProperties() let account = sortedAccounts[indexPath.row] - acctCell.comboImage?.image = AppAssets.image(for: account.type) + acctCell.comboImage?.image = AppAsset.image(accountType: account.type) acctCell.comboNameLabel?.text = account.nameForDisplay cell = acctCell } diff --git a/iOS/ShareExtension/ShareFolderPickerController.swift b/iOS/ShareExtension/ShareFolderPickerController.swift index a25b836d9..3b628d82e 100644 --- a/iOS/ShareExtension/ShareFolderPickerController.swift +++ b/iOS/ShareExtension/ShareFolderPickerController.swift @@ -46,7 +46,7 @@ final class ShareFolderPickerController: UITableViewController { }() if let account = container as? ExtensionAccount { - cell.icon.image = AppAssets.image(for: account.type) + cell.icon.image = AppAsset.image(accountType: account.type) } else { cell.icon.image = AppAssets.folderImage.image }