Closed techyourchance closed 1 year ago
Sealed classes are Kotlins specifics and cannot be saved in the SavedViewHolder
. This feature is supported in the Compose version of this library.
Compose is great, but I'm sure that many projects who use this lib haven't migrated to Compose yet.
I don't know what SavedViewHolder
is, but I'm sure that a suitable solution can be found. For example, initially, I considered adding this sealed class in addition to the original Enum, which would keep the code fully backwards-compatible. Theoretically, we could even create a scheme that would be serializable from Java.
If you're interested, I can spend a bit more time on this PR.
Changed Position enum to be sealed class and added CUSTOM subtype. This change should be source-code backwards compatible, but, probably, won't be binary compatible.