     @objc var albumData: PiwigoAlbumData?
     
     private var tableView: UITableView?
-    private var categoryAction: UIAlertAction?
+    private var renameAction: UIAlertAction?
     private var deleteAction: UIAlertAction?
 
     override init(frame: CGRect) {

            })

        alert.addAction(cancelAction)
        if let categoryAction = categoryAction {
            alert.addAction(categoryAction)
        }
        alert.view.tintColor = UIColor.piwigoColorOrange()
        if #available(iOS 13.0, *) {

                   replacementString string: String) -> Bool {
        // Enable Add/Delete Category action if text field not empty
        let finalString = (textField.text as NSString?)?.replacingCharacters(in: range, with: string)
        renameAction?.isEnabled = (finalString?.count ?? 0) >= 1
        deleteAction?.isEnabled = (finalString?.count ?? 0) >= 1
        return true
    }

    func textFieldShouldClear(_ textField: UITextField) -> Bool {
        // Disable Add/Delete Category action
        renameAction?.isEnabled = false
        deleteAction?.isEnabled = false
        return true
    }
