Merge branch 'master' into fix_115

This commit is contained in:
Max Goedjen
2020-07-04 15:51:19 -07:00
committed by GitHub
34 changed files with 613 additions and 105 deletions

View File

@@ -9,9 +9,9 @@ struct ContentView<UpdaterType: UpdaterProtocol, AgentStatusCheckerType: AgentSt
@ObservedObject var agentStatusChecker: AgentStatusCheckerType
var runSetupBlock: (() -> Void)?
@State fileprivate var active: AnySecret.ID?
@State fileprivate var showingDeletion = false
@State fileprivate var deletingSecret: AnySecret?
@State private var active: AnySecret.ID?
@State private var showingDeletion = false
@State private var deletingSecret: AnySecret?
var body: some View {
VStack {
@@ -110,12 +110,12 @@ struct ContentView<UpdaterType: UpdaterProtocol, AgentStatusCheckerType: AgentSt
} else {
fallback = Constants.emptyStoreTag
}
return self.storeList.stores.compactMap { $0.secrets.first }.first?.id ?? fallback
return self.storeList.stores.compactMap(\.secrets.first).first?.id ?? fallback
}
}
fileprivate enum Constants {
private enum Constants {
static let emptyStoreModifiableTag: AnyHashable = "emptyStoreModifiableTag"
static let emptyStoreTag: AnyHashable = "emptyStoreModifiableTag"
}

View File

@@ -8,7 +8,7 @@ struct DeleteSecretView<StoreType: SecretStoreModifiable>: View {
@State var confirm = ""
fileprivate var dismissalBlock: (Bool) -> ()
private var dismissalBlock: (Bool) -> ()
init(secret: StoreType.SecretType, store: StoreType, dismissalBlock: @escaping (Bool) -> ()) {
self.secret = secret

View File

@@ -1,6 +1,5 @@
import Foundation
import SwiftUI
import ServiceManagement
struct SetupView: View {
@@ -117,7 +116,7 @@ struct SetupStepCommandView: View {
extension SetupView {
func installLaunchAgent() -> Bool {
SMLoginItemSetEnabled("com.maxgoedjen.Secretive.SecretAgent" as CFString, true)
LaunchAgentController().install()
}
func markAsDone() -> Bool {