Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalInspectionMode
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.lifecycle.Lifecycle
import androidx.paging.LoadState
import androidx.paging.compose.LazyPagingItems
import com.ramcosta.composedestinations.generated.app.destinations.BrowseChannelsScreenDestination
Expand Down Expand Up @@ -166,7 +167,9 @@ fun ConversationsScreenContent(

when (val state = conversationListViewModel.conversationListState) {
is ConversationListState.Paginated -> {
val lazyPagingItems = state.conversations.collectAsLazyPagingItemsWithLifecycle()
val lazyPagingItems = state.conversations.collectAsLazyPagingItemsWithLifecycle(
minActiveState = Lifecycle.State.STARTED
)
searchBarState.searchVisibleChanged(lazyPagingItems.itemCount > 0 || searchBarState.isSearchActive)
when {
// when conversation list is not yet fetched, show loading indicator
Expand Down
Loading