Skip to content

Commit 0ae679f

Browse files
authored
Update ViewDebug (#180)
* Update EnvironmentHelper * Update View documentation * Fix animationsDisabled * Update ViewDebug * Update ViewDebug serialize data
1 parent bbf40ef commit 0ae679f

File tree

8 files changed

+308
-173
lines changed

8 files changed

+308
-173
lines changed

Sources/OpenSwiftUI/App/AppGraph.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ package final class AppGraph: GraphHost {
2626
}
2727

2828
private lazy var launchProfileOptions = LaunchProfileOptions(
29-
rawValue: EnvironmentHelper.int32(for: "OPENSWIFTUI_PROFILE_LAUNCH")
29+
rawValue: EnvironmentHelper.int32(for: "OPENSWIFTUI_PROFILE_LAUNCH") ?? 0
3030
)
3131

3232
var didCollectLaunchProfile: Bool = false

Sources/OpenSwiftUICore/Graph/GraphInputs.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public struct _GraphInputs {
144144

145145
package var animationsDisabled: Bool {
146146
get { options.contains(.animationsDisabled) }
147-
set { options.formUnion(.animationsDisabled) }
147+
set { options.setValue(newValue, for: .animationsDisabled) }
148148
}
149149

150150
package var needsStableDisplayListIDs: Bool {

Sources/OpenSwiftUICore/Util/EnvironmentHelper.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ import WASILibc
1717

1818
package enum EnvironmentHelper {
1919
@_transparent
20-
package static func int32(for key: String) -> Int32 {
20+
package static func int32(for key: String) -> Int32? {
2121
key.withCString { string in
2222
guard let env = getenv(string) else {
23-
return 0
23+
return nil
2424
}
2525
return atoi(env)
2626
}

0 commit comments

Comments
 (0)