File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
feature-main/src/main/java/com/hoc/flowmvi/ui/main Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 11package com.hoc.flowmvi.ui.main
22
3+ import androidx.annotation.MainThread
34import androidx.compose.runtime.Immutable
45import arrow.core.Either
56import com.hoc.flowmvi.domain.model.User
@@ -11,6 +12,7 @@ import kotlinx.collections.immutable.PersistentList
1112import kotlinx.collections.immutable.mutate
1213import kotlinx.collections.immutable.persistentListOf
1314import kotlinx.collections.immutable.toPersistentList
15+ import kotlin.LazyThreadSafetyMode.NONE
1416
1517@Immutable
1618data class UserItem (
@@ -21,7 +23,8 @@ data class UserItem(
2123 val lastName : String ,
2224 val isDeleting : Boolean
2325) {
24- val fullName get() = " $firstName $lastName "
26+ @get:MainThread
27+ val fullName by lazy(NONE ) { " $firstName $lastName " }
2528
2629 constructor (domain: User ) : this (
2730 id = domain.id,
You can’t perform that action at this time.
0 commit comments