mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Create shared AppAsset and start using it.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user