Limit blur effects

This commit is contained in:
Ali 2023-03-01 10:24:54 +04:00
parent e9eb3d53be
commit 55c1b9b363
3 changed files with 3 additions and 2 deletions

View File

@ -1643,6 +1643,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
let batteryPercentage = Int(batteryLevel * 100.0)
self.dismissAllUndoControllers()
//TODO:localize
self.present(UndoOverlayController(presentationData: presentationData, content: .universal(animation: "lowbattery_30", scale: 1.0, colors: [:], title: "Power Saving mode enabled", text: "\(batteryPercentage)% battery remaining.", customUndoText: "Disable"), elevatedLayout: false, action: { [weak self] action in
if case .undo = action, let self {
let _ = updateMediaDownloadSettingsInteractively(accountManager: self.context.sharedContext.accountManager, { settings in

View File

@ -14,7 +14,7 @@ public enum DeviceMetrics: CaseIterable, Equatable {
var cpuCount: UInt32 = 0
sysctlbyname("hw.ncpu", &cpuCount, &length, nil, 0)
self.isGraphicallyCapable = cpuCount >= 6
self.isGraphicallyCapable = cpuCount >= 4
}
}

View File

@ -30,7 +30,7 @@ public func selectReactionFillStaticColor(theme: PresentationTheme, wallpaper: T
public func dateFillNeedsBlur(theme: PresentationTheme, wallpaper: TelegramWallpaper) -> Bool {
if !DeviceMetrics.performance.isGraphicallyCapable {
//return false
return false
}
if case .builtin = wallpaper {