@@ -27,6 +27,7 @@ import com.gravatar.quickeditor.GravatarQuickEditor
27
27
import com.gravatar.quickeditor.ui.editor.AboutEditorResult
28
28
import com.gravatar.quickeditor.ui.editor.AboutInputField
29
29
import com.gravatar.quickeditor.ui.editor.AuthenticationMethod
30
+ import com.gravatar.quickeditor.ui.editor.AvatarPickerAndAboutEditorConfiguration
30
31
import com.gravatar.quickeditor.ui.editor.AvatarPickerResult
31
32
import com.gravatar.quickeditor.ui.editor.GravatarQuickEditorParams
32
33
import com.gravatar.quickeditor.ui.editor.QuickEditorScopeOption
@@ -287,7 +288,7 @@ class MeFragment : Fragment(R.layout.me_fragment), OnScrollToTopListener {
287
288
private fun MeFragmentBinding.showAvatarPicker () {
288
289
withVeryfiedEmail(unverifiedEmailMessageRes = R .string.avatar_update_email_unverified) {
289
290
if (gravatarQuickEditorFeatureConfig.isEnabled()) {
290
- showQuickEditor(scope = QuickEditorScopeOption .avatarPicker() )
291
+ showQuickEditor(page = AvatarPickerAndAboutEditorConfiguration . Page . AvatarPicker )
291
292
} else {
292
293
showPhotoPickerForGravatar()
293
294
}
@@ -296,27 +297,26 @@ class MeFragment : Fragment(R.layout.me_fragment), OnScrollToTopListener {
296
297
297
298
private fun MeFragmentBinding.showProfileEditor () {
298
299
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 )
309
301
}
310
302
}
311
303
312
304
private fun MeFragmentBinding.showQuickEditor (
313
- scope : QuickEditorScopeOption
305
+ page : AvatarPickerAndAboutEditorConfiguration . Page
314
306
) {
315
307
GravatarQuickEditor .show(
316
308
fragment = this @MeFragment,
317
309
gravatarQuickEditorParams = GravatarQuickEditorParams {
318
310
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
+ }
320
320
},
321
321
authenticationMethod = AuthenticationMethod .Bearer (accountStore.accessToken.orEmpty()),
322
322
updateHandler = { event ->
0 commit comments