Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve upload on background #10981

Merged
merged 11 commits into from
Feb 18, 2019
4 changes: 2 additions & 2 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ target 'WordPress' do
## React Native
## =====================
##
pod 'Gutenberg', :git => 'http://github.com/wordpress-mobile/gutenberg-mobile/', :commit => 'be7f6dc99a91aeaed96ddc9e9de3deb67d2dfbac'
pod 'RNTAztecView', :git => 'http://github.com/wordpress-mobile/gutenberg-mobile/', :commit => 'be7f6dc99a91aeaed96ddc9e9de3deb67d2dfbac'
pod 'Gutenberg', :git => 'http://github.com/wordpress-mobile/gutenberg-mobile/', :commit => '7635d543f9423374af881a51280c6f870e0e558f'
pod 'RNTAztecView', :git => 'http://github.com/wordpress-mobile/gutenberg-mobile/', :commit => '7635d543f9423374af881a51280c6f870e0e558f'

gutenberg_pod 'React'
gutenberg_pod 'yoga'
Expand Down
14 changes: 7 additions & 7 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ DEPENDENCIES:
- Gifu (= 3.2.0)
- GiphyCoreSDK (~> 1.4.0)
- Gridicons (~> 0.16)
- Gutenberg (from `http://github.com/wordpress-mobile/gutenberg-mobile/`, commit `be7f6dc99a91aeaed96ddc9e9de3deb67d2dfbac`)
- Gutenberg (from `http://github.com/wordpress-mobile/gutenberg-mobile/`, commit `7635d543f9423374af881a51280c6f870e0e558f`)
- HockeySDK (= 5.1.4)
- MGSwipeTableCell (= 1.6.8)
- MRProgress (= 0.8.3)
Expand All @@ -239,7 +239,7 @@ DEPENDENCIES:
- react-native-keyboard-aware-scroll-view (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/develop/react-native-gutenberg-bridge/third-party-podspecs/react-native-keyboard-aware-scroll-view.podspec.json`)
- react-native-safe-area (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/master/react-native-gutenberg-bridge/third-party-podspecs/react-native-safe-area.podspec.json`)
- RNSVG (from `https://github.com/wordpress-mobile/react-native-svg.git`, tag `8.0.9-gb.0`)
- RNTAztecView (from `http://github.com/wordpress-mobile/gutenberg-mobile/`, commit `be7f6dc99a91aeaed96ddc9e9de3deb67d2dfbac`)
- RNTAztecView (from `http://github.com/wordpress-mobile/gutenberg-mobile/`, commit `7635d543f9423374af881a51280c6f870e0e558f`)
- SimulatorStatusMagic
- Starscream (= 3.0.6)
- SVProgressHUD (= 2.2.5)
Expand Down Expand Up @@ -299,7 +299,7 @@ EXTERNAL SOURCES:
Folly:
:podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/master/react-native-gutenberg-bridge/third-party-podspecs/Folly.podspec.json
Gutenberg:
:commit: be7f6dc99a91aeaed96ddc9e9de3deb67d2dfbac
:commit: 7635d543f9423374af881a51280c6f870e0e558f
:git: http://github.com/wordpress-mobile/gutenberg-mobile/
React:
:podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/master/react-native-gutenberg-bridge/third-party-podspecs/React.podspec.json
Expand All @@ -311,7 +311,7 @@ EXTERNAL SOURCES:
:git: https://github.com/wordpress-mobile/react-native-svg.git
:tag: 8.0.9-gb.0
RNTAztecView:
:commit: be7f6dc99a91aeaed96ddc9e9de3deb67d2dfbac
:commit: 7635d543f9423374af881a51280c6f870e0e558f
:git: http://github.com/wordpress-mobile/gutenberg-mobile/
WordPressUI:
:git: https://github.com/wordpress-mobile/WordPressUI-iOS.git
Expand All @@ -324,13 +324,13 @@ CHECKOUT OPTIONS:
:git: https://github.com/Automattic/Automattic-Tracks-iOS.git
:tag: 0.3.1
Gutenberg:
:commit: be7f6dc99a91aeaed96ddc9e9de3deb67d2dfbac
:commit: 7635d543f9423374af881a51280c6f870e0e558f
:git: http://github.com/wordpress-mobile/gutenberg-mobile/
RNSVG:
:git: https://github.com/wordpress-mobile/react-native-svg.git
:tag: 8.0.9-gb.0
RNTAztecView:
:commit: be7f6dc99a91aeaed96ddc9e9de3deb67d2dfbac
:commit: 7635d543f9423374af881a51280c6f870e0e558f
:git: http://github.com/wordpress-mobile/gutenberg-mobile/
WordPressUI:
:git: https://github.com/wordpress-mobile/WordPressUI-iOS.git
Expand Down Expand Up @@ -385,6 +385,6 @@ SPEC CHECKSUMS:
yoga: f37b1edbd68be803f1dc4d57d40d8a5b277d8e2c
ZendeskSDK: 44ee00338dd718495f0364369420ae11b389c878

PODFILE CHECKSUM: 00d25949d8d08be635506f03a4cd49b8f283fbc6
PODFILE CHECKSUM: 286cb0a6f1b8bf7734254e11f15949624046acd1

COCOAPODS: 1.5.3
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class GutenbergMediaInserterHelper: NSObject {
}
for media in post.media {
if media.remoteStatus == .failed {
gutenberg.mediaUploadUpdate(id: media.gutenbergUploadID, state: .uploading, progress: 0, url: media.absoluteThumbnailLocalURL, serverID: nil)
gutenberg.mediaUploadUpdate(id: media.gutenbergUploadID, state: .failed, progress: 0, url: nil, serverID: nil)
}
}
Expand Down Expand Up @@ -125,7 +126,8 @@ class GutenbergMediaInserterHelper: NSObject {
switch state {
case .processing:
gutenberg.mediaUploadUpdate(id: mediaUploadID, state: .uploading, progress: 0, url: nil, serverID: nil)
case .thumbnailReady:
case .thumbnailReady(let url):
gutenberg.mediaUploadUpdate(id: mediaUploadID, state: .uploading, progress: 0.20, url: url, serverID: nil)
break
case .uploading:
break
Expand Down