Right now the state handling in manual fragments is a bit cumbersome because the indices are managed manually.
With compiler plugin support the following pattern should be implemented:
@AdaptiveActual
class SomeFragment(
adapter: AdaptiveAdapter,
parent: AdaptiveFragment,
index: Int
) : AdaptiveFragment(adapter, parent, index, auto, auto) {
val name : String? by state()
val otherName by state<String?>()
override fun genPatchInternal() : Boolean {
if (name.isDirty()) {
/* ... */
}
}
}
Right now the state handling in manual fragments is a bit cumbersome because the indices are managed manually.
With compiler plugin support the following pattern should be implemented: