mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-13 06:49:23 +00:00
32 lines
658 B
Swift
32 lines
658 B
Swift
import Foundation
|
|
import TelegramCore
|
|
import SyncCore
|
|
|
|
public extension TelegramWallpaper {
|
|
var isEmpty: Bool {
|
|
switch self {
|
|
case .image:
|
|
return false
|
|
case let .file(file):
|
|
if file.isPattern, file.settings.color == 0xffffff {
|
|
return true
|
|
} else {
|
|
return false
|
|
}
|
|
case let .color(color):
|
|
return color == 0xffffff
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
var isBuiltin: Bool {
|
|
switch self {
|
|
case .builtin:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
}
|