Skip to content

Commit

Permalink
fix(SelectFolderViewController): Add target validate button
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Weidmann <[email protected]>
  • Loading branch information
PhilippeWeidmann authored and adrien-coye committed Aug 9, 2024
1 parent 1775c77 commit 8e0205d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class SelectFolderViewController: FileListViewController {
let button = IKLargeButton(frame: .zero)
button.setTitle(KDriveResourcesStrings.Localizable.buttonValid, for: .normal)
button.translatesAutoresizingMaskIntoConstraints = false
button.addTarget(self, action: #selector(selectButtonPressed), for: .touchUpInside)
return button
}()

Expand Down Expand Up @@ -169,7 +170,7 @@ class SelectFolderViewController: FileListViewController {
}
}

@IBAction func selectButtonPressed(_ sender: UIButton) {
@objc func selectButtonPressed() {
var frozenSelectedDirectory = viewModel.currentDirectory.freezeIfNeeded()
if !frozenSelectedDirectory.isDirectory, let parent = frozenSelectedDirectory.parent {
frozenSelectedDirectory = parent.freezeIfNeeded()
Expand Down

0 comments on commit 8e0205d

Please sign in to comment.