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 1
1
package com.hoc.flowmvi.ui.main
2
2
3
+ import androidx.annotation.MainThread
3
4
import androidx.compose.runtime.Immutable
4
5
import arrow.core.Either
5
6
import com.hoc.flowmvi.domain.model.User
@@ -11,6 +12,7 @@ import kotlinx.collections.immutable.PersistentList
11
12
import kotlinx.collections.immutable.mutate
12
13
import kotlinx.collections.immutable.persistentListOf
13
14
import kotlinx.collections.immutable.toPersistentList
15
+ import kotlin.LazyThreadSafetyMode.NONE
14
16
15
17
@Immutable
16
18
data class UserItem (
@@ -21,7 +23,8 @@ data class UserItem(
21
23
val lastName : String ,
22
24
val isDeleting : Boolean
23
25
) {
24
- val fullName get() = " $firstName $lastName "
26
+ @get:MainThread
27
+ val fullName by lazy(NONE ) { " $firstName $lastName " }
25
28
26
29
constructor (domain: User ) : this (
27
30
id = domain.id,
You can’t perform that action at this time.
0 commit comments