Rename SavedState to SavedValue to avoid this class to be checked for stability.

This commit is contained in:
Benoit Marty 2025-10-09 17:49:49 +02:00 committed by Benoit Marty
parent c2b2e00107
commit 19238acf5d

View file

@ -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,