mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Refactor the ArticleThemeManager code to simplify it and try to avoid any issues with app warm up on the iPhone
This commit is contained in:
@@ -72,9 +72,9 @@ class ArticleThemesTableViewController: UITableViewController, Logging {
|
||||
|
||||
override func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
|
||||
guard let cell = tableView.cellForRow(at: indexPath),
|
||||
let themeName = cell.textLabel?.text,
|
||||
let theme = ArticleThemesManager.shared.articleThemeWithThemeName(themeName),
|
||||
!theme.isAppTheme else { return nil }
|
||||
let themeName = cell.textLabel?.text else { return nil }
|
||||
|
||||
guard !ArticleThemesManager.shared.articleThemeWithThemeName(themeName).isAppTheme else { return nil }
|
||||
|
||||
let deleteTitle = NSLocalizedString("Delete", comment: "Delete")
|
||||
let deleteAction = UIContextualAction(style: .normal, title: deleteTitle) { [weak self] (action, view, completion) in
|
||||
|
||||
Reference in New Issue
Block a user