Network check if troubleshooting is opened

This commit is contained in:
Leon Böttger committed 2025-05-16 11:39:44 +02:00
1 parent 3522a64955
commit 0115a6453e
3 files changed
+12 -10

No files matched your search

+10 -6
View File
@@ -13,7 +13,8 @@ struct WelcomeScreen: View {
@AppStorage(UserDefaultsKeys.plusVersion.rawValue) var isPlusVersion = false
@Environment(\.colorScheme) var colorScheme
let openIAP: () -> Void
let openPlusScreen: () -> Void
let checkForNetworkIssues: () -> Void
@State private var selection: Tabs? = Tabs.receive
@@ -85,16 +86,19 @@ struct WelcomeScreen: View {
switch selection {
case .receive:
TutorialView(title: "WelcomeToQuickDrop", text: "UserManualDescription", showsLicense: true, openIAP: openIAP)
TutorialView(title: "WelcomeToQuickDrop", text: "UserManualDescription", showsLicense: true, openIAP: openPlusScreen)
case .send:
TutorialView(title: "SendFiles", text: "SendFilesDescription", showsLicense: false, openIAP: openIAP)
TutorialView(title: "SendFiles", text: "SendFilesDescription", showsLicense: false, openIAP: openPlusScreen)
case .troubleshooting:
TutorialView(title: "Troubleshooting", text: "TroubleshootingDescription", showsLicense: false, openIAP: openIAP)
TutorialView(title: "Troubleshooting", text: "TroubleshootingDescription", showsLicense: false, openIAP: openPlusScreen)
.onAppear {
checkForNetworkIssues()
}
case .app:
TutorialView(title: "AndroidApp", text: "AndroidAppDescription", showsLicense: false, showsBetaJoinButton: true, openIAP: openIAP)
TutorialView(title: "AndroidApp", text: "AndroidAppDescription", showsLicense: false, showsBetaJoinButton: true, openIAP: openPlusScreen)
default:
SettingsView()
@@ -158,5 +162,5 @@ enum Tabs: CaseIterable {
#Preview {
WelcomeScreen(openIAP: {})
WelcomeScreen(openPlusScreen: {}, checkForNetworkIssues: {})
}