File tree 2 files changed +9
-8
lines changed
Camera uploads/UploadManagers
My Account/Settings/Camera Uploads
2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,18 @@ + (BOOL)isCameraUploadEnabled {
34
34
}
35
35
36
36
+ (void )setCameraUploadEnabled : (BOOL )cameraUploadEnabled {
37
- [self setMigratedToCameraUploadsV2: YES ];
38
37
[NSUserDefaults .standardUserDefaults setBool: cameraUploadEnabled forKey: IsCameraUploadsEnabledKey];
39
38
[self configDefaultSettingsIfNeededForCameraUpload ];
40
39
[self configDefaultSharedAlbumsAndSyncedAlbumsSettingsIfNeeded ];
40
+ [self setMigratedToCameraUploadsV2: YES ];
41
41
}
42
42
43
43
+ (void )configDefaultSettingsIfNeededForCameraUpload {
44
44
if (![self isCameraUploadEnabled ]) {
45
+ // Reset default value for VideoUploadsEnabled to YES, so that next time user turns on it will be the default
46
+ if ([NSUserDefaults .standardUserDefaults objectForKey: IsVideoUploadsEnabledKey] == nil ) {
47
+ [self setVideoUploadEnabled: YES ];
48
+ }
45
49
return ;
46
50
}
47
51
@@ -56,10 +60,6 @@ + (void)configDefaultSettingsIfNeededForCameraUpload {
56
60
if ([NSUserDefaults .standardUserDefaults objectForKey: UploadAllBurstAssetsKey] == nil ) {
57
61
[self setUploadAllBurstPhotos: YES ];
58
62
}
59
-
60
- if ([NSUserDefaults .standardUserDefaults objectForKey: IsVideoUploadsEnabledKey] == nil ) {
61
- [self setVideoUploadEnabled: YES ];
62
- }
63
63
}
64
64
65
65
+ (void )configDefaultSharedAlbumsAndSyncedAlbumsSettingsIfNeeded {
Original file line number Diff line number Diff line change @@ -60,9 +60,10 @@ - (void)viewDidLoad {
60
60
61
61
if (self.isPresentedModally ) {
62
62
self.navigationItem .rightBarButtonItem = [[UIBarButtonItem alloc ] initWithBarButtonSystemItem: UIBarButtonSystemItemDone target: self action: @selector (modalDialogDoneButtonTouched )];
63
- if (!CameraUploadManager.hasMigratedToCameraUploadsV2 ) {
64
- [CameraUploadManager configDefaultSettingsForCameraUploadV2 ];
65
- }
63
+ }
64
+
65
+ if (!CameraUploadManager.hasMigratedToCameraUploadsV2 ) {
66
+ [CameraUploadManager configDefaultSettingsForCameraUploadV2 ];
66
67
}
67
68
68
69
[self updateAppearance ];
You can’t perform that action at this time.
0 commit comments