Skip to content

Commit bf0d778

Browse files
Show the combined scope when launching the QE
1 parent f4882de commit bf0d778

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

WordPress/src/main/java/org/wordpress/android/ui/main/MeFragment.kt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import com.gravatar.quickeditor.GravatarQuickEditor
2727
import com.gravatar.quickeditor.ui.editor.AboutEditorResult
2828
import com.gravatar.quickeditor.ui.editor.AboutInputField
2929
import com.gravatar.quickeditor.ui.editor.AuthenticationMethod
30+
import com.gravatar.quickeditor.ui.editor.AvatarPickerAndAboutEditorConfiguration
3031
import com.gravatar.quickeditor.ui.editor.AvatarPickerResult
3132
import com.gravatar.quickeditor.ui.editor.GravatarQuickEditorParams
3233
import com.gravatar.quickeditor.ui.editor.QuickEditorScopeOption
@@ -287,7 +288,7 @@ class MeFragment : Fragment(R.layout.me_fragment), OnScrollToTopListener {
287288
private fun MeFragmentBinding.showAvatarPicker() {
288289
withVeryfiedEmail(unverifiedEmailMessageRes = R.string.avatar_update_email_unverified) {
289290
if (gravatarQuickEditorFeatureConfig.isEnabled()) {
290-
showQuickEditor(scope = QuickEditorScopeOption.avatarPicker())
291+
showQuickEditor(page = AvatarPickerAndAboutEditorConfiguration.Page.AvatarPicker)
291292
} else {
292293
showPhotoPickerForGravatar()
293294
}
@@ -296,27 +297,26 @@ class MeFragment : Fragment(R.layout.me_fragment), OnScrollToTopListener {
296297

297298
private fun MeFragmentBinding.showProfileEditor() {
298299
withVeryfiedEmail(unverifiedEmailMessageRes = R.string.about_update_email_unverified) {
299-
showQuickEditor(
300-
scope = QuickEditorScopeOption.aboutEditor {
301-
fields = setOf(
302-
AboutInputField.FirstName,
303-
AboutInputField.LastName,
304-
AboutInputField.DisplayName,
305-
AboutInputField.AboutMe
306-
)
307-
}
308-
)
300+
showQuickEditor(page = AvatarPickerAndAboutEditorConfiguration.Page.AboutEditor)
309301
}
310302
}
311303

312304
private fun MeFragmentBinding.showQuickEditor(
313-
scope: QuickEditorScopeOption
305+
page: AvatarPickerAndAboutEditorConfiguration.Page
314306
) {
315307
GravatarQuickEditor.show(
316308
fragment = this@MeFragment,
317309
gravatarQuickEditorParams = GravatarQuickEditorParams {
318310
email = Email(accountStore.account.email)
319-
scopeOption = scope
311+
scopeOption = QuickEditorScopeOption.avatarAndAbout {
312+
initialPage = page
313+
fields = setOf(
314+
AboutInputField.FirstName,
315+
AboutInputField.LastName,
316+
AboutInputField.DisplayName,
317+
AboutInputField.AboutMe
318+
)
319+
}
320320
},
321321
authenticationMethod = AuthenticationMethod.Bearer(accountStore.accessToken.orEmpty()),
322322
updateHandler = { event ->

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ google-play-app-update = '2.1.0'
7070
google-play-review = '2.0.2'
7171
google-play-services-auth = '20.4.1'
7272
google-services = '4.4.2'
73-
gravatar = '2.5.0-rc2'
73+
gravatar = '2.5.0-rc3'
7474
greenrobot-eventbus = '3.3.1'
7575
gutenberg-kit = 'trunk-1b19fef4cb557afb9727497a441bb411cdb8895a'
7676
gutenberg-mobile = 'v1.121.0'

0 commit comments

Comments
 (0)