Add convenience method to present and log errors in lock view controller

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-07-30 18:48:11 +08:00 committed by Matthieu Gallien
parent 81566eec09
commit 05e5793f06

View file

@ -38,4 +38,9 @@ class LockViewController: NSViewController {
@IBAction func closeAction(_ sender: Any) {
actionViewController.extensionContext.completeRequest()
}
private func presentError(_ error: String) {
Logger.lockViewController.error("Error: \(error, privacy: .public)")
descriptionLabel.stringValue = "Error: \(error)"
}
}