From 0cae8937617b18ce91190c4ae49e4ff0b6d58b25 Mon Sep 17 00:00:00 2001 From: m1337v Date: Tue, 27 Feb 2024 01:49:07 +0100 Subject: [PATCH] list items in alert --- RootHide/VarCleanController.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/RootHide/VarCleanController.m b/RootHide/VarCleanController.m index d67e128..319a9c2 100644 --- a/RootHide/VarCleanController.m +++ b/RootHide/VarCleanController.m @@ -218,6 +218,15 @@ - (BOOL)checkFileInList:(NSString *)fileName List:(NSArray*)list { } - (void)varClean { + NSMutableString *deletionList = [NSMutableString stringWithString:Localized(@"You are about to delete the following items:\n")]; + + for (NSDictionary* group in self.tableData) { + for (NSDictionary* item in group[@"items"]) { + if ([item[@"checked"] boolValue]) { + [deletionList appendFormat:@"%@\n", item[@"name"]]; + } + } + } UIAlertController *alertController = [UIAlertController alertControllerWithTitle:Localized(@"Confirmation") message:Localized(@"Are you sure you want to clean selected items?") preferredStyle:UIAlertControllerStyleAlert];