Skip to content

Commit

Permalink
Merge pull request #11175 from wordpress-mobile/issue/integrate_media…
Browse files Browse the repository at this point in the history
…_editor_button_changes

[Gutenberg] Integrates Media Editing button listener
  • Loading branch information
leandroalonso authored Jan 28, 2020
2 parents 99f19bd + 09935be commit 41c618a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.wordpress.mobile.WPAndroidGlue.WPAndroidGlueCode.OnEditorMountListener;
import org.wordpress.mobile.WPAndroidGlue.WPAndroidGlueCode.OnGetContentTimeout;
import org.wordpress.mobile.WPAndroidGlue.WPAndroidGlueCode.OnImageFullscreenPreviewListener;
import org.wordpress.mobile.WPAndroidGlue.WPAndroidGlueCode.OnMediaEditorListener;
import org.wordpress.mobile.WPAndroidGlue.WPAndroidGlueCode.OnMediaLibraryButtonListener;
import org.wordpress.mobile.WPAndroidGlue.WPAndroidGlueCode.OnReattachQueryListener;

Expand Down Expand Up @@ -53,7 +54,8 @@ public void attachToContainer(ViewGroup viewGroup, OnMediaLibraryButtonListener
OnEditorAutosaveListener onEditorAutosaveListener,
OnAuthHeaderRequestedListener onAuthHeaderRequestedListener,
RequestExecutor fetchExecutor,
OnImageFullscreenPreviewListener onImageFullscreenPreviewListener) {
OnImageFullscreenPreviewListener onImageFullscreenPreviewListener,
OnMediaEditorListener onMediaEditorListener) {
mWPAndroidGlueCode.attachToContainer(
viewGroup,
onMediaLibraryButtonListener,
Expand All @@ -62,7 +64,8 @@ public void attachToContainer(ViewGroup viewGroup, OnMediaLibraryButtonListener
onEditorAutosaveListener,
onAuthHeaderRequestedListener,
fetchExecutor,
onImageFullscreenPreviewListener);
onImageFullscreenPreviewListener,
onMediaEditorListener);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import org.wordpress.mobile.WPAndroidGlue.WPAndroidGlueCode.OnEditorMountListener;
import org.wordpress.mobile.WPAndroidGlue.WPAndroidGlueCode.OnGetContentTimeout;
import org.wordpress.mobile.WPAndroidGlue.WPAndroidGlueCode.OnImageFullscreenPreviewListener;
import org.wordpress.mobile.WPAndroidGlue.WPAndroidGlueCode.OnMediaEditorListener;
import org.wordpress.mobile.WPAndroidGlue.WPAndroidGlueCode.OnMediaLibraryButtonListener;
import org.wordpress.mobile.WPAndroidGlue.WPAndroidGlueCode.OnReattachQueryListener;

Expand Down Expand Up @@ -356,6 +357,11 @@ public void run() {
@Override public void onImageFullscreenPreviewClicked(String mediaUrl) {
mEditorImagePreviewListener.onImagePreviewRequested(mediaUrl);
}
},
new OnMediaEditorListener() {
@Override public void onMediaEditorClicked(String mediaUrl) {
// Show Media Editor
}
});

// request dependency injection. Do this after setting min/max dimensions
Expand Down

0 comments on commit 41c618a

Please sign in to comment.