Skip to content
Merged
Show file tree
Hide file tree
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 @@ -1192,7 +1192,7 @@ public final class io/getstream/chat/android/compose/ui/channel/info/GroupChanne
}

public final class io/getstream/chat/android/compose/ui/channels/ChannelsScreenKt {
public static final fun ChannelsScreen (Lio/getstream/chat/android/compose/viewmodel/channels/ChannelViewModelFactory;Ljava/lang/String;Ljava/lang/String;ZLio/getstream/chat/android/compose/ui/channels/SearchMode;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Landroidx/compose/runtime/Composer;III)V
public static final fun ChannelsScreen (Lio/getstream/chat/android/compose/viewmodel/channels/ChannelViewModelFactory;Ljava/lang/String;Ljava/lang/String;ZLio/getstream/chat/android/compose/ui/channels/SearchMode;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;ZLandroidx/compose/runtime/Composer;III)V
}

public final class io/getstream/chat/android/compose/ui/channels/SearchMode : java/lang/Enum {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ import io.getstream.chat.android.ui.common.state.channels.actions.ViewInfo
* @param onChannelClick Handler for Channel item clicks.
* @param onViewChannelInfoAction Handler for when the user selects the [ViewInfo] option for a [Channel].
* @param onBackPressed Handler for back press action.
* @param isBackPressEnabled Indicator if the default back handler is enabled. Set to `false` to fully disable the back
* handling and catch the back-press event in a [BackHandler] higher in the compose hierarchy. Default: `true`.
*/
@Composable
@Suppress("LongMethod")
Expand All @@ -94,6 +96,7 @@ public fun ChannelsScreen(
onSearchMessageItemClick: (Message) -> Unit = {},
onViewChannelInfoAction: (Channel) -> Unit = {},
onBackPressed: () -> Unit = {},
isBackPressEnabled: Boolean = true,
) {
val listViewModel: ChannelListViewModel = viewModel(
ChannelListViewModel::class.java,
Expand All @@ -105,7 +108,7 @@ public fun ChannelsScreen(
val user by listViewModel.user.collectAsState()
val connectionState by listViewModel.connectionState.collectAsState()

BackHandler(enabled = true) {
BackHandler(enabled = isBackPressEnabled) {
if (selectedChannel != null) {
listViewModel.selectChannel(null)
} else {
Expand Down
Loading