From 05b73595d88dea8ce7fd4bceb71c8da4f87fe011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=88=9A=28noham=29=C2=B2?= <100566912+NohamR@users.noreply.github.com> Date: Thu, 28 May 2026 20:09:59 +0200 Subject: [PATCH] Add 'Delete' action to file options alert --- TDFileManagerViewController.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/TDFileManagerViewController.m b/TDFileManagerViewController.m index 745f371..7283c7a 100644 --- a/TDFileManagerViewController.m +++ b/TDFileManagerViewController.m @@ -124,6 +124,14 @@ UIAlertController *doneController2 = NULL; }]; [doneController2 addAction:openAction]; + UIAlertAction *deleteFileAction = [UIAlertAction actionWithTitle:@"Delete" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) { + [[NSFileManager defaultManager] removeItemAtPath:path error:nil]; + [self refresh]; + [kw2 removeFromSuperview]; + kw2.hidden = YES; + }]; + [doneController2 addAction:deleteFileAction]; + [self presentViewController:doneController2 animated:YES completion:nil]; }