Merge commit '8dc6f0029f0f0cf1ece86fd2e5e10d5ad4bb9d9c'

This commit is contained in:
Peter Iakovlev 2019-01-17 21:50:12 +04:00
commit 6de83e7a55
2 changed files with 12 additions and 7 deletions

View File

@ -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)

View File

@ -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()