Don't break on comments in theme decoding

This commit is contained in:
Ilya Laktyushin
2019-10-07 08:12:49 +03:00
parent 25a858a06b
commit 993d668588

View File

@@ -333,6 +333,10 @@ public func makePresentationTheme(data: Data, resolvedWallpaper: TelegramWallpap
var currentLevel = topLevel
for line in lines {
let trimmedLine = line.trimmingCharacters(in: .whitespaces)
if trimmedLine.hasPrefix("#") || trimmedLine.hasPrefix("//") {
continue
}
if let rangeOfColon = line.firstIndex(of: ":") {
let key = line.prefix(upTo: rangeOfColon)