From 8f516c76a0ab3d165a1bad0c996c983b9f13e1ae Mon Sep 17 00:00:00 2001 From: patricioxavier8 <116120453+patricioxavier8@users.noreply.github.com> Date: Tue, 30 Dec 2025 15:00:11 -0500 Subject: [PATCH] fix: remove if available option --- InternxtDesktop/Views/UIKit/AppTextArea.swift | 24 +++++-------------- .../Views/Widget/SettingsMenuView.swift | 10 ++------ 2 files changed, 8 insertions(+), 26 deletions(-) diff --git a/InternxtDesktop/Views/UIKit/AppTextArea.swift b/InternxtDesktop/Views/UIKit/AppTextArea.swift index 251e20d9..4b1c65e7 100644 --- a/InternxtDesktop/Views/UIKit/AppTextArea.swift +++ b/InternxtDesktop/Views/UIKit/AppTextArea.swift @@ -27,25 +27,13 @@ struct AppTextArea: View { .frame(maxWidth: .infinity) .padding(.vertical, 10) .padding(.horizontal, 12) - .ifAvailable { - if #available(macOS 13.0, *) { - $0.scrollDisabled(true).scrollContentBackground(.hidden) - } + .scrollDisabled(true) + .scrollContentBackground(.hidden) + .overlay { + RoundedRectangle(cornerRadius: 8) + .stroke(Color.Gray40, lineWidth: 1) + .zIndex(5) } - .ifAvailable{view in - if #available(macOS 12.0, *) { - view.overlay{ - RoundedRectangle(cornerRadius: 8) - .stroke(Color.Gray40, lineWidth: 1) - .zIndex(5) - } - } else { - view.overlay(RoundedRectangle(cornerRadius: 8) - .stroke(Color.Gray40, lineWidth: 1) - .zIndex(5), alignment: .topLeading) - } - } - } } } diff --git a/InternxtDesktop/Views/Widget/SettingsMenuView.swift b/InternxtDesktop/Views/Widget/SettingsMenuView.swift index 24195d91..c00d2128 100644 --- a/InternxtDesktop/Views/Widget/SettingsMenuView.swift +++ b/InternxtDesktop/Views/Widget/SettingsMenuView.swift @@ -46,14 +46,8 @@ struct SettingsMenuView: View { } .padding(.vertical, 6).ifAvailable{view in - if #available(macOS 12, *) { - view.overlay{ - RoundedRectangle(cornerRadius: 8).stroke(Color.Gray20, lineWidth: 1) - } - } else { - view.overlay( - RoundedRectangle(cornerRadius: 8).stroke(Color.Gray20, lineWidth: 1) - , alignment: .top) + view.overlay{ + RoundedRectangle(cornerRadius: 8).stroke(Color.Gray20, lineWidth: 1) } }