From f60bebffcd2c85b0231bd9b2a9c359b0ef760ec2 Mon Sep 17 00:00:00 2001 From: Akring Date: Tue, 19 Sep 2023 11:34:32 +0800 Subject: [PATCH] feat: add AppStore redirection --- Sources/AppLibrary/SettingAppItemCell.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Sources/AppLibrary/SettingAppItemCell.swift b/Sources/AppLibrary/SettingAppItemCell.swift index 74356e8..b80ad05 100644 --- a/Sources/AppLibrary/SettingAppItemCell.swift +++ b/Sources/AppLibrary/SettingAppItemCell.swift @@ -8,6 +8,9 @@ import SwiftUI public struct SettingAppItemCell: View { + + @Environment(\.openURL) var openURL + public var meta: AppMetaData public init(meta: AppMetaData) { @@ -30,6 +33,10 @@ public struct SettingAppItemCell: View { } } .padding(.vertical, 8) + .contentShape(Rectangle()) + .onTapGesture { + openURL(URL(string: meta.storeURL())!) + } } }