Prevent backgrounds from showing up when displaying symbol icons. Fixes #2523

This commit is contained in:
Maurice Parker 2020-10-24 18:15:59 -05:00
parent 64bb2e58e9
commit 6d9dcecd81
3 changed files with 10 additions and 8 deletions

View File

@ -25,9 +25,11 @@ final class IconImage {
}()
let image: RSImage
let isSymbol: Bool
init(_ image: RSImage) {
init(_ image: RSImage, isSymbol: Bool = false) {
self.image = image
self.isSymbol = isSymbol
}
}

View File

@ -126,7 +126,7 @@ struct AppAssets {
}()
static var masterFolderImage: IconImage = {
return IconImage(UIImage(systemName: "folder.fill")!)
return IconImage(UIImage(systemName: "folder.fill")!, isSymbol: true)
}()
static var moreImage: UIImage = {
@ -158,7 +158,7 @@ struct AppAssets {
}()
static var searchFeedImage: IconImage = {
return IconImage(UIImage(systemName: "magnifyingglass")!)
return IconImage(UIImage(systemName: "magnifyingglass")!, isSymbol: true)
}()
static var secondaryAccentColor: UIColor = {
@ -190,7 +190,7 @@ struct AppAssets {
}()
static var starredFeedImage: IconImage = {
return IconImage(UIImage(systemName: "star.fill")!)
return IconImage(UIImage(systemName: "star.fill")!, isSymbol: true)
}()
static var tickMarkColor: UIColor = {
@ -203,7 +203,7 @@ struct AppAssets {
}()
static var todayFeedImage: IconImage = {
return IconImage(UIImage(systemName: "sun.max.fill")!)
return IconImage(UIImage(systemName: "sun.max.fill")!, isSymbol: true)
}()
static var trashImage: UIImage = {
@ -211,7 +211,7 @@ struct AppAssets {
}()
static var unreadFeedImage: IconImage = {
return IconImage(UIImage(systemName: "largecircle.fill.circle")!)
return IconImage(UIImage(systemName: "largecircle.fill.circle")!, isSymbol: true)
}()
static var vibrantTextColor: UIColor = {

View File

@ -52,7 +52,7 @@ final class IconView: UIView {
}
private var isSymbolImage: Bool {
return imageView.image?.isSymbolImage ?? false
return iconImage?.isSymbol ?? false
}
override init(frame: CGRect) {