Fix detail update on dismiss of edit screen. (#687)

This commit is contained in:
Max Goedjen
2025-09-10 00:29:12 -07:00
committed by GitHub
parent 7c7db56c1e
commit cf7c6e9fbe
3 changed files with 13 additions and 16 deletions

View File

@@ -41,15 +41,12 @@ struct SecretListItemView: View {
deletedSecret(secret)
}
}
.sheet(isPresented: $isRenaming) {
.sheet(isPresented: $isRenaming, onDismiss: {
renamedSecret(secret)
}, content: {
if let modifiable = store as? AnySecretStoreModifiable {
EditSecretView(store: modifiable, secret: secret) { renamed in
isRenaming = false
if renamed {
renamedSecret(secret)
}
}
EditSecretView(store: modifiable, secret: secret)
}
}
})
}
}