Rename SavedState to SavedValue to avoid this class to be checked for stability.
This commit is contained in:
parent
c2b2e00107
commit
19238acf5d
1 changed files with 5 additions and 5 deletions
|
|
@ -128,15 +128,15 @@ class MarkdownTextEditorState(
|
|||
}
|
||||
|
||||
@Parcelize
|
||||
data class SavedState(
|
||||
data class SavedValue(
|
||||
val text: CharSequence,
|
||||
val selectionStart: Int,
|
||||
val selectionEnd: Int,
|
||||
) : Parcelable
|
||||
}
|
||||
|
||||
object MarkdownTextEditorStateSaver : Saver<MarkdownTextEditorState, MarkdownTextEditorState.SavedState> {
|
||||
override fun restore(value: MarkdownTextEditorState.SavedState): MarkdownTextEditorState {
|
||||
object MarkdownTextEditorStateSaver : Saver<MarkdownTextEditorState, MarkdownTextEditorState.SavedValue> {
|
||||
override fun restore(value: MarkdownTextEditorState.SavedValue): MarkdownTextEditorState {
|
||||
return MarkdownTextEditorState(
|
||||
initialText = "",
|
||||
initialFocus = false,
|
||||
|
|
@ -146,8 +146,8 @@ object MarkdownTextEditorStateSaver : Saver<MarkdownTextEditorState, MarkdownTex
|
|||
}
|
||||
}
|
||||
|
||||
override fun SaverScope.save(value: MarkdownTextEditorState): MarkdownTextEditorState.SavedState {
|
||||
return MarkdownTextEditorState.SavedState(
|
||||
override fun SaverScope.save(value: MarkdownTextEditorState): MarkdownTextEditorState.SavedValue {
|
||||
return MarkdownTextEditorState.SavedValue(
|
||||
text = value.text.value(),
|
||||
selectionStart = value.selection.first,
|
||||
selectionEnd = value.selection.last,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue