feature (space) : start logic for joining space
This commit is contained in:
parent
4869c0b5d7
commit
e79281a78a
11 changed files with 167 additions and 81 deletions
|
|
@ -29,6 +29,8 @@ import kotlinx.collections.immutable.toPersistentSet
|
|||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.flow.map
|
||||
import kotlinx.coroutines.launch
|
||||
import java.util.Optional
|
||||
import kotlin.jvm.optionals.getOrNull
|
||||
|
||||
@Inject
|
||||
class SpacePresenter(
|
||||
|
|
@ -64,7 +66,7 @@ class SpacePresenter(
|
|||
}
|
||||
}.collectAsState()
|
||||
|
||||
val currentSpace by remember { spaceRoomList.currentSpaceFlow() }.collectAsState(null)
|
||||
val currentSpace by remember { spaceRoomList.currentSpaceFlow() }.collectAsState(Optional.empty())
|
||||
|
||||
fun handleEvents(event: SpaceEvents) {
|
||||
when (event) {
|
||||
|
|
@ -72,7 +74,7 @@ class SpacePresenter(
|
|||
}
|
||||
}
|
||||
return SpaceState(
|
||||
currentSpace = currentSpace,
|
||||
currentSpace = currentSpace.getOrNull(),
|
||||
children = children.toPersistentList(),
|
||||
seenSpaceInvites = seenSpaceInvites,
|
||||
hideInvitesAvatar = hideInvitesAvatar,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue