mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various improvements
This commit is contained in:
parent
4c0dc35661
commit
6a4b0854db
@ -100,7 +100,7 @@ private enum DebugControllerEntry: ItemListNodeEntry {
|
|||||||
case enableReactionOverrides(Bool)
|
case enableReactionOverrides(Bool)
|
||||||
case storiesExperiment(Bool)
|
case storiesExperiment(Bool)
|
||||||
case storiesJpegExperiment(Bool)
|
case storiesJpegExperiment(Bool)
|
||||||
case playlistPlayback(Bool)
|
case conferenceDebug(Bool)
|
||||||
case enableQuickReactionSwitch(Bool)
|
case enableQuickReactionSwitch(Bool)
|
||||||
case disableReloginTokens(Bool)
|
case disableReloginTokens(Bool)
|
||||||
case liveStreamV2(Bool)
|
case liveStreamV2(Bool)
|
||||||
@ -133,7 +133,7 @@ private enum DebugControllerEntry: ItemListNodeEntry {
|
|||||||
return DebugControllerSection.web.rawValue
|
return DebugControllerSection.web.rawValue
|
||||||
case .keepChatNavigationStack, .skipReadHistory, .dustEffect, .crashOnSlowQueries, .crashOnMemoryPressure:
|
case .keepChatNavigationStack, .skipReadHistory, .dustEffect, .crashOnSlowQueries, .crashOnMemoryPressure:
|
||||||
return DebugControllerSection.experiments.rawValue
|
return DebugControllerSection.experiments.rawValue
|
||||||
case .clearTips, .resetNotifications, .crash, .fillLocalSavedMessageCache, .resetDatabase, .resetDatabaseAndCache, .resetHoles, .resetTagHoles, .reindexUnread, .resetCacheIndex, .reindexCache, .resetBiometricsData, .optimizeDatabase, .photoPreview, .knockoutWallpaper, .storiesExperiment, .storiesJpegExperiment, .playlistPlayback, .enableQuickReactionSwitch, .experimentalCompatibility, .enableDebugDataDisplay, .rippleEffect, .browserExperiment, .localTranscription, .enableReactionOverrides, .restorePurchases, .disableReloginTokens, .liveStreamV2, .experimentalCallMute, .playerV2, .devRequests, .fakeAds, .enableLocalTranslation:
|
case .clearTips, .resetNotifications, .crash, .fillLocalSavedMessageCache, .resetDatabase, .resetDatabaseAndCache, .resetHoles, .resetTagHoles, .reindexUnread, .resetCacheIndex, .reindexCache, .resetBiometricsData, .optimizeDatabase, .photoPreview, .knockoutWallpaper, .storiesExperiment, .storiesJpegExperiment, .conferenceDebug, .enableQuickReactionSwitch, .experimentalCompatibility, .enableDebugDataDisplay, .rippleEffect, .browserExperiment, .localTranscription, .enableReactionOverrides, .restorePurchases, .disableReloginTokens, .liveStreamV2, .experimentalCallMute, .playerV2, .devRequests, .fakeAds, .enableLocalTranslation:
|
||||||
return DebugControllerSection.experiments.rawValue
|
return DebugControllerSection.experiments.rawValue
|
||||||
case .logTranslationRecognition, .resetTranslationStates:
|
case .logTranslationRecognition, .resetTranslationStates:
|
||||||
return DebugControllerSection.translation.rawValue
|
return DebugControllerSection.translation.rawValue
|
||||||
@ -242,7 +242,7 @@ private enum DebugControllerEntry: ItemListNodeEntry {
|
|||||||
return 47
|
return 47
|
||||||
case .disableReloginTokens:
|
case .disableReloginTokens:
|
||||||
return 48
|
return 48
|
||||||
case .playlistPlayback:
|
case .conferenceDebug:
|
||||||
return 49
|
return 49
|
||||||
case .enableQuickReactionSwitch:
|
case .enableQuickReactionSwitch:
|
||||||
return 50
|
return 50
|
||||||
@ -1308,12 +1308,12 @@ private enum DebugControllerEntry: ItemListNodeEntry {
|
|||||||
})
|
})
|
||||||
}).start()
|
}).start()
|
||||||
})
|
})
|
||||||
case let .playlistPlayback(value):
|
case let .conferenceDebug(value):
|
||||||
return ItemListSwitchItem(presentationData: presentationData, title: "Playlist Playback", value: value, sectionId: self.section, style: .blocks, updated: { value in
|
return ItemListSwitchItem(presentationData: presentationData, title: "Conference Debug", value: value, sectionId: self.section, style: .blocks, updated: { value in
|
||||||
let _ = arguments.sharedContext.accountManager.transaction ({ transaction in
|
let _ = arguments.sharedContext.accountManager.transaction ({ transaction in
|
||||||
transaction.updateSharedData(ApplicationSpecificSharedDataKeys.experimentalUISettings, { settings in
|
transaction.updateSharedData(ApplicationSpecificSharedDataKeys.experimentalUISettings, { settings in
|
||||||
var settings = settings?.get(ExperimentalUISettings.self) ?? ExperimentalUISettings.defaultSettings
|
var settings = settings?.get(ExperimentalUISettings.self) ?? ExperimentalUISettings.defaultSettings
|
||||||
settings.playlistPlayback = value
|
settings.conferenceDebug = value
|
||||||
return PreferencesEntry(settings)
|
return PreferencesEntry(settings)
|
||||||
})
|
})
|
||||||
}).start()
|
}).start()
|
||||||
@ -1540,7 +1540,7 @@ private func debugControllerEntries(sharedContext: SharedAccountContext, present
|
|||||||
entries.append(.storiesJpegExperiment(experimentalSettings.storiesJpegExperiment))
|
entries.append(.storiesJpegExperiment(experimentalSettings.storiesJpegExperiment))
|
||||||
entries.append(.disableReloginTokens(experimentalSettings.disableReloginTokens))
|
entries.append(.disableReloginTokens(experimentalSettings.disableReloginTokens))
|
||||||
}
|
}
|
||||||
entries.append(.playlistPlayback(experimentalSettings.playlistPlayback))
|
entries.append(.conferenceDebug(experimentalSettings.conferenceDebug))
|
||||||
entries.append(.enableQuickReactionSwitch(!experimentalSettings.disableQuickReaction))
|
entries.append(.enableQuickReactionSwitch(!experimentalSettings.disableQuickReaction))
|
||||||
entries.append(.liveStreamV2(experimentalSettings.liveStreamV2))
|
entries.append(.liveStreamV2(experimentalSettings.liveStreamV2))
|
||||||
entries.append(.experimentalCallMute(experimentalSettings.experimentalCallMute))
|
entries.append(.experimentalCallMute(experimentalSettings.experimentalCallMute))
|
||||||
|
@ -16,7 +16,8 @@ swift_library(
|
|||||||
"//submodules/GZip:GZip",
|
"//submodules/GZip:GZip",
|
||||||
"//submodules/rlottie:RLottieBinding",
|
"//submodules/rlottie:RLottieBinding",
|
||||||
"//submodules/AppBundle:AppBundle",
|
"//submodules/AppBundle:AppBundle",
|
||||||
"//submodules/ManagedAnimationNode:ManagedAnimationNode"
|
"//submodules/ManagedAnimationNode:ManagedAnimationNode",
|
||||||
|
"//submodules/Components/HierarchyTrackingLayer",
|
||||||
],
|
],
|
||||||
visibility = [
|
visibility = [
|
||||||
"//visibility:public",
|
"//visibility:public",
|
||||||
|
@ -6,6 +6,7 @@ import SwiftSignalKit
|
|||||||
import RLottieBinding
|
import RLottieBinding
|
||||||
import GZip
|
import GZip
|
||||||
import AppBundle
|
import AppBundle
|
||||||
|
import HierarchyTrackingLayer
|
||||||
|
|
||||||
public enum SemanticStatusNodeState: Equatable {
|
public enum SemanticStatusNodeState: Equatable {
|
||||||
public struct ProgressAppearance: Equatable {
|
public struct ProgressAppearance: Equatable {
|
||||||
@ -90,7 +91,7 @@ private func svgPath(_ path: StaticString, scale: CGPoint = CGPoint(x: 1.0, y: 1
|
|||||||
}
|
}
|
||||||
|
|
||||||
private extension SemanticStatusNodeState {
|
private extension SemanticStatusNodeState {
|
||||||
func context(current: SemanticStatusNodeStateContext?) -> SemanticStatusNodeStateContext {
|
func context(current: SemanticStatusNodeStateContext?, animated: Bool) -> SemanticStatusNodeStateContext {
|
||||||
switch self {
|
switch self {
|
||||||
case .none, .download, .play, .pause, .customIcon:
|
case .none, .download, .play, .pause, .customIcon:
|
||||||
let icon: SemanticStatusNodeIcon
|
let icon: SemanticStatusNodeIcon
|
||||||
@ -114,7 +115,7 @@ private extension SemanticStatusNodeState {
|
|||||||
if current.icon == icon {
|
if current.icon == icon {
|
||||||
return current
|
return current
|
||||||
} else if (current.icon == .play && icon == .pause) || (current.icon == .pause && icon == .play) {
|
} else if (current.icon == .play && icon == .pause) || (current.icon == .pause && icon == .play) {
|
||||||
current.icon = icon
|
current.setIcon(icon: icon, animated: animated)
|
||||||
return current
|
return current
|
||||||
} else {
|
} else {
|
||||||
return SemanticStatusNodeIconContext(icon: icon)
|
return SemanticStatusNodeIconContext(icon: icon)
|
||||||
@ -376,6 +377,8 @@ public final class SemanticStatusNode: ASControlNode {
|
|||||||
private var stateContext: SemanticStatusNodeStateContext
|
private var stateContext: SemanticStatusNodeStateContext
|
||||||
private var appearanceContext: SemanticStatusNodeAppearanceContext
|
private var appearanceContext: SemanticStatusNodeAppearanceContext
|
||||||
|
|
||||||
|
private let hierarchyTrackingLayer: HierarchyTrackingLayer
|
||||||
|
|
||||||
private var disposable: Disposable?
|
private var disposable: Disposable?
|
||||||
private var backgroundNodeImage: UIImage?
|
private var backgroundNodeImage: UIImage?
|
||||||
|
|
||||||
@ -391,13 +394,16 @@ public final class SemanticStatusNode: ASControlNode {
|
|||||||
|
|
||||||
public init(backgroundNodeColor: UIColor, foregroundNodeColor: UIColor, image: Signal<(TransformImageArguments) -> DrawingContext?, NoError>? = nil, overlayForegroundNodeColor: UIColor? = nil, cutout: CGRect? = nil) {
|
public init(backgroundNodeColor: UIColor, foregroundNodeColor: UIColor, image: Signal<(TransformImageArguments) -> DrawingContext?, NoError>? = nil, overlayForegroundNodeColor: UIColor? = nil, cutout: CGRect? = nil) {
|
||||||
self.state = .none
|
self.state = .none
|
||||||
self.stateContext = self.state.context(current: nil)
|
self.stateContext = self.state.context(current: nil, animated: false)
|
||||||
self.appearanceContext = SemanticStatusNodeAppearanceContext(background: backgroundNodeColor, foreground: foregroundNodeColor, backgroundImage: nil, overlayForeground: overlayForegroundNodeColor, cutout: cutout)
|
self.appearanceContext = SemanticStatusNodeAppearanceContext(background: backgroundNodeColor, foreground: foregroundNodeColor, backgroundImage: nil, overlayForeground: overlayForegroundNodeColor, cutout: cutout)
|
||||||
|
self.hierarchyTrackingLayer = HierarchyTrackingLayer()
|
||||||
|
|
||||||
super.init()
|
super.init()
|
||||||
|
|
||||||
|
self.layer.addSublayer(self.hierarchyTrackingLayer)
|
||||||
|
|
||||||
self.isOpaque = false
|
self.isOpaque = false
|
||||||
self.displaysAsynchronously = true
|
self.displaysAsynchronously = false
|
||||||
|
|
||||||
if let image {
|
if let image {
|
||||||
self.setBackgroundImage(image, size: CGSize(width: 44.0, height: 44.0))
|
self.setBackgroundImage(image, size: CGSize(width: 44.0, height: 44.0))
|
||||||
@ -420,7 +426,6 @@ public final class SemanticStatusNode: ASControlNode {
|
|||||||
animate = true
|
animate = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.stateContext.isAnimating {
|
if self.stateContext.isAnimating {
|
||||||
animate = true
|
animate = true
|
||||||
}
|
}
|
||||||
@ -449,12 +454,15 @@ public final class SemanticStatusNode: ASControlNode {
|
|||||||
self.hasState = true
|
self.hasState = true
|
||||||
animated = false
|
animated = false
|
||||||
}
|
}
|
||||||
|
if !self.hierarchyTrackingLayer.isInHierarchy {
|
||||||
|
animated = false
|
||||||
|
}
|
||||||
if self.state != state || self.appearanceContext.cutout != cutout {
|
if self.state != state || self.appearanceContext.cutout != cutout {
|
||||||
self.state = state
|
self.state = state
|
||||||
let previousStateContext = self.stateContext
|
let previousStateContext = self.stateContext
|
||||||
let previousAppearanceContext = updateCutout ? self.appearanceContext : nil
|
let previousAppearanceContext = updateCutout ? self.appearanceContext : nil
|
||||||
|
|
||||||
self.stateContext = self.state.context(current: self.stateContext)
|
self.stateContext = self.state.context(current: self.stateContext, animated: animated)
|
||||||
self.stateContext.requestUpdate = { [weak self] in
|
self.stateContext.requestUpdate = { [weak self] in
|
||||||
self?.setNeedsDisplay()
|
self?.setNeedsDisplay()
|
||||||
}
|
}
|
||||||
|
@ -131,11 +131,7 @@ final class SemanticStatusNodeIconContext: SemanticStatusNodeStateContext {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var icon: SemanticStatusNodeIcon {
|
private(set) var icon: SemanticStatusNodeIcon
|
||||||
didSet {
|
|
||||||
self.animationNode?.enqueueState(self.icon == .play ? .play : .pause, animated: self.iconImage != nil)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private var animationNode: PlayPauseIconNode?
|
private var animationNode: PlayPauseIconNode?
|
||||||
private var iconImage: UIImage?
|
private var iconImage: UIImage?
|
||||||
@ -171,6 +167,11 @@ final class SemanticStatusNodeIconContext: SemanticStatusNodeStateContext {
|
|||||||
|
|
||||||
var requestUpdate: () -> Void = {}
|
var requestUpdate: () -> Void = {}
|
||||||
|
|
||||||
|
func setIcon(icon: SemanticStatusNodeIcon, animated: Bool) {
|
||||||
|
self.icon = icon
|
||||||
|
self.animationNode?.enqueueState(self.icon == .play ? .play : .pause, animated: animated)
|
||||||
|
}
|
||||||
|
|
||||||
func drawingState(transitionFraction: CGFloat) -> SemanticStatusNodeStateDrawingState {
|
func drawingState(transitionFraction: CGFloat) -> SemanticStatusNodeStateDrawingState {
|
||||||
return DrawingState(transitionFraction: transitionFraction, icon: self.icon, iconImage: self.iconImage, iconOffset: self.iconOffset)
|
return DrawingState(transitionFraction: transitionFraction, icon: self.icon, iconImage: self.iconImage, iconOffset: self.iconOffset)
|
||||||
}
|
}
|
||||||
|
@ -167,6 +167,14 @@ final class CallControllerNodeV2: ViewControllerTracingNode, CallControllerNodeP
|
|||||||
self.conferenceAddParticipant?()
|
self.conferenceAddParticipant?()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var isConferencePossible = false
|
||||||
|
if self.call.context.sharedContext.immediateExperimentalUISettings.conferenceDebug {
|
||||||
|
isConferencePossible = true
|
||||||
|
}
|
||||||
|
if let data = self.call.context.currentAppConfiguration.with({ $0 }).data, let value = data["ios_enable_conference"] as? Double {
|
||||||
|
isConferencePossible = value != 0.0
|
||||||
|
}
|
||||||
|
|
||||||
self.callScreenState = PrivateCallScreen.State(
|
self.callScreenState = PrivateCallScreen.State(
|
||||||
strings: presentationData.strings,
|
strings: presentationData.strings,
|
||||||
lifecycleState: .connecting,
|
lifecycleState: .connecting,
|
||||||
@ -180,7 +188,7 @@ final class CallControllerNodeV2: ViewControllerTracingNode, CallControllerNodeP
|
|||||||
remoteVideo: nil,
|
remoteVideo: nil,
|
||||||
isRemoteBatteryLow: false,
|
isRemoteBatteryLow: false,
|
||||||
isEnergySavingEnabled: !self.sharedContext.energyUsageSettings.fullTranslucency,
|
isEnergySavingEnabled: !self.sharedContext.energyUsageSettings.fullTranslucency,
|
||||||
isConferencePossible: true
|
isConferencePossible: isConferencePossible
|
||||||
)
|
)
|
||||||
|
|
||||||
self.isMicrophoneMutedDisposable = (call.isMuted
|
self.isMicrophoneMutedDisposable = (call.isMuted
|
||||||
|
@ -153,7 +153,6 @@ public final class BatchVideoRenderingContext {
|
|||||||
for (id, targetContext) in self.targetContexts {
|
for (id, targetContext) in self.targetContexts {
|
||||||
if targetContext.target != nil {
|
if targetContext.target != nil {
|
||||||
if targetContext.fetchDisposable == nil {
|
if targetContext.fetchDisposable == nil {
|
||||||
//TODO:release pass resource reference
|
|
||||||
targetContext.fetchDisposable = fetchedMediaResource(
|
targetContext.fetchDisposable = fetchedMediaResource(
|
||||||
mediaBox: self.context.account.postbox.mediaBox,
|
mediaBox: self.context.account.postbox.mediaBox,
|
||||||
userLocation: targetContext.userLocation,
|
userLocation: targetContext.userLocation,
|
||||||
|
@ -43,6 +43,7 @@ swift_library(
|
|||||||
"//submodules/TelegramUI/Components/Chat/ChatMessageItemCommon",
|
"//submodules/TelegramUI/Components/Chat/ChatMessageItemCommon",
|
||||||
"//submodules/AnimatedCountLabelNode",
|
"//submodules/AnimatedCountLabelNode",
|
||||||
"//submodules/AudioWaveform",
|
"//submodules/AudioWaveform",
|
||||||
|
"//submodules/DeviceProximity",
|
||||||
],
|
],
|
||||||
visibility = [
|
visibility = [
|
||||||
"//visibility:public",
|
"//visibility:public",
|
||||||
|
@ -34,6 +34,7 @@ import ChatMessageItemCommon
|
|||||||
import TelegramStringFormatting
|
import TelegramStringFormatting
|
||||||
import AnimatedCountLabelNode
|
import AnimatedCountLabelNode
|
||||||
import AudioWaveform
|
import AudioWaveform
|
||||||
|
import DeviceProximity
|
||||||
|
|
||||||
private struct FetchControls {
|
private struct FetchControls {
|
||||||
let fetch: (Bool) -> Void
|
let fetch: (Bool) -> Void
|
||||||
@ -1561,6 +1562,12 @@ public final class ChatMessageInteractiveFileNode: ASDisplayNode {
|
|||||||
guard let arguments = self.arguments else {
|
guard let arguments = self.arguments else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var animated = animated
|
||||||
|
if DeviceProximityManager.shared().currentValue() {
|
||||||
|
animated = false
|
||||||
|
}
|
||||||
|
|
||||||
let incoming = message.effectivelyIncoming(context.account.peerId)
|
let incoming = message.effectivelyIncoming(context.account.peerId)
|
||||||
let messageTheme = incoming ? presentationData.theme.theme.chat.message.incoming : presentationData.theme.theme.chat.message.outgoing
|
let messageTheme = incoming ? presentationData.theme.theme.chat.message.incoming : presentationData.theme.theme.chat.message.outgoing
|
||||||
|
|
||||||
|
@ -54,7 +54,10 @@ final class PeerInfoHeaderNavigationButtonContainerNode: SparseNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var accumulatedRightButtonOffset: CGFloat = canBeExpanded ? 16.0 : 0.0
|
var accumulatedRightButtonOffset: CGFloat = canBeExpanded ? 16.0 : 0.0
|
||||||
for (_, button) in self.rightButtonNodes {
|
for spec in self.currentRightButtons.reversed() {
|
||||||
|
guard let button = self.rightButtonNodes[spec.key] else {
|
||||||
|
continue
|
||||||
|
}
|
||||||
button.updateContentsColor(backgroundColor: self.backgroundContentColor, contentsColor: self.contentsColor, canBeExpanded: canBeExpanded, transition: transition)
|
button.updateContentsColor(backgroundColor: self.backgroundContentColor, contentsColor: self.contentsColor, canBeExpanded: canBeExpanded, transition: transition)
|
||||||
transition.updateSublayerTransformOffset(layer: button.layer, offset: CGPoint(x: accumulatedRightButtonOffset, y: 0.0))
|
transition.updateSublayerTransformOffset(layer: button.layer, offset: CGPoint(x: accumulatedRightButtonOffset, y: 0.0))
|
||||||
if self.backgroundContentColor.alpha != 0.0 {
|
if self.backgroundContentColor.alpha != 0.0 {
|
||||||
@ -174,6 +177,7 @@ final class PeerInfoHeaderNavigationButtonContainerNode: SparseNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var accumulatedRightButtonOffset: CGFloat = self.canBeExpanded ? 16.0 : 0.0
|
||||||
if self.currentRightButtons != rightButtons || presentationData.strings !== self.presentationData?.strings {
|
if self.currentRightButtons != rightButtons || presentationData.strings !== self.presentationData?.strings {
|
||||||
self.currentRightButtons = rightButtons
|
self.currentRightButtons = rightButtons
|
||||||
|
|
||||||
@ -225,7 +229,10 @@ final class PeerInfoHeaderNavigationButtonContainerNode: SparseNode {
|
|||||||
buttonNode.alpha = 0.0
|
buttonNode.alpha = 0.0
|
||||||
transition.updateAlpha(node: buttonNode, alpha: alphaFactor * alphaFactor)
|
transition.updateAlpha(node: buttonNode, alpha: alphaFactor * alphaFactor)
|
||||||
|
|
||||||
transition.updateSublayerTransformOffset(layer: buttonNode.layer, offset: CGPoint(x: canBeExpanded ? 16.0 : 0.0, y: 0.0))
|
transition.updateSublayerTransformOffset(layer: buttonNode.layer, offset: CGPoint(x: accumulatedRightButtonOffset, y: 0.0))
|
||||||
|
if self.backgroundContentColor.alpha != 0.0 {
|
||||||
|
accumulatedRightButtonOffset -= 6.0
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
transition.updateFrameAdditiveToCenter(node: buttonNode, frame: buttonFrame)
|
transition.updateFrameAdditiveToCenter(node: buttonNode, frame: buttonFrame)
|
||||||
transition.updateAlpha(node: buttonNode, alpha: alphaFactor * alphaFactor)
|
transition.updateAlpha(node: buttonNode, alpha: alphaFactor * alphaFactor)
|
||||||
|
@ -32,7 +32,6 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
|||||||
public var knockoutWallpaper: Bool
|
public var knockoutWallpaper: Bool
|
||||||
public var foldersTabAtBottom: Bool
|
public var foldersTabAtBottom: Bool
|
||||||
public var playerEmbedding: Bool
|
public var playerEmbedding: Bool
|
||||||
public var playlistPlayback: Bool
|
|
||||||
public var preferredVideoCodec: String?
|
public var preferredVideoCodec: String?
|
||||||
public var disableVideoAspectScaling: Bool
|
public var disableVideoAspectScaling: Bool
|
||||||
public var enableVoipTcp: Bool
|
public var enableVoipTcp: Bool
|
||||||
@ -65,6 +64,7 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
|||||||
public var playerV2: Bool
|
public var playerV2: Bool
|
||||||
public var devRequests: Bool
|
public var devRequests: Bool
|
||||||
public var fakeAds: Bool
|
public var fakeAds: Bool
|
||||||
|
public var conferenceDebug: Bool
|
||||||
|
|
||||||
public static var defaultSettings: ExperimentalUISettings {
|
public static var defaultSettings: ExperimentalUISettings {
|
||||||
return ExperimentalUISettings(
|
return ExperimentalUISettings(
|
||||||
@ -75,7 +75,6 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
|||||||
knockoutWallpaper: false,
|
knockoutWallpaper: false,
|
||||||
foldersTabAtBottom: false,
|
foldersTabAtBottom: false,
|
||||||
playerEmbedding: false,
|
playerEmbedding: false,
|
||||||
playlistPlayback: false,
|
|
||||||
preferredVideoCodec: nil,
|
preferredVideoCodec: nil,
|
||||||
disableVideoAspectScaling: false,
|
disableVideoAspectScaling: false,
|
||||||
enableVoipTcp: false,
|
enableVoipTcp: false,
|
||||||
@ -107,7 +106,8 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
|||||||
autoBenchmarkReflectors: nil,
|
autoBenchmarkReflectors: nil,
|
||||||
playerV2: false,
|
playerV2: false,
|
||||||
devRequests: false,
|
devRequests: false,
|
||||||
fakeAds: false
|
fakeAds: false,
|
||||||
|
conferenceDebug: false
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,7 +119,6 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
|||||||
knockoutWallpaper: Bool,
|
knockoutWallpaper: Bool,
|
||||||
foldersTabAtBottom: Bool,
|
foldersTabAtBottom: Bool,
|
||||||
playerEmbedding: Bool,
|
playerEmbedding: Bool,
|
||||||
playlistPlayback: Bool,
|
|
||||||
preferredVideoCodec: String?,
|
preferredVideoCodec: String?,
|
||||||
disableVideoAspectScaling: Bool,
|
disableVideoAspectScaling: Bool,
|
||||||
enableVoipTcp: Bool,
|
enableVoipTcp: Bool,
|
||||||
@ -151,7 +150,8 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
|||||||
autoBenchmarkReflectors: Bool?,
|
autoBenchmarkReflectors: Bool?,
|
||||||
playerV2: Bool,
|
playerV2: Bool,
|
||||||
devRequests: Bool,
|
devRequests: Bool,
|
||||||
fakeAds: Bool
|
fakeAds: Bool,
|
||||||
|
conferenceDebug: Bool
|
||||||
) {
|
) {
|
||||||
self.keepChatNavigationStack = keepChatNavigationStack
|
self.keepChatNavigationStack = keepChatNavigationStack
|
||||||
self.skipReadHistory = skipReadHistory
|
self.skipReadHistory = skipReadHistory
|
||||||
@ -160,7 +160,6 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
|||||||
self.knockoutWallpaper = knockoutWallpaper
|
self.knockoutWallpaper = knockoutWallpaper
|
||||||
self.foldersTabAtBottom = foldersTabAtBottom
|
self.foldersTabAtBottom = foldersTabAtBottom
|
||||||
self.playerEmbedding = playerEmbedding
|
self.playerEmbedding = playerEmbedding
|
||||||
self.playlistPlayback = playlistPlayback
|
|
||||||
self.preferredVideoCodec = preferredVideoCodec
|
self.preferredVideoCodec = preferredVideoCodec
|
||||||
self.disableVideoAspectScaling = disableVideoAspectScaling
|
self.disableVideoAspectScaling = disableVideoAspectScaling
|
||||||
self.enableVoipTcp = enableVoipTcp
|
self.enableVoipTcp = enableVoipTcp
|
||||||
@ -193,6 +192,7 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
|||||||
self.playerV2 = playerV2
|
self.playerV2 = playerV2
|
||||||
self.devRequests = devRequests
|
self.devRequests = devRequests
|
||||||
self.fakeAds = fakeAds
|
self.fakeAds = fakeAds
|
||||||
|
self.conferenceDebug = conferenceDebug
|
||||||
}
|
}
|
||||||
|
|
||||||
public init(from decoder: Decoder) throws {
|
public init(from decoder: Decoder) throws {
|
||||||
@ -205,7 +205,6 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
|||||||
self.knockoutWallpaper = (try container.decodeIfPresent(Int32.self, forKey: "knockoutWallpaper") ?? 0) != 0
|
self.knockoutWallpaper = (try container.decodeIfPresent(Int32.self, forKey: "knockoutWallpaper") ?? 0) != 0
|
||||||
self.foldersTabAtBottom = (try container.decodeIfPresent(Int32.self, forKey: "foldersTabAtBottom") ?? 0) != 0
|
self.foldersTabAtBottom = (try container.decodeIfPresent(Int32.self, forKey: "foldersTabAtBottom") ?? 0) != 0
|
||||||
self.playerEmbedding = (try container.decodeIfPresent(Int32.self, forKey: "playerEmbedding") ?? 0) != 0
|
self.playerEmbedding = (try container.decodeIfPresent(Int32.self, forKey: "playerEmbedding") ?? 0) != 0
|
||||||
self.playlistPlayback = (try container.decodeIfPresent(Int32.self, forKey: "playlistPlayback") ?? 0) != 0
|
|
||||||
self.preferredVideoCodec = try container.decodeIfPresent(String.self.self, forKey: "preferredVideoCodec")
|
self.preferredVideoCodec = try container.decodeIfPresent(String.self.self, forKey: "preferredVideoCodec")
|
||||||
self.disableVideoAspectScaling = (try container.decodeIfPresent(Int32.self, forKey: "disableVideoAspectScaling") ?? 0) != 0
|
self.disableVideoAspectScaling = (try container.decodeIfPresent(Int32.self, forKey: "disableVideoAspectScaling") ?? 0) != 0
|
||||||
self.enableVoipTcp = (try container.decodeIfPresent(Int32.self, forKey: "enableVoipTcp") ?? 0) != 0
|
self.enableVoipTcp = (try container.decodeIfPresent(Int32.self, forKey: "enableVoipTcp") ?? 0) != 0
|
||||||
@ -238,6 +237,7 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
|||||||
self.playerV2 = try container.decodeIfPresent(Bool.self, forKey: "playerV2") ?? false
|
self.playerV2 = try container.decodeIfPresent(Bool.self, forKey: "playerV2") ?? false
|
||||||
self.devRequests = try container.decodeIfPresent(Bool.self, forKey: "devRequests") ?? false
|
self.devRequests = try container.decodeIfPresent(Bool.self, forKey: "devRequests") ?? false
|
||||||
self.fakeAds = try container.decodeIfPresent(Bool.self, forKey: "fakeAds") ?? false
|
self.fakeAds = try container.decodeIfPresent(Bool.self, forKey: "fakeAds") ?? false
|
||||||
|
self.conferenceDebug = try container.decodeIfPresent(Bool.self, forKey: "conferenceDebug") ?? false
|
||||||
}
|
}
|
||||||
|
|
||||||
public func encode(to encoder: Encoder) throws {
|
public func encode(to encoder: Encoder) throws {
|
||||||
@ -250,7 +250,6 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
|||||||
try container.encode((self.knockoutWallpaper ? 1 : 0) as Int32, forKey: "knockoutWallpaper")
|
try container.encode((self.knockoutWallpaper ? 1 : 0) as Int32, forKey: "knockoutWallpaper")
|
||||||
try container.encode((self.foldersTabAtBottom ? 1 : 0) as Int32, forKey: "foldersTabAtBottom")
|
try container.encode((self.foldersTabAtBottom ? 1 : 0) as Int32, forKey: "foldersTabAtBottom")
|
||||||
try container.encode((self.playerEmbedding ? 1 : 0) as Int32, forKey: "playerEmbedding")
|
try container.encode((self.playerEmbedding ? 1 : 0) as Int32, forKey: "playerEmbedding")
|
||||||
try container.encode((self.playlistPlayback ? 1 : 0) as Int32, forKey: "playlistPlayback")
|
|
||||||
try container.encodeIfPresent(self.preferredVideoCodec, forKey: "preferredVideoCodec")
|
try container.encodeIfPresent(self.preferredVideoCodec, forKey: "preferredVideoCodec")
|
||||||
try container.encode((self.disableVideoAspectScaling ? 1 : 0) as Int32, forKey: "disableVideoAspectScaling")
|
try container.encode((self.disableVideoAspectScaling ? 1 : 0) as Int32, forKey: "disableVideoAspectScaling")
|
||||||
try container.encode((self.enableVoipTcp ? 1 : 0) as Int32, forKey: "enableVoipTcp")
|
try container.encode((self.enableVoipTcp ? 1 : 0) as Int32, forKey: "enableVoipTcp")
|
||||||
@ -283,6 +282,7 @@ public struct ExperimentalUISettings: Codable, Equatable {
|
|||||||
try container.encodeIfPresent(self.playerV2, forKey: "playerV2")
|
try container.encodeIfPresent(self.playerV2, forKey: "playerV2")
|
||||||
try container.encodeIfPresent(self.devRequests, forKey: "devRequests")
|
try container.encodeIfPresent(self.devRequests, forKey: "devRequests")
|
||||||
try container.encodeIfPresent(self.fakeAds, forKey: "fakeAds")
|
try container.encodeIfPresent(self.fakeAds, forKey: "fakeAds")
|
||||||
|
try container.encodeIfPresent(self.conferenceDebug, forKey: "conferenceDebug")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user