From 7e6ba20c3fba50946a384468bc70693439bdfe24 Mon Sep 17 00:00:00 2001 From: Gerardo Pacheco Date: Wed, 9 Dec 2020 16:01:27 +0100 Subject: [PATCH 1/3] Gutenberg - Fix Gallery block processor updating its linkTo values --- .../GalleryBlockProcessor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/posts/mediauploadcompletionprocessors/GalleryBlockProcessor.java b/WordPress/src/main/java/org/wordpress/android/ui/posts/mediauploadcompletionprocessors/GalleryBlockProcessor.java index 392c19c4e85e..44425bec409c 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/posts/mediauploadcompletionprocessors/GalleryBlockProcessor.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/posts/mediauploadcompletionprocessors/GalleryBlockProcessor.java @@ -48,10 +48,10 @@ public GalleryBlockProcessor(String localId, MediaFile mediaFile, String siteUrl Element parent = targetImg.parent(); if (parent != null && parent.is("a") && mLinkTo != null) { switch (mLinkTo) { - case "media": + case "file": parent.attr("href", mRemoteUrl); break; - case "attachment": + case "post": parent.attr("href", mAttachmentPageUrl); break; default: From a28a31da705f7647ba2e6c5d93916acf3373e11c Mon Sep 17 00:00:00 2001 From: Gerardo Pacheco Date: Wed, 9 Dec 2020 16:09:54 +0100 Subject: [PATCH 2/3] Update Release notes --- RELEASE-NOTES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index f15fa97650e8..ae114b9cd148 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -2,6 +2,7 @@ ----- * [*] My Site: Fixes crash on rotation while editing site title [https://github.com/wordpress-mobile/WordPress-Android/pull/13505] * [**] Posts List: Adds duplicate post functionality [https://github.com/wordpress-mobile/WordPress-Android/pull/13521] +* [*] Block Editor: Fix Gallery block uploads when the editor is closed [https://github.com/wordpress-mobile/WordPress-Android/pull/13570] 16.3 ----- From 05a988b69857cb0e12fcfa0d9cb1c84ed0f697d3 Mon Sep 17 00:00:00 2001 From: Gerardo Pacheco Date: Wed, 9 Dec 2020 16:21:44 +0100 Subject: [PATCH 3/3] Update test content for GalleryBlockProcessor --- .../mediauploadcompletionprocessors/TestContent.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/WordPress/src/test/java/org/wordpress/android/ui/posts/mediauploadcompletionprocessors/TestContent.kt b/WordPress/src/test/java/org/wordpress/android/ui/posts/mediauploadcompletionprocessors/TestContent.kt index 22e84cafce59..a9c175d89c50 100644 --- a/WordPress/src/test/java/org/wordpress/android/ui/posts/mediauploadcompletionprocessors/TestContent.kt +++ b/WordPress/src/test/java/org/wordpress/android/ui/posts/mediauploadcompletionprocessors/TestContent.kt @@ -176,7 +176,7 @@ object TestContent { """ - const val oldGalleryBlockIdsNotFirst = """ + const val oldGalleryBlockIdsNotFirst = """