reset color by using the default

This commit is contained in:
2026-08-04 19:47:08 +02:00
parent 9531f12e4f
commit fbf3422cab
+5 -1
View File
@@ -2123,6 +2123,7 @@ struct ComicOptionItem {
class ComicOptionViewController: UITableViewController {
private let items: [ComicOptionItem]
private var defaultTextColor: UIColor?
init(title: String, items: [ComicOptionItem]) {
self.items = items
@@ -2155,6 +2156,9 @@ class ComicOptionViewController: UITableViewController {
let item = items[indexPath.row]
cell.textLabel?.text = item.title
cell.accessoryType = item.children != nil ? .disclosureIndicator : .none
if cell.textLabel?.textColor != .red && cell.textLabel?.textColor != .gray {
defaultTextColor = cell.textLabel?.textColor
}
let available = item.available()
@@ -2164,7 +2168,7 @@ class ComicOptionViewController: UITableViewController {
if item.destructive {
cell.textLabel?.textColor = .red
} else {
cell.textLabel?.textColor = .white
cell.textLabel?.textColor = defaultTextColor ?? .black
}
} else {
cell.textLabel?.textColor = .gray