Refactoring

This commit is contained in:
Ali
2021-04-18 03:10:18 +04:00
parent 4637ed672e
commit 60d959bff8
93 changed files with 221 additions and 191 deletions

View File

@@ -1882,9 +1882,9 @@ extension PresentationTheme: Codable {
if let decoder = decoder as? PresentationThemeDecoding {
let serviceBackgroundColor = decoder.serviceBackgroundColor ?? defaultServiceBackgroundColor
decoder.referenceTheme = makeDefaultPresentationTheme(reference: referenceTheme, serviceBackgroundColor: serviceBackgroundColor)
index = decoder.reference?.index ?? arc4random64()
index = decoder.reference?.index ?? Int64.random(in: Int64.min ... Int64.max)
} else {
index = arc4random64()
index = Int64.random(in: Int64.min ... Int64.max)
}
self.init(name: (try? values.decode(PresentationThemeName.self, forKey: .name)) ?? .custom("Untitled"),