Skip to content

Commit 98cf09e

Browse files
committed
Instant Upload now sets the photo and video last upload time to now instead of the creation date of the last photo/video taken.
1 parent 5dd100f commit 98cf09e

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

Owncloud iOs Client/InstantUpload/InstantUpload.m

+5-15
Original file line numberDiff line numberDiff line change
@@ -233,21 +233,11 @@ - (void) attemptUpload {
233233

234234
AppDelegate *app = (AppDelegate *)[[UIApplication sharedApplication] delegate];
235235

236-
for (PHAsset *asset in newAssets) {
237-
if (asset.mediaType == PHAssetMediaTypeImage) {
238-
NSTimeInterval assetCreatedDate = [asset.creationDate timeIntervalSince1970];
239-
if (assetCreatedDate > ACTIVE_USER.timestampInstantUploadImage) {
240-
ACTIVE_USER.timestampInstantUploadImage = assetCreatedDate;
241-
[ManageAppSettingsDB updateTimestampInstantUploadImage:assetCreatedDate];
242-
}
243-
} else if (asset.mediaType == PHAssetMediaTypeVideo) {
244-
NSTimeInterval assetCreatedDate = [asset.creationDate timeIntervalSince1970];
245-
if (assetCreatedDate > ACTIVE_USER.timestampInstantUploadVideo) {
246-
ACTIVE_USER.timestampInstantUploadVideo = assetCreatedDate;
247-
[ManageAppSettingsDB updateTimestampInstantUploadVideo:assetCreatedDate];
248-
}
249-
}
250-
}
236+
NSTimeInterval now = [[NSDate date] timeIntervalSince1970];
237+
ACTIVE_USER.timestampInstantUploadImage = now;
238+
ACTIVE_USER.timestampInstantUploadVideo = now;
239+
[ManageAppSettingsDB updateTimestampInstantUploadImage:now];
240+
[ManageAppSettingsDB updateTimestampInstantUploadVideo:now];
251241

252242
if (app.prepareFiles == nil) {
253243
app.prepareFiles = [[PrepareFilesToUpload alloc] init];

0 commit comments

Comments
 (0)