From e618cc48e5791340244732c7888727ef26747416 Mon Sep 17 00:00:00 2001 From: Lukas Korba Date: Wed, 23 Feb 2022 18:51:18 +0100 Subject: [PATCH] Generator moved I decided to also follow the Pastboard dependency and get rid of the specific file just for the generator. --- secant.xcodeproj/project.pbxproj | 4 ---- .../BackupFlow/FeedbackGenerator.swift | 22 ------------------- .../RecoveryPhraseDisplayStore.swift | 14 ++++++++++++ 3 files changed, 14 insertions(+), 26 deletions(-) delete mode 100644 secant/Features/BackupFlow/FeedbackGenerator.swift diff --git a/secant.xcodeproj/project.pbxproj b/secant.xcodeproj/project.pbxproj index fe9a8807..ae196526 100644 --- a/secant.xcodeproj/project.pbxproj +++ b/secant.xcodeproj/project.pbxproj @@ -82,7 +82,6 @@ 66A0807B271993C500118B79 /* OnboardingProgressIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66A0807A271993C500118B79 /* OnboardingProgressIndicator.swift */; }; 66D50668271D9B6100E51F0D /* NavigationButtonStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66D50667271D9B6100E51F0D /* NavigationButtonStyle.swift */; }; 66DC733F271D88CC0053CBB6 /* StandardButtonStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66DC733E271D88CC0053CBB6 /* StandardButtonStyle.swift */; }; - 9E4DC71027C6981300E657F4 /* FeedbackGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E4DC70F27C6981300E657F4 /* FeedbackGenerator.swift */; }; F9322DC0273B555C00C105B5 /* NavigationLinks.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9322DBF273B555C00C105B5 /* NavigationLinks.swift */; }; F93673D62742CB840099C6AF /* Previews.swift in Sources */ = {isa = PBXBuildFile; fileRef = F93673D52742CB840099C6AF /* Previews.swift */; }; F93874F0273C4DE200F0E875 /* HomeStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = F93874ED273C4DE200F0E875 /* HomeStore.swift */; }; @@ -210,7 +209,6 @@ 66A0807A271993C500118B79 /* OnboardingProgressIndicator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingProgressIndicator.swift; sourceTree = ""; }; 66D50667271D9B6100E51F0D /* NavigationButtonStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationButtonStyle.swift; sourceTree = ""; }; 66DC733E271D88CC0053CBB6 /* StandardButtonStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StandardButtonStyle.swift; sourceTree = ""; }; - 9E4DC70F27C6981300E657F4 /* FeedbackGenerator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedbackGenerator.swift; sourceTree = ""; }; F9322DBF273B555C00C105B5 /* NavigationLinks.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationLinks.swift; sourceTree = ""; }; F93673D52742CB840099C6AF /* Previews.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Previews.swift; sourceTree = ""; }; F93874ED273C4DE200F0E875 /* HomeStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeStore.swift; sourceTree = ""; }; @@ -327,7 +325,6 @@ 0D3D04092728B3A10032ABC1 /* RecoveryPhraseDisplayStore.swift */, 0DFE93E2272CA1AA000FCCA5 /* RecoveryPhraseValidation.swift */, 0D7CE63327349B5D0020E050 /* View+WhenDraggable.swift */, - 9E4DC70F27C6981300E657F4 /* FeedbackGenerator.swift */, ); path = BackupFlow; sourceTree = ""; @@ -1065,7 +1062,6 @@ 0DFE93E1272C9ECB000FCCA5 /* RecoveryPhraseBackupValidationView.swift in Sources */, F9C165CB2741AB5D00592F76 /* SendView.swift in Sources */, 0D0781C4278750E30083ACD7 /* WelcomeView.swift in Sources */, - 9E4DC71027C6981300E657F4 /* FeedbackGenerator.swift in Sources */, F9971A6527680DFE00A2DB75 /* Settings.swift in Sources */, 0D0781C9278776D20083ACD7 /* ZcashSymbol.swift in Sources */, 6654C7412715A47300901167 /* Onboarding.swift in Sources */, diff --git a/secant/Features/BackupFlow/FeedbackGenerator.swift b/secant/Features/BackupFlow/FeedbackGenerator.swift deleted file mode 100644 index 83edd912..00000000 --- a/secant/Features/BackupFlow/FeedbackGenerator.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// FeedbackGenerator.swift -// secant-testnet -// -// Created by Lukáš Korba on 02/23/2022. -// - -import UIKit - -struct FeedbackGenerator { - let generateFeedback: () -> Void -} - -extension FeedbackGenerator { - static let haptic = FeedbackGenerator( - generateFeedback: { UINotificationFeedbackGenerator().notificationOccurred(.error) } - ) - - static let silent = FeedbackGenerator( - generateFeedback: { } - ) -} diff --git a/secant/Features/BackupFlow/RecoveryPhraseDisplayStore.swift b/secant/Features/BackupFlow/RecoveryPhraseDisplayStore.swift index 424a13c5..c465c916 100644 --- a/secant/Features/BackupFlow/RecoveryPhraseDisplayStore.swift +++ b/secant/Features/BackupFlow/RecoveryPhraseDisplayStore.swift @@ -14,6 +14,20 @@ enum RecoveryPhraseError: Error { case unableToGeneratePhrase } +struct FeedbackGenerator { + let generateFeedback: () -> Void +} + +extension FeedbackGenerator { + static let haptic = FeedbackGenerator( + generateFeedback: { UINotificationFeedbackGenerator().notificationOccurred(.error) } + ) + + static let silent = FeedbackGenerator( + generateFeedback: { } + ) +} + struct Pasteboard { let setString: (String) -> Void let getString: () -> String?