how can i create a serializer for href #560
-
i am using type safe arg for that my data class needs to be serializable how can i make Href serializable i have seperate screen for table of content so i want to pass the href to jump on specific part
moreover is there any way to avoid false positive ( like a jump from one chapter to another) while saving the reading progress using currentLocator |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Which version of the Kotlin toolkit are you using?
I don't understand, what do you mean by false positive in this context? |
Beta Was this translation helpful? Give feedback.
I think there's a confusion with the
Href
in the v3, we'll explore an alternative. But basically you should not useHref
here. Instead, use anUrl
fromLink.url()
. As forSerializable
,Url
isParcelable
so you might be able to write a serializer based on it. Or as an alternative, just use aString
(url.toString()
andUrl(string)
if you need to construct it again).I wouldn't recommend doing that. We typically just store the current locator as is. Users may le…