Add 'Delete' action to file options alert

This commit is contained in:
√(noham)²
2026-05-28 20:09:59 +02:00
parent 869e625770
commit 05b73595d8

View File

@@ -124,6 +124,14 @@ UIAlertController *doneController2 = NULL;
}]; }];
[doneController2 addAction:openAction]; [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]; [self presentViewController:doneController2 animated:YES completion:nil];
} }