Skip to content

Commit

Permalink
Simplifies some code.
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoreymendez committed Jun 3, 2019
1 parent 44d4a57 commit 90a8e2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 2 additions & 4 deletions WordPress/Classes/Services/MediaCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -606,14 +606,12 @@ extension MediaCoordinator: Uploader {
func resume() {
let service = MediaService(managedObjectContext: mainContext)

service.getFailedMedia { [weak self] mediaArray in
service.getFailedMedia { [weak self] media in
guard let self = self else {
return
}

for media in mediaArray {
self.retryMedia(media)
}
media.forEach() { self.retryMedia($0) }
}
}
}
Expand Down
4 changes: 1 addition & 3 deletions WordPress/Classes/Services/PostCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,7 @@ extension PostCoordinator: Uploader {
return
}

for post in posts {
self.retrySave(of: post)
}
posts.forEach() { self.retrySave(of: $0 ) }
}
}
}

0 comments on commit 90a8e2a

Please sign in to comment.