mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
UI improvements
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user