From 57a6e36c7632587123601a905b3ecc84a3d152fc Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Wed, 7 Aug 2024 21:13:58 +0200 Subject: [PATCH] Merge branch 'iOS-18' + fixes --- .../Account/AccountDetailViewModel.swift | 2 +- .../PremiumAcccountSubsciptionSheetView.swift | 21 +++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Packages/Account/Sources/Account/AccountDetailViewModel.swift b/Packages/Account/Sources/Account/AccountDetailViewModel.swift index ae2b0532..41695c8e 100644 --- a/Packages/Account/Sources/Account/AccountDetailViewModel.swift +++ b/Packages/Account/Sources/Account/AccountDetailViewModel.swift @@ -327,7 +327,7 @@ extension AccountDetailViewModel { private func fetchPremiumAccount(fromAccount: Account, client: Client) async throws { if fromAccount.isLinkedToPremiumAccount, let acct = fromAccount.premiumAcct { let results: SearchResults? = try await client.get(endpoint: Search.search(query: acct, - type: "accounts", + type: .accounts, offset: nil, following: nil), forceVersion: .v2) diff --git a/Packages/Account/Sources/Account/Tip/PremiumAcccountSubsciptionSheetView.swift b/Packages/Account/Sources/Account/Tip/PremiumAcccountSubsciptionSheetView.swift index 4408d884..6b63cca3 100644 --- a/Packages/Account/Sources/Account/Tip/PremiumAcccountSubsciptionSheetView.swift +++ b/Packages/Account/Sources/Account/Tip/PremiumAcccountSubsciptionSheetView.swift @@ -95,21 +95,20 @@ struct PremiumAcccountSubsciptionSheetView: View { Spacer() if isSubscibeSelected { - HStack(alignment: .top) { - Text("Subscribe") - .font(.headline) - .fontWeight(.bold) - } - .transition(.push(from: .bottom)) - .frame(height: 50) - .frame(maxWidth: .infinity) - .background(theme.tintColor.opacity(0.5)) - .onTapGesture { + Button { withAnimation { state = .preparing } + } label: { + Text("Subscribe") + .font(.headline) + .fontWeight(.bold) + .frame(maxWidth: .infinity) + .frame(height: 40) } - .ignoresSafeArea() + .buttonStyle(.borderedProminent) + .padding(.horizontal, 16) + .padding(.bottom, 38) } }