Finish migration away from AppAssets to AppImage and AppColor.

This commit is contained in:
Brent Simmons
2025-01-30 12:58:14 -08:00
parent 6db201f827
commit 0dfb284f67
37 changed files with 179 additions and 638 deletions

View File

@@ -62,16 +62,16 @@ final class MainTimelineTableViewCell: VibrantTableViewCell {
if animated {
UIView.animate(withDuration: Self.duration) {
if self.isHighlighted || self.isSelected {
self.unreadIndicatorView.backgroundColor = AppAssets.vibrantTextColor
self.unreadIndicatorView.backgroundColor = AppColor.vibrantText
} else {
self.unreadIndicatorView.backgroundColor = AppAssets.secondaryAccentColor
self.unreadIndicatorView.backgroundColor = AppColor.secondaryAccent
}
}
} else {
if self.isHighlighted || self.isSelected {
self.unreadIndicatorView.backgroundColor = AppAssets.vibrantTextColor
self.unreadIndicatorView.backgroundColor = AppColor.vibrantText
} else {
self.unreadIndicatorView.backgroundColor = AppAssets.secondaryAccentColor
self.unreadIndicatorView.backgroundColor = AppColor.secondaryAccent
}
}
}

View File

@@ -27,7 +27,7 @@ final class MainTimelineUnreadCountView: MainFeedUnreadCountView {
let cornerRadii = CGSize(width: cornerRadius, height: cornerRadius)
let rect = CGRect(x: 1, y: 1, width: bounds.width - 2, height: bounds.height - 2)
let path = UIBezierPath(roundedRect: rect, byRoundingCorners: .allCorners, cornerRadii: cornerRadii)
AppAssets.primaryAccentColor.setFill()
AppColor.accent.setFill()
path.fill()
if unreadCount > 0 {

View File

@@ -283,7 +283,7 @@ final class TimelineViewController: UITableViewController, UndoableCommandRunner
}
readAction.image = article.status.read ? AppImage.circleClosed : AppImage.circleOpen
readAction.backgroundColor = AppAssets.primaryAccentColor
readAction.backgroundColor = AppColor.accent
return UISwipeActionsConfiguration(actions: [readAction])
}
@@ -302,8 +302,8 @@ final class TimelineViewController: UITableViewController, UndoableCommandRunner
completion(true)
}
starAction.image = article.status.starred ? AppAssets.starOpenImage : AppAssets.starClosedImage
starAction.backgroundColor = AppAssets.starColor
starAction.image = article.status.starred ? AppImage.starOpen : AppImage.starClosed
starAction.backgroundColor = AppColor.star
// Set up the read action
let moreTitle = NSLocalizedString("More", comment: "More")
@@ -805,7 +805,7 @@ private extension TimelineViewController {
let title = article.status.starred ?
NSLocalizedString("Mark as Unstarred", comment: "Mark as Unstarred") :
NSLocalizedString("Mark as Starred", comment: "Mark as Starred")
let image = article.status.starred ? AppAssets.starOpenImage : AppAssets.starClosedImage
let image = article.status.starred ? AppImage.starOpen : AppImage.starClosed
let action = UIAction(title: title, image: image) { [weak self] _ in
self?.coordinator.toggleStar(article)