UI improvements

This commit is contained in:
Ali
2023-03-02 19:05:19 +04:00
parent 98c0b7234c
commit 274aa510b1
5 changed files with 52 additions and 11 deletions

View File

@@ -270,18 +270,24 @@ public struct EnergyUsageSettings: Codable, Equatable {
case autodownloadInBackground
}
public static var `default`: EnergyUsageSettings {
public static let `default`: EnergyUsageSettings = {
var length: Int = 4
var cpuCount: UInt32 = 0
sysctlbyname("hw.ncpu", &cpuCount, &length, nil, 0)
let isCapable = cpuCount >= 4
return EnergyUsageSettings(
activationThreshold: 15,
autoplayVideo: true,
autoplayGif: true,
loopStickers: true,
loopEmoji: true,
fullTranslucency: true,
loopEmoji: isCapable ? false : true,
fullTranslucency: isCapable ? false : true,
extendBackgroundWork: true,
autodownloadInBackground: true
)
}
}()
public static var powerSavingDefault: EnergyUsageSettings {
return EnergyUsageSettings(