Преглед изворни кода

Remove Share App from settings to simplify the page.

Rate App stays in the About section for premium users.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 пре 3 недеља
родитељ
комит
97f8879325

+ 0 - 5
App AI for Reddit/Utilities/AppLinks.swift

@@ -8,10 +8,5 @@ enum AppLinks {
     static let terms = URL(string: "https://sites.google.com/view/appforreddit/terms-and-condition")!
     static let support = URL(string: "https://sites.google.com/view/appforreddit/get-support")!
     static let appStoreID = "6785831537"
-    static let appStore = URL(string: "https://apps.apple.com/app/id\(appStoreID)")!
     static let appStoreWriteReview = URL(string: "https://apps.apple.com/app/id\(appStoreID)?action=write-review")!
-
-    static var shareMessage: String {
-        "Check out \(appName) — AI-powered tools for Reddit posts, titles, and comments."
-    }
 }

+ 0 - 3
App AI for Reddit/ViewModels/SettingsViewModel.swift

@@ -4,9 +4,6 @@ import Foundation
 @MainActor
 @Observable
 final class SettingsViewModel {
-    let shareMessage = AppLinks.shareMessage
-    let shareURL = AppLinks.appStore
-
     func openWebsite() {
         open(AppLinks.website)
     }

+ 0 - 47
App AI for Reddit/Views/Components/SettingsComponents.swift

@@ -1,52 +1,5 @@
 import SwiftUI
 
-struct SettingsShareAppButton: View {
-    let message: String
-    let url: URL
-
-    var body: some View {
-        ShareLink(item: url, message: Text(message)) {
-            HStack(spacing: 14) {
-                Image(systemName: "square.and.arrow.up")
-                    .font(.system(size: 16, weight: .semibold))
-                    .foregroundStyle(.white)
-                    .frame(width: 40, height: 40)
-                    .background(
-                        RoundedRectangle(cornerRadius: 10)
-                            .fill(AppTheme.accentPurple)
-                    )
-
-                VStack(alignment: .leading, spacing: 2) {
-                    Text("Share App")
-                        .font(.system(size: 14, weight: .semibold))
-                        .foregroundStyle(AppTheme.textPrimary)
-                    Text("Tell friends about \(AppLinks.appName)")
-                        .font(.system(size: 11))
-                        .foregroundStyle(AppTheme.textSecondary)
-                }
-
-                Spacer()
-
-                Image(systemName: "chevron.right")
-                    .font(.system(size: 11, weight: .semibold))
-                    .foregroundStyle(AppTheme.textTertiary)
-            }
-            .padding(14)
-            .background(
-                RoundedRectangle(cornerRadius: AppTheme.cornerRadiusSmall)
-                    .fill(AppTheme.cardBackground)
-                    .overlay(
-                        RoundedRectangle(cornerRadius: AppTheme.cornerRadiusSmall)
-                            .stroke(AppTheme.accentPurple.opacity(0.35), lineWidth: 1)
-                    )
-            )
-        }
-        .buttonStyle(AppPlainButtonStyle())
-        .hoverCard(cornerRadius: AppTheme.cornerRadiusSmall)
-        .frame(maxWidth: .infinity, alignment: .leading)
-    }
-}
-
 struct SettingsToggleRow: View {
     let icon: String
     let title: String

+ 3 - 18
App AI for Reddit/Views/SettingsView.swift

@@ -17,7 +17,6 @@ struct SettingsView: View {
             ScrollView {
                 VStack(alignment: .leading, spacing: 12) {
                     appearanceSection
-                    shareSection
                     linksSection
                 }
                 .frame(maxWidth: .infinity, alignment: .leading)
@@ -69,17 +68,12 @@ struct SettingsView: View {
         }
     }
 
-    private var shareSection: some View {
+    private var linksSection: some View {
         PostFormCard(
-            title: "Share",
-            subtitle: "Spread the word about \(AppLinks.appName)"
+            title: "About",
+            subtitle: "Website, legal, and help resources"
         ) {
             VStack(spacing: 8) {
-                SettingsShareAppButton(
-                    message: viewModel.shareMessage,
-                    url: viewModel.shareURL
-                )
-
                 if subscriptions.hasPremiumAccess {
                     SettingsLinkRow(
                         icon: "star.fill",
@@ -89,16 +83,7 @@ struct SettingsView: View {
                         appRating.requestReviewFromSettings()
                     }
                 }
-            }
-        }
-    }
 
-    private var linksSection: some View {
-        PostFormCard(
-            title: "About",
-            subtitle: "Website, legal, and help resources"
-        ) {
-            VStack(spacing: 8) {
                 SettingsLinkRow(
                     icon: "globe",
                     title: "Website",