Skip to content

Commit cca80b2

Browse files
Rename leftover scopConfig with scopeOption (#648)
1 parent 089fb0d commit cca80b2

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

demo-app/src/main/java/com/gravatar/demoapp/ui/AvatarUpdateTab.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ fun AvatarUpdateTab(modifier: Modifier = Modifier) {
280280
gravatarQuickEditorParams = GravatarQuickEditorParams {
281281
email = Email(userEmail)
282282
uiMode = pickerUiMode
283-
scopeConfig = when (editorScope) {
283+
scopeOption = when (editorScope) {
284284
QuickEditorScope.Avatar -> QuickEditorScopeOption.avatarPicker(
285285
config = AvatarPickerConfiguration(
286286
contentLayout = pickerContentLayout,

gravatar-quickeditor/api/gravatar-quickeditor.api

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,14 +631,14 @@ public final class com/gravatar/quickeditor/ui/editor/GravatarQuickEditorParams$
631631
public final fun build ()Lcom/gravatar/quickeditor/ui/editor/GravatarQuickEditorParams;
632632
public final fun getAvatarPickerContentLayout ()Lcom/gravatar/quickeditor/ui/editor/AvatarPickerContentLayout;
633633
public final fun getEmail ()Lcom/gravatar/types/Email;
634-
public final fun getScopeConfig ()Lcom/gravatar/quickeditor/ui/editor/QuickEditorScopeOption;
634+
public final fun getScopeOption ()Lcom/gravatar/quickeditor/ui/editor/QuickEditorScopeOption;
635635
public final fun getUiMode ()Lcom/gravatar/quickeditor/ui/editor/GravatarUiMode;
636636
public final fun setAvatarPickerContentLayout (Lcom/gravatar/quickeditor/ui/editor/AvatarPickerContentLayout;)Lcom/gravatar/quickeditor/ui/editor/GravatarQuickEditorParams$Builder;
637637
public final synthetic fun setAvatarPickerContentLayout (Lcom/gravatar/quickeditor/ui/editor/AvatarPickerContentLayout;)V
638638
public final fun setEmail (Lcom/gravatar/types/Email;)Lcom/gravatar/quickeditor/ui/editor/GravatarQuickEditorParams$Builder;
639639
public final synthetic fun setEmail (Lcom/gravatar/types/Email;)V
640-
public final fun setScopeConfig (Lcom/gravatar/quickeditor/ui/editor/QuickEditorScopeOption;)Lcom/gravatar/quickeditor/ui/editor/GravatarQuickEditorParams$Builder;
641-
public final synthetic fun setScopeConfig (Lcom/gravatar/quickeditor/ui/editor/QuickEditorScopeOption;)V
640+
public final fun setScopeOption (Lcom/gravatar/quickeditor/ui/editor/QuickEditorScopeOption;)Lcom/gravatar/quickeditor/ui/editor/GravatarQuickEditorParams$Builder;
641+
public final synthetic fun setScopeOption (Lcom/gravatar/quickeditor/ui/editor/QuickEditorScopeOption;)V
642642
public final fun setUiMode (Lcom/gravatar/quickeditor/ui/editor/GravatarUiMode;)Lcom/gravatar/quickeditor/ui/editor/GravatarQuickEditorParams$Builder;
643643
public final synthetic fun setUiMode (Lcom/gravatar/quickeditor/ui/editor/GravatarUiMode;)V
644644
}

gravatar-quickeditor/src/main/java/com/gravatar/quickeditor/ui/editor/GravatarQuickEditorParams.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public class GravatarQuickEditorParams private constructor(
5050
/**
5151
* The content layout direction used in the Avatar Picker
5252
*/
53-
@Deprecated(message = "AvatarPickerContentLayout was moved to ScopeConfig")
53+
@Deprecated(message = "AvatarPickerContentLayout was moved to QuickEditorScopeOption")
5454
@set:JvmSynthetic // Hide 'void' setter from Java
5555
public var avatarPickerContentLayout: AvatarPickerContentLayout = AvatarPickerContentLayout.Horizontal
5656

@@ -64,14 +64,14 @@ public class GravatarQuickEditorParams private constructor(
6464
* The scope option for the Quick Editor
6565
*/
6666
@set:JvmSynthetic // Hide 'void' setter from Java
67-
public var scopeConfig: QuickEditorScopeOption = QuickEditorScopeOption.default
67+
public var scopeOption: QuickEditorScopeOption = QuickEditorScopeOption.default
6868

6969
/**
7070
* Sets the content layout direction used in the Avatar Picker
7171
*/
7272
@Deprecated(
73-
message = "AvatarPickerContentLayout was moved to ScopeConfig",
74-
replaceWith = ReplaceWith("setScopeConfig(scopeConfig)"),
73+
message = "AvatarPickerContentLayout was moved to QuickEditorScopeOption",
74+
replaceWith = ReplaceWith("setScopeOption(scopeOption)"),
7575
)
7676
public fun setAvatarPickerContentLayout(avatarPickerContentLayout: AvatarPickerContentLayout): Builder =
7777
apply { this.avatarPickerContentLayout = avatarPickerContentLayout }
@@ -89,8 +89,8 @@ public class GravatarQuickEditorParams private constructor(
8989
/**
9090
* Sets the scope of the Quick Editor
9191
*/
92-
public fun setScopeConfig(scopeConfig: QuickEditorScopeOption): Builder =
93-
apply { this.scopeConfig = scopeConfig }
92+
public fun setScopeOption(scopeOption: QuickEditorScopeOption): Builder =
93+
apply { this.scopeOption = scopeOption }
9494

9595
/**
9696
* Builds the GravatarQuickEditorParams object
@@ -99,7 +99,7 @@ public class GravatarQuickEditorParams private constructor(
9999
email!!,
100100
avatarPickerContentLayout,
101101
uiMode,
102-
scopeConfig.withContentLayout(avatarPickerContentLayout),
102+
scopeOption.withContentLayout(avatarPickerContentLayout),
103103
)
104104

105105
private fun QuickEditorScopeOption.withContentLayout(

gravatar-quickeditor/src/main/java/com/gravatar/quickeditor/ui/editor/QuickEditorScopeOption.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class QuickEditorScopeOption private constructor(
2424
data class AvatarPickerAndAboutEditor(val config: AvatarPickerAndAboutEditorConfiguration) : Scope()
2525
}
2626

27-
override fun toString(): String = "ScopeConfig(scope=$scope)"
27+
override fun toString(): String = "QuickEditorScopeOption(scope=$scope)"
2828

2929
override fun hashCode(): Int = Objects.hash(scope)
3030

0 commit comments

Comments
 (0)