Skip to content

Commit

Permalink
chore: remove unnecessary assert SQCORE-1299 (#5660)
Browse files Browse the repository at this point in the history
* chore: remove unnecessary assert

* empty
  • Loading branch information
johnxnguyen committed May 10, 2022
1 parent 0e1dcfd commit caa0e27
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Wire-iOS/Sources/Helpers/ColorScheme.swift
Expand Up @@ -19,6 +19,7 @@
import Foundation
import UIKit
import WireUtilities
import WireCommonComponents

@objc
enum ColorSchemeVariant: UInt {
Expand Down Expand Up @@ -318,14 +319,11 @@ extension UIColor {

/// Creates UIColor instance with color corresponding to @p accentColor that can be used to display the name.
class func nameColor(for accentColor: ZMAccentColor, variant: ColorSchemeVariant) -> UIColor {

assert(accentColor.rawValue <= ZMAccentColor.max.rawValue)

let accentColor = AccentColor(ZMAccentColor: accentColor) ?? .strongBlue
let coefficientsArray = variant == .dark ? accentColorNameColorBlendingCoefficientsDark : accentColorNameColorBlendingCoefficientsLight
let coefficient = coefficientsArray[Int(accentColor.rawValue)]

let background: UIColor = variant == .dark ? .black : .white
return background.mix(UIColor(fromZMAccentColor: accentColor), amount: coefficient)
return background.mix(UIColor(for: accentColor), amount: coefficient)
}
}

Expand Down

0 comments on commit caa0e27

Please sign in to comment.