Skip to content

Add object detection, tracking, mobile notifications, and search to any security camera.

revert ui

roryclearc9470b64b3b2
diff --git a/clearcam/SettingsViewController.m b/clearcam/SettingsViewController.m
index 24d41ec..e0e286e 100644
--- a/clearcam/SettingsViewController.m
+++ b/clearcam/SettingsViewController.m
@@ -11,7 +11,6 @@
@property (nonatomic, assign) BOOL isPresetsSectionExpanded; // Track if presets section is expanded
@property (nonatomic, assign) BOOL sendEmailAlertsEnabled;
@property (nonatomic, assign) BOOL encryptEmailDataEnabled;
-@property (nonatomic, assign) BOOL isPaid;
@end
@@ -23,7 +22,6 @@
// Basic setup
self.view.backgroundColor = [UIColor systemBackgroundColor];
self.title = @"Settings";
- self.isPaid = NO;
// Initialize selectedResolution and selectedPresetKey based on SettingsManager
SettingsManager *settingsManager = [SettingsManager sharedManager];
@@ -83,7 +81,7 @@
#pragma mark - UITableView DataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
- return 3; // One for general settings, one for presets
+ return 2; // One for general settings, one for presets
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
@@ -93,8 +91,6 @@
// Presets section: 1 row for "Manage Presets" header, plus rows for each preset, plus "Add New +"
NSArray *presetKeys = [[[NSUserDefaults standardUserDefaults] objectForKey:@"yolo_presets"] allKeys];
return self.isPresetsSectionExpanded ? (presetKeys.count + 2) : 1;
- } else if (section == 2) {
- return self.isPaid ? 0 : 1; // Hide the upgrade button if isPaid is YES
}
return 0;
}
@@ -135,13 +131,6 @@
cell.textLabel.text = @"Email Address";
NSString *email = [[NSUserDefaults standardUserDefaults] stringForKey:@"user_email"];
cell.detailTextLabel.text = email ?: @"Not set"; // Show current email or "Not set"
-
- // Disable if not paid
- if (!self.isPaid) {
- cell.textLabel.textColor = [UIColor grayColor];
- cell.detailTextLabel.textColor = [UIColor grayColor];
- cell.userInteractionEnabled = NO;
- }
} else if (indexPath.row == 3) {
// Send Email Alerts
cell.textLabel.text = @"Send Email Alerts";
@@ -152,13 +141,6 @@
emailAlertsSwitch.on = self.sendEmailAlertsEnabled;
[emailAlertsSwitch addTarget:self action:@selector(emailAlertsSwitchToggled:) forControlEvents:UIControlEventValueChanged];
cell.accessoryView = emailAlertsSwitch;
-
- // Disable if not paid
- if (!self.isPaid) {
- emailAlertsSwitch.enabled = NO;
- cell.textLabel.textColor = [UIColor grayColor];
- cell.userInteractionEnabled = NO;
- }
} else if (indexPath.row == 4) {
// Encrypt Email Data
cell.textLabel.text = @"Encrypt Email Data (Recommended)";
@@ -169,13 +151,6 @@
encryptEmailDataSwitch.on = self.encryptEmailDataEnabled;
[encryptEmailDataSwitch addTarget:self action:@selector(encryptEmailDataSwitchToggled:) forControlEvents:UIControlEventValueChanged];
cell.accessoryView = encryptEmailDataSwitch;
-
- // Disable if not paid
- if (!self.isPaid) {
- encryptEmailDataSwitch.enabled = NO;
- cell.textLabel.textColor = [UIColor grayColor];
- cell.userInteractionEnabled = NO;
- }
}
} else if (indexPath.section == 1) {
// Presets section (unchanged)
@@ -199,12 +174,6 @@
cell.imageView.tintColor = [UIColor systemGreenColor]; // Set the icon color to green
cell.accessoryType = UITableViewCellAccessoryNone;
}
- } else if (indexPath.section == 2) {
- // Upgrade to Premium section
- cell.textLabel.text = @"Upgrade to Premium";
- cell.textLabel.textColor = [UIColor systemBlueColor];
- cell.textLabel.textAlignment = NSTextAlignmentCenter;
- cell.accessoryType = UITableViewCellAccessoryNone;
}
return cell;
@@ -453,10 +422,6 @@
// Add new preset
[self showAddPresetDialog];
}
- } else if (indexPath.section == 2) {
- // Upgrade to Premium button tapped
- self.isPaid = YES; // Set isPaid to YES
- [self.tableView reloadData]; // Reload the table view to enable email-related settings
}
[tableView deselectRowAtIndexPath:indexPath animated:YES];
@@ -771,3 +736,4 @@
}
@end
+