Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the onChange(of:perform:) deprecation warnings #41

Open
serge-ivamov opened this issue Oct 9, 2024 · 0 comments
Open

Fix the onChange(of:perform:) deprecation warnings #41

serge-ivamov opened this issue Oct 9, 2024 · 0 comments

Comments

@serge-ivamov
Copy link

Split.swift:

*** Split.swift-old	2024-10-09 14:50:59.622048883 +0400
--- Split.swift-new	2024-10-09 16:00:36.372341071 +0400
***************
*** 99,105 ****
              }
              .clipped()  // Can cause problems in some List styles if not clipped
              .environmentObject(layout)
!             .onChange(of: fraction.value) { new in constrainedFraction = new }
          }
      }
  
--- 99,105 ----
              }
              .clipped()  // Can cause problems in some List styles if not clipped
              .environmentObject(layout)
!             .onChange(of: fraction.value) { constrainedFraction = fraction.value }
          }
      }

Splitter.swift:

*** Splitter.swift-old	2024-10-09 14:50:59.624959091 +0400
--- Splitter.swift-new	2024-10-09 16:00:42.523829954 +0400
***************
*** 68,75 ****
          // hidden when the side is hidden (styling.hideSplitter is true), then set the
          // splitter color to clear. When the splitter is actually hidden, it doesn't even
          // exist, but when previewing it does, so we have to make it invisible this way.
!         .onChange(of: styling.previewHide) { hide in
!             if hide {
                  dividerColor = styling.hideSplitter ? .clear : privateColor ?? color
              } else {
                  dividerColor = privateColor ?? color
--- 68,75 ----
          // hidden when the side is hidden (styling.hideSplitter is true), then set the
          // splitter color to clear. When the splitter is actually hidden, it doesn't even
          // exist, but when previewing it does, so we have to make it invisible this way.
!         .onChange(of: styling.previewHide) {
!             if styling.previewHide {
                  dividerColor = styling.hideSplitter ? .clear : privateColor ?? color
              } else {
                  dividerColor = privateColor ?? color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant