2

I am developing an Android App which contains chatting. I am able to connect User and create channel but some how I could not display the channel list. I am using the code block which is in documentation

val viewModel: ChannelListViewModel by viewModels {
        ChannelListViewModelFactory(
            filter = Filters.and(
                Filters.eq("type", "messaging"),
                Filters.`in`("members", listOf("asb")),
            ),
            sort = ChannelListViewModel.DEFAULT_SORT,
            limit = 30,
        )
    }
    // Bind the ViewModel with ChannelListView
    viewModel.bindView(binding.channelListView, viewLifecycleOwner)

When I go to channel list, It only display the progress bar.

  • To debug it I think first you need to make sure that the channels are available with the filters that you are passing. In your case you are trying to fetch all the channels with type = messaging and at least one member's id = "asb". I would suggest that remove the second filter and try you can some channel listed or not? – Belal Khan Jun 24 '22 at 08:30

0 Answers0