Fix bugs around selection after creating/deleting/updating keys (#436)

* Fix bug where new secret wouldn't be selected

* Remove keyboard shortcut for deletion
This commit is contained in:
Max Goedjen
2022-12-22 23:29:51 -05:00
committed by GitHub
parent 8679ca3da0
commit 480ef5392d
5 changed files with 14 additions and 11 deletions

View File

@ -1,12 +1,11 @@
import SwiftUI
import Combine
import SecretKit
struct StoreListView: View {
@Binding var showingCreation: Bool
@Binding var activeSecret: AnySecret.ID?
@State private var activeSecret: AnySecret.ID?
@EnvironmentObject private var storeList: SecretStoreList
private func secretDeleted(secret: AnySecret) {
@ -14,7 +13,7 @@ struct StoreListView: View {
}
private func secretRenamed(secret: AnySecret) {
activeSecret = nextDefaultSecret
activeSecret = secret.id
}
var body: some View {