Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
85774dc
Update strings.xml with text to be used
SiobhyB Apr 21, 2021
4190066
Add OnSetFeaturedImageListener()
SiobhyB Apr 21, 2021
86e6bb0
Add onSetFeaturedImageButtonClicked() function
SiobhyB Apr 21, 2021
51be414
Add updateFeaturedImage() function
SiobhyB Apr 21, 2021
4ab70b2
Add setFeaturedImage() and removeFeaturedImage() functions
SiobhyB Apr 21, 2021
0dd7399
Create dialog in showFeaturedImageConfirmationDialog()
SiobhyB Apr 21, 2021
29d2d0b
Send a notice depending on whether a featured image is set or removed
SiobhyB Apr 21, 2021
7ee5029
Update reference to latest Gutenberg Mobile commit
SiobhyB Apr 21, 2021
0f54607
added an update featured image use case.
jd-alexander Apr 23, 2021
9d72f88
Created mechanisms to track when the gb featured image is picked
jd-alexander Apr 23, 2021
d3b8972
Integrated the new use case and approach to EditPost and Post Settings
jd-alexander Apr 23, 2021
ce3785e
Update remaining references to "IMAGE_PICKED" to "IMAGE_PICKED_POST_S…
SiobhyB Apr 27, 2021
c1278d6
Remove unused imports from EditPostSettingsFragment.java
SiobhyB Apr 27, 2021
dfc7be8
Merge branch 'develop' into gb/1011-set-featured-button
SiobhyB Apr 27, 2021
08efc40
Remove removeFeaturedImage() function and consolidate into a single s…
SiobhyB Apr 27, 2021
655bb60
Bump Gutenberg Mobile
SiobhyB Apr 27, 2021
cffaf48
Merge branch 'develop' into gb/1011-set-featured-button
SiobhyB May 11, 2021
2e5b213
Refactor logic for around showFeaturedImageConfirmationDialog()
SiobhyB May 11, 2021
71f8f36
Update build.gradle with latest Gutenberg Mobile reference
SiobhyB May 12, 2021
34b78ce
Update build.gradle to reference latest commit from Gutenberg Mobile
SiobhyB May 12, 2021
6ba7938
Merge branch 'develop' into gb/1011-set-featured-button
SiobhyB May 12, 2021
e0b301d
Merge branch 'develop' into gb/1011-set-featured-button
SiobhyB May 12, 2021
74323e9
Merge branch 'develop' into gb/1011-set-featured-button
SiobhyB May 12, 2021
754688a
Merge branch 'develop' into gb/1011-set-featured-button
SiobhyB May 12, 2021
3ccdc1d
Merge branch 'develop' into gb/1011-set-featured-button
SiobhyB May 16, 2021
f4358c4
Update reference to latest Gutenberg Mobile commit
SiobhyB May 16, 2021
6ba9fc2
Merge branch 'develop' into gb/1011-set-featured-button
SiobhyB May 16, 2021
d6d26ec
Merge branch 'gb/1011-set-featured-button' of github.com:wordpress-mo…
SiobhyB May 16, 2021
621ce38
Update reference to latest Gutenberg Mobile commit
SiobhyB May 16, 2021
57c3059
Bump Gutenberg Mobile reference
SiobhyB May 18, 2021
1187bc1
Updated gutenberg-mobile ref.
jd-alexander May 19, 2021
610348e
added inject annotation to the constructor of the use case.
jd-alexander May 19, 2021
0cfaf4f
Updated gutenberg-mobile ref.
jd-alexander May 20, 2021
617c5e2
removed comment about disabling Audio block since it is now on all sites
jd-alexander May 20, 2021
672fd07
Merge branch 'gb/1011-set-featured-button' into gb/1011-set-featured-…
jd-alexander May 20, 2021
70dff2c
formatted the use case.
jd-alexander May 20, 2021
d1e7eda
sync stories submodule.
jd-alexander May 20, 2021
fa76582
Create GutenbergDialogFragment.kt using BasicDialogFragment.kt as a t…
SiobhyB May 20, 2021
41c25e0
Add mediaId to GutenbergDialogFragment's constructor
SiobhyB May 20, 2021
d772cbf
Edit "onNegativeClicked" and "onPositiveClicked" so that interface ca…
SiobhyB May 20, 2021
193a41b
Implement BasicDialogPositiveClickInterface and BasicDialogNegativeCl…
SiobhyB May 20, 2021
1a988c7
Refactor showFeaturedImageConfirmationDialog() to use new GutenbergDi…
SiobhyB May 20, 2021
246334e
Add "org.jetbrains.annotations.NotNull" import
SiobhyB May 20, 2021
8bb8837
Fill out "onPositiveClicked" function
SiobhyB May 20, 2021
f35cea5
Fill out onNegativeClicked() function
SiobhyB May 20, 2021
3da4908
Rename instances of "BasicDialog" to "GutenbergDialog"
SiobhyB May 20, 2021
983ff6c
Update reference to Gutenberg Mobile
SiobhyB May 20, 2021
cd572af
Rename "onPositiveClicked" and "onNegativeClicked"
SiobhyB May 20, 2021
f0ff0ba
Merge branch 'develop' into gb/1011-set-featured-button
SiobhyB May 20, 2021
349fe90
Reformat code in GutenbergDialogFragment.kt
SiobhyB May 20, 2021
010505f
Update build.grade with latest reference to Gutenberg Mobile
SiobhyB May 20, 2021
f57eeaf
Save "mFeaturedImageId" in savedInstanceState() and onSaveInstanceSta…
SiobhyB May 20, 2021
3e18f04
Remove redundant comma
SiobhyB May 20, 2021
aa15b61
Add checks to ensure GutenbergDialogPositiveClickInterface and Gutenb…
SiobhyB May 21, 2021
101970c
Don't allow "mPositiveButtonLabel" to be null
SiobhyB May 21, 2021
24a0532
Add "lateinit" modifier to mPositiveButtonLabel
SiobhyB May 21, 2021
f7b81e9
Merge branch 'gb/1011-set-featured-button' into gb/1011-set-featured-…
SiobhyB May 21, 2021
7348943
Add Tracks event that fires when a featured image is removed from the…
SiobhyB May 21, 2021
bf1942f
Refactor null-checks and casting in setPositiveButton() and setNegati…
SiobhyB May 24, 2021
fe93e0b
Refactor if/else statement in onSetFeaturedImageButtonClicked()
SiobhyB May 24, 2021
33fd368
Remove call to sendToJSFeaturedImageId() from within setFeaturedImage()
SiobhyB May 24, 2021
854dd6d
Remove unnecessary semi-colons
SiobhyB May 24, 2021
62caa42
Refine string names
SiobhyB May 24, 2021
b4863bb
Merge branch 'develop' into gb/1011-set-featured-button
SiobhyB May 24, 2021
6fd6fc0
Update string name being passed to showNotice() calls
SiobhyB May 24, 2021
3751c08
Update comment to clarify reasoning behind "setFeaturedImageId" call
SiobhyB May 25, 2021
b4dc825
Reword "featured_image_replace_dialog_title" string
SiobhyB May 25, 2021
9630c29
Introduce "MEDIA_ID_NO_FEATURED_IMAGE_SET" const
SiobhyB May 25, 2021
7924341
Refactor onDismiss() in GutenbergDialogFragment
SiobhyB May 26, 2021
d41cd34
Bump reference to Gutenberg Mobile
SiobhyB May 26, 2021
ccb7292
Merge branch 'develop' into gb/1011-set-featured-button
SiobhyB May 26, 2021
36b6e2e
Remove unecessary comment before 'setFeaturedImageId'
SiobhyB May 26, 2021
1be6762
Fix 'exceeded max line length' ktlint error
SiobhyB May 26, 2021
c917a0c
Remove conditional surrounding 'GutenbergDialogOnDismissByOutsideTouc…
SiobhyB May 26, 2021
c0626bf
Update build.gradle reference to latest commit from Gutenberg Mobile
SiobhyB May 26, 2021
2e07265
Merge branch 'develop' into gutenberg/audio-block-capability
jd-alexander May 27, 2021
58c6d56
Merge branch 'develop' into gutenberg/audio-block-capability
jd-alexander May 27, 2021
96faacf
renamed capability
jd-alexander May 27, 2021
2fa9eb7
sync stories submodule hash.
jd-alexander May 27, 2021
74a2251
updated gutenberg-mobile ref.
jd-alexander May 27, 2021
2a1ef13
Bump Gutenberg Mobile reference
SiobhyB May 27, 2021
105509e
Merge branch 'develop' into gb/1011-set-featured-button
SiobhyB May 30, 2021
a7dabab
Update Gutenberg Mobile ref
fluiddot May 31, 2021
bccaaa9
reformatted use case
jd-alexander Jun 1, 2021
e81d2c2
Merge pull request #14521 from wordpress-mobile/gb/1011-set-featured-…
jd-alexander Jun 1, 2021
92816a9
Update Gutenberg Mobile ref
fluiddot Jun 1, 2021
d52f22c
Merge branch 'develop' into gb/1011-set-featured-button
SiobhyB Jun 1, 2021
fb3ba95
Import constant for use in EditPostActivity
SiobhyB Jun 1, 2021
40310c3
Rename references to 'mediaId' to 'id'
SiobhyB Jun 1, 2021
1eb55fa
Reword dialog's title for clarity.
SiobhyB Jun 2, 2021
c1f6842
Undo title case in notices for consistency
SiobhyB Jun 2, 2021
8c5005f
Update to latest Gutenberg Mobile reference
SiobhyB Jun 2, 2021
db9e884
Merge branch 'develop' into gutenberg/audio-block-capability
fluiddot Jun 3, 2021
54d9cf9
Update Gutenberg Mobile ref
fluiddot Jun 3, 2021
d7953d4
Update Gutenberg Mobile ref
fluiddot Jun 3, 2021
2caa7c0
Bump Gutenberg Mobile reference
SiobhyB Jun 3, 2021
3e2d759
Merge branch 'gutenberg/audio-block-capability' into gb/1011-set-feat…
fluiddot Jun 3, 2021
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
Prev Previous commit
Next Next commit
Rename "onPositiveClicked" and "onNegativeClicked"
These functions have been renamed to "onGutenbergDialogPositiveClicked" and "onGutenbergDialogNegativeClicked" respectively, in order to make their purpose clearer.
  • Loading branch information
SiobhyB committed May 20, 2021
commit cd572af85ca8645ae85e85b2bcc126cb08389fbc
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ class GutenbergDialogFragment() : AppCompatDialogFragment() {
private var dismissedByNegativeButton = false

interface GutenbergDialogPositiveClickInterface {
fun onPositiveClicked(instanceTag: String, mediaId: Int)
fun onGutenbergDialogPositiveClicked(instanceTag: String, mediaId: Int)
}

interface GutenbergDialogNegativeClickInterface {
fun onNegativeClicked(instanceTag: String)
fun onGutenbergDialogNegativeClicked(instanceTag: String)
}

interface GutenbergDialogOnDismissByOutsideTouchInterface {
Expand Down Expand Up @@ -85,7 +85,7 @@ class GutenbergDialogFragment() : AppCompatDialogFragment() {
dismissedByPositiveButton = true
val parentFragment: Fragment? = parentFragment
if (parentFragment != null) {
(parentFragment as GutenbergDialogPositiveClickInterface).onPositiveClicked(mTag, mMediaId)
(parentFragment as GutenbergDialogPositiveClickInterface).onGutenbergDialogPositiveClicked(mTag, mMediaId)
}
}.setCancelable(true)
}
Expand All @@ -95,7 +95,7 @@ class GutenbergDialogFragment() : AppCompatDialogFragment() {
dismissedByNegativeButton = true
val parentFragment: Fragment? = parentFragment
if (parentFragment != null) {
(parentFragment as GutenbergDialogNegativeClickInterface).onNegativeClicked(mTag)
(parentFragment as GutenbergDialogNegativeClickInterface).onGutenbergDialogNegativeClicked(mTag)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ public void showNotice(String message) {
}

@Override
public void onPositiveClicked(@NotNull String instanceTag, int mediaId) {
public void onGutenbergDialogPositiveClicked(@NotNull String instanceTag, int mediaId) {
switch (instanceTag) {
case TAG_REPLACE_FEATURED_DIALOG:
setFeaturedImage(mediaId);
Expand All @@ -1390,7 +1390,7 @@ public void onPositiveClicked(@NotNull String instanceTag, int mediaId) {
}

@Override
public void onNegativeClicked(@NotNull String instanceTag) {
public void onGutenbergDialogNegativeClicked(@NotNull String instanceTag) {
switch (instanceTag) {
case TAG_REPLACE_FEATURED_DIALOG:
// Dismiss dialog with no action.
Expand Down