diff --git a/Telegram-iOS/AppDelegate.swift b/Telegram-iOS/AppDelegate.swift index 4ee6899f3c..237b4a7134 100644 --- a/Telegram-iOS/AppDelegate.swift +++ b/Telegram-iOS/AppDelegate.swift @@ -366,15 +366,20 @@ private enum QueuedWakeup: Int32 { return true } + var isDebugConfiguration = false #if DEBUG - LoggingSettings.defaultSettings = LoggingSettings(logToFile: true, logToConsole: true, redactSensitiveData: true) - #else - if BuildConfig.shared().isInternalBuild { + isDebugConfiguration = true + #endif + + if Bundle.main.appStoreReceiptURL?.lastPathComponent == "sandboxReceipt" { + isDebugConfiguration = true + } + + if isDebugConfiguration || BuildConfig.shared().isInternalBuild { LoggingSettings.defaultSettings = LoggingSettings(logToFile: true, logToConsole: false, redactSensitiveData: true) } else { - LoggingSettings.defaultSettings = LoggingSettings(logToFile: true, logToConsole: false, redactSensitiveData: true) + LoggingSettings.defaultSettings = LoggingSettings(logToFile: false, logToConsole: false, redactSensitiveData: true) } - #endif let rootPath = rootPathForBasePath(appGroupUrl.path) performAppGroupUpgrades(appGroupPath: appGroupUrl.path, rootPath: rootPath) diff --git a/Telegram-iOS/SnapshotEnvironment.swift b/Telegram-iOS/SnapshotEnvironment.swift index 6e2cf9636c..05a4cdc687 100644 --- a/Telegram-iOS/SnapshotEnvironment.swift +++ b/Telegram-iOS/SnapshotEnvironment.swift @@ -89,9 +89,9 @@ func snapshotEnvironment(application: UIApplication, mainWindow: UIWindow, statu let _ = updatePresentationThemeSettingsInteractively(postbox: result!.postbox, { _ in switch theme { case .day: - return PresentationThemeSettings(chatWallpaper: .color(0xffffff), chatWallpaperMode: .still, theme: .builtin(.day), themeAccentColor: nil, fontSize: .regular, automaticThemeSwitchSetting: AutomaticThemeSwitchSetting(trigger: .none, theme: .nightAccent), disableAnimations: false) + return PresentationThemeSettings(chatWallpaper: .color(0xffffff), chatWallpaperOptions: [], theme: .builtin(.day), themeAccentColor: nil, fontSize: .regular, automaticThemeSwitchSetting: AutomaticThemeSwitchSetting(trigger: .none, theme: .nightAccent), disableAnimations: false) case .night: - return PresentationThemeSettings(chatWallpaper: .color(0x000000), chatWallpaperMode: .still, theme: .builtin(.nightAccent), themeAccentColor: nil, fontSize: .regular, automaticThemeSwitchSetting: AutomaticThemeSwitchSetting(trigger: .none, theme: .nightAccent), disableAnimations: false) + return PresentationThemeSettings(chatWallpaper: .color(0x000000), chatWallpaperOptions: [], theme: .builtin(.nightAccent), themeAccentColor: nil, fontSize: .regular, automaticThemeSwitchSetting: AutomaticThemeSwitchSetting(trigger: .none, theme: .nightAccent), disableAnimations: false) } }).start()