From cbf6e6fd1bf0025df10ba951db9194e08d347c1f Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 22 Sep 2025 18:12:13 -0700 Subject: [PATCH] Use new AccountManager.shared.hasiCloudAccount instead of local code. --- Mac/Preferences/Accounts/AddAccountsView.swift | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Mac/Preferences/Accounts/AddAccountsView.swift b/Mac/Preferences/Accounts/AddAccountsView.swift index c8a496ad2..fd91b2e90 100644 --- a/Mac/Preferences/Accounts/AddAccountsView.swift +++ b/Mac/Preferences/Accounts/AddAccountsView.swift @@ -204,8 +204,8 @@ struct AddAccountsView: View { }) }) .offset(x: 7.5, y: 0) - .disabled(isCloudInUse()) - + .disabled(AccountManager.shared.hasiCloudAccount) + Text(AddAccountSections.icloud.sectionFooter).foregroundColor(.gray) .padding(.horizontal) .lineLimit(3) @@ -280,15 +280,10 @@ struct AddAccountsView: View { .fixedSize(horizontal: false, vertical: true) } } - - private func isCloudInUse() -> Bool { - AccountManager.shared.accounts.contains(where: { $0.type == .cloudKit }) - } - + private func chunkedWebAccounts() -> [[AccountType]] { AddAccountSections.web.sectionContent.chunked(into: chunkLimit) } - }