mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-03-05 17:27:24 +01:00
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:
@@ -8,7 +8,7 @@ public class SecretStoreList: ObservableObject {
|
||||
@Published public var stores: [AnySecretStore] = []
|
||||
/// A modifiable store, if one is available.
|
||||
@Published public var modifiableStore: AnySecretStoreModifiable?
|
||||
private var sinks: [AnyCancellable] = []
|
||||
private var cancellables: Set<AnyCancellable> = []
|
||||
|
||||
/// Initializes a SecretStoreList.
|
||||
public init() {
|
||||
@@ -41,10 +41,9 @@ extension SecretStoreList {
|
||||
|
||||
private func addInternal(store: AnySecretStore) {
|
||||
stores.append(store)
|
||||
let sink = store.objectWillChange.sink {
|
||||
store.objectWillChange.sink {
|
||||
self.objectWillChange.send()
|
||||
}
|
||||
sinks.append(sink)
|
||||
}.store(in: &cancellables)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user