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