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

Feature/fluxc media upload service multiple uploads reattach progress #5780

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8e080a8
identified the best place for progress re-attachment logic
mzorz Apr 7, 2017
9a87dd7
added capability to update the UI given the upload listener receives …
mzorz Apr 7, 2017
76a0787
added checks so we make sure to be able to update upload progress onl…
mzorz Apr 7, 2017
8790524
only re-add uploading ids if values other than null obtained
mzorz Apr 7, 2017
98bbed2
don't cancel uploads when leaving the editor - not anymore
mzorz Apr 7, 2017
a2a51fa
added flag to make sure content is loaded before attempting to refres…
mzorz Apr 8, 2017
806a7e9
Merge branch 'feature/fluxc-media-upload-service-multiple-uploads' in…
mzorz Apr 12, 2017
cbef415
changed mAztecReady flag to be set to true either after setting conte…
mzorz Apr 13, 2017
86feedf
null checks added for ease of debugging
mzorz Apr 13, 2017
0a3a655
updated feature branch name
mzorz Apr 18, 2017
33744a6
reusing predicate variable
mzorz Apr 18, 2017
91e6d53
refactored attribute handling
mzorz Apr 18, 2017
edcf67e
refactored overlay methods for reuse and setting everything up on set…
mzorz Apr 18, 2017
5a318b1
refactoring and handling exceptions as events might come unordered
mzorz Apr 18, 2017
f719a77
added comment to clarify code, and pointing to newest FluxC commit hash
mzorz Apr 24, 2017
c3cfb48
small temporal change to avoid pushing post if media upload is in pro…
mzorz Apr 24, 2017
8b9f541
Merge branch 'feature/fluxc-media-upload-service-multiple-uploads' in…
mzorz Apr 24, 2017
8e0c0f7
fixed merge conflicts
mzorz Apr 26, 2017
81c3a4c
solved more merge conflicts
mzorz Apr 26, 2017
be149d2
fixed listToUpdate, as it was all going to mFailedMediaIds upon setup
mzorz Apr 26, 2017
b1c20e5
now taking into account ordering of events in FLuxc is not guaranteed…
mzorz Apr 26, 2017
ce2f2d9
now we also remove the class from the image once it's finished uploa…
mzorz Apr 26, 2017
ead6b09
removing uploading class when finished uploading in service processor…
mzorz Apr 26, 2017
adb76f7
listening for Post updates from FLuxC in the posts list and refreshin…
mzorz Apr 28, 2017
161d588
solved merge conflicts
mzorz May 3, 2017
4417a4c
moved getEditorMimeType() to EditorFragmentAbstract and removed MimeT…
mzorz May 8, 2017
0cd3bc9
removed log added while building the reattach progress beahvior
mzorz May 8, 2017
89bec62
using already defined static var for string
mzorz May 9, 2017
fd1e412
fixed method signature in onMediaUploadProgress calls within EditorEx…
mzorz May 10, 2017
4606f08
using 0f instead of new Float(0)
mzorz May 10, 2017
1102c4f
added check that onMediaUploadProgress corresponds to an existing upl…
mzorz May 10, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,8 @@ private void onUploadError(MediaModel media, MediaStore.MediaError error) {
}

if (mEditorMediaUploadListener != null) {
mEditorMediaUploadListener.onMediaUploadFailed(localMediaId, errorMessage);
mEditorMediaUploadListener.onMediaUploadFailed(localMediaId,
EditorFragmentAbstract.getEditorMimeType(mf), errorMessage);
}

removeMediaFromPendingList(media);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,10 @@ public void onSaveInstanceState(Bundle outState) {
@Subscribe(threadMode = ThreadMode.MAIN)
public void onPostChanged(OnPostChanged event) {
switch (event.causeOfChange) {
// if a Post is updated, let's refresh the whole list, because we can't really know
// from FluxC which post has changed, or when. So to make sure, we go to the source,
// which is the FkuxC PostStore.
case UPDATE_POST:
case FETCH_POSTS:
case FETCH_PAGES:
mIsFetchingPosts = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ public PostModel replaceMediaFileWithUrlInPost(@Nullable PostModel post, String
boolean showNewEditor = AppPrefs.isVisualEditorEnabled();

if (showAztecEditor) {
AztecEditorFragment.replaceMediaFileWithUrl(WordPress.getContext(), post.getContent(),
String modifiedContents = AztecEditorFragment.replaceMediaFileWithUrl(WordPress.getContext(), post.getContent(),
localMediaId, mediaFile);
post.setContent(modifiedContents);
} else if (showNewEditor) {
// TODO implement visual editor implementation to update image/video in post
} else {
Expand Down
Loading