Skip to content

Commit

Permalink
NMC 1998 - Merging conflict resolve after nc 4.9.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
TSI-amrutwaghmare committed Aug 27, 2024
1 parent f59ae0c commit a2c21e2
Showing 1 changed file with 8 additions and 53 deletions.
61 changes: 8 additions & 53 deletions iOSClient/Settings/CCAdvanced.m
Original file line number Diff line number Diff line change
Expand Up @@ -103,23 +103,6 @@ - (void)initializeForm
[row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
[section addFormRow:row];
}

// Section : Chunk --------------------------------------------------------------

section = [XLFormSectionDescriptor formSection];
[form addFormSection:section];
section.footerTitle = NSLocalizedString(@"_chunk_footer_title_", nil);

row = [XLFormRowDescriptor formRowDescriptorWithTag:@"chunk" rowType:XLFormRowDescriptorTypeStepCounter title:NSLocalizedString(@"_chunk_size_mb_", nil)];
row.cellConfigAtConfigure[@"backgroundColor"] = UIColor.secondarySystemGroupedBackgroundColor;
row.value = [NSString stringWithFormat:@"%ld", CCUtility.getChunkSize];
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
[row.cellConfig setObject:UIColor.labelColor forKey:@"textLabel.textColor"];
[row.cellConfigAtConfigure setObject:@YES forKey:@"stepControl.wraps"];
[row.cellConfigAtConfigure setObject:@1 forKey:@"stepControl.stepValue"];
[row.cellConfigAtConfigure setObject:@0 forKey:@"stepControl.minimumValue"];
[row.cellConfigAtConfigure setObject:@100 forKey:@"stepControl.maximumValue"];
[section addFormRow:row];

// Section : Privacy --------------------------------------------------------------

Expand Down Expand Up @@ -256,7 +239,6 @@ - (void)initializeForm
[XLFormOptionsObject formOptionsObjectWithValue:@(90) displayText:NSLocalizedString(@"_3_months_", nil)],
[XLFormOptionsObject formOptionsObjectWithValue:@(30) displayText:NSLocalizedString(@"_1_month_", nil)],
[XLFormOptionsObject formOptionsObjectWithValue:@(7) displayText:NSLocalizedString(@"_1_week_", nil)],
//[XLFormOptionsObject formOptionsObjectWithValue:@(1) displayText:NSLocalizedString(@"_1_day_", nil)],
];
[sectionSize addFormRow:row];

Expand Down Expand Up @@ -363,13 +345,7 @@ - (void)formRowDescriptorValueHasChanged:(XLFormRowDescriptor *)rowDescriptor ol
[[NCKeychain alloc] init].logLevel = levelLog;
[[[NextcloudKit shared] nkCommonInstance] setLevelLog:levelLog];
}

if ([rowDescriptor.tag isEqualToString:@"chunk"]) {

NSInteger chunkSize = [[rowDescriptor.value valueData] intValue];
[CCUtility setChunkSize:chunkSize];
}


if ([rowDescriptor.tag isEqualToString:@"deleteoldfiles"]) {

NSInteger days = [[rowDescriptor.value valueData] intValue];
Expand All @@ -383,17 +359,6 @@ - (void)clearCache:(NSString *)account
{
[[NCNetworking shared] cancelAllTask];


[CCUtility removeDocumentsDirectory];
[CCUtility removeTemporaryDirectory];

[CCUtility createDirectoryStandard];

[[NCAutoUpload shared] alignPhotoLibraryWithViewController:self];

// Inizialized home
[[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:NCGlobal.shared.notificationCenterInitialize object:nil userInfo:nil];

dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {

NCUtilityFileSystem *ufs = [[NCUtilityFileSystem alloc] init];
Expand Down Expand Up @@ -451,7 +416,11 @@ - (void)clearCacheRequest:(XLFormRowDescriptor *)sender
- (void)clearAllCacheRequest:(XLFormRowDescriptor *)sender
{
[self deselectFormRow:sender];
[self clearCache:nil];

[[NCActivityIndicator shared] startActivityWithBackgroundView:nil style: UIActivityIndicatorViewStyleLarge blurEffect:true];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {
[self clearCache:nil];
});
}

- (void)calculateSize
Expand All @@ -477,24 +446,10 @@ - (void)exitNextcloud:(XLFormRowDescriptor *)sender
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"" message:NSLocalizedString(@"_want_exit_", nil) preferredStyle:UIAlertControllerStyleActionSheet];

[alertController addAction: [UIAlertAction actionWithTitle:NSLocalizedString(@"_ok_", nil) style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
[appDelegate resetApplication];
tealium = [[TealiumHelper alloc] init];
[tealium trackEventWithTitle:@"magentacloud-app.settings.logout" data:nil];
[adjust trackEvent:Logout];
[[NSURLCache sharedURLCache] setMemoryCapacity:0];
[[NSURLCache sharedURLCache] setDiskCapacity:0];

[CCUtility removeGroupDirectoryProviderStorage];
[CCUtility removeGroupApplicationSupport];

[CCUtility removeDocumentsDirectory];
[CCUtility removeTemporaryDirectory];

[CCUtility deleteAllChainStore];

[[NCManageDatabase shared] removeDB];

exit(0);
[appDelegate resetApplication];
}]];

[alertController addAction: [UIAlertAction actionWithTitle:NSLocalizedString(@"_cancel_", nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
Expand All @@ -512,7 +467,7 @@ - (void)exitNextcloud:(XLFormRowDescriptor *)sender

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {

if (indexPath.section == 5 && indexPath.row == 2) {
if (indexPath.section == 4 && indexPath.row == 2) {
return 80;
} else {
return NCGlobal.shared.heightCellSettings;
Expand Down

0 comments on commit a2c21e2

Please sign in to comment.