Skip to content

Commit dd5f0af

Browse files
committed
Update create public link behaviour
1 parent 52a3c38 commit dd5f0af

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Owncloud iOs Client/Tabs/FileTab/Share/ShareLinkViewController.m

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,13 +269,13 @@ - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInte
269269
title = NSLocalizedString(@"show_error_password_enforced", nil);
270270
}
271271
} else if (![ShareUtils hasExpirationRemoveOptionAvailable]) {
272-
NSString *nDays = [NSString stringWithFormat:@"%ld", APP_DELEGATE.activeUser.capabilitiesDto.filesSharingExpireDateDaysNumber];
272+
NSString *nDays = [NSString stringWithFormat:@"%d", APP_DELEGATE.activeUser.capabilitiesDto.filesSharingExpireDateDaysNumber];
273273
title = [NSLocalizedString(@"show_error_expiration_enforced", nil) stringByReplacingOccurrencesOfString:@"$nDays" withString:nDays];
274274
}
275275
break;
276276
case 2:
277277
if ([ShareUtils hasOptionLinkNameToBeShown] && ![ShareUtils hasExpirationRemoveOptionAvailable]) {
278-
NSString *nDays = [NSString stringWithFormat:@"%ld", APP_DELEGATE.activeUser.capabilitiesDto.filesSharingExpireDateDaysNumber];
278+
NSString *nDays = [NSString stringWithFormat:@"%d", APP_DELEGATE.activeUser.capabilitiesDto.filesSharingExpireDateDaysNumber];
279279
title = [NSLocalizedString(@"show_error_expiration_enforced", nil) stringByReplacingOccurrencesOfString:@"$nDays" withString:nDays];
280280
}
281281
break;
@@ -549,11 +549,10 @@ - (void) createShareLink {
549549

550550
if (self.isAllowEditingEnabled && self.fileShared.isDirectory) {
551551

552+
updatePublicUpload = self.updatedPublicUpload;
553+
552554
if (!self.isShowFileListingEnabled) {
553555
permissions = k_permissions_when_file_listing_option_enabled;
554-
555-
} else {
556-
updatePublicUpload = self.updatedPublicUpload;
557556
}
558557
}
559558

@@ -640,6 +639,9 @@ - (void) allowEditingSwithValueChanged:(UISwitch*) sender{
640639
} else {
641640
self.isAllowEditingEnabled = YES;
642641
self.updatedPublicUpload = @"true";
642+
643+
self.isShowFileListingEnabled = YES;
644+
self.updatedShowFileListing= @"true";
643645
}
644646

645647
[self updateInterfaceWithShareOptionsLinkStatus]; // to update 'enabled' state of subordinate switch "Show file listing" and remain rest of updated fields

0 commit comments

Comments
 (0)