using single instance of the clock to avoid recomposition lookups

This commit is contained in:
Adam Brown 2022-05-08 14:37:12 +01:00
parent ea2a960a3d
commit cd0b3f567b
1 changed files with 3 additions and 1 deletions

View File

@ -115,13 +115,15 @@ private fun DirectoryViewModel.ObserveEvents(listState: LazyListState, toolbarPo
}
}
val clock = Clock.systemUTC()
@Composable
private fun Content(listState: LazyListState, state: Content) {
val context = LocalContext.current
val navigateToRoom = { roomId: RoomId ->
context.startActivity(MessengerActivity.newInstance(context, roomId))
}
val clock = Clock.systemUTC()
val scope = rememberCoroutineScope()
LaunchedEffect(key1 = state.overviewState) {