Channel missing members and channel name
I'm having an issue while trying to upgrade from an older version 3** to the latest version. First, when I load channels, and open the channel detail, when I post a message to the channel, it's posted on the left hand side of the channels (for message sent by others). Also, if I load the channel list for the first time opening my app and select a channel from the list to open the channel detail, everything seems to work fine (except the issue I raised earlier), but when I go back to the channel list the channel I selected is now highlighted as having unread messages, and when I click on a new channel from the list, this time it doesn't load the channel properly as several properties (channel name and members any extra data) except the messages are all missing. This also shows on the channel list where some channels are missing the channel the abbreviation of member in the avatar for the listed channel. Please how do I resolve these issues. My code for loading the channel list is and the chat detail is below
ChannelListFragment
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
chatListFragmentBinding = DataBindingUtil.inflate(inflater, R.layout.chatlist_fragment, container, false)
ChatDomain.Builder(requireContext().applicationContext, Chat.getInstance().client, user)
.offlineEnabled()
.userPresenceEnabled()
.build()
chatListFragmentBinding.viewModel = chatListChannelsViewModel
chatListFragmentBinding.lifecycleOwner = this
val filter = and(eq("type", "messaging"), `in`("members", streamUniqueUserId))
chatListChannelsViewModel.setQuery(filter, null)
chatListFragmentBinding.subscribedChannelsList.setViewModel(chatListChannelsViewModel, this)
chatListFragmentBinding.subscribedChannelsList.setOnChannelClickListener { channel ->
listener?.onChannelSelected(channel.type, channel.id, false)
}
chatListFragmentBinding.root
}
ChannelDetailFragment
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
chatDetailBinding = DataBindingUtil.inflate(inflater, R.layout.chat_detail_fragment, container, false)
chatDetailBinding.lifecycleOwner = this
channelMessagesViewModel = ViewModelProvider(this,
ChannelViewModelFactory(requireActivity().application, channelType, channelId))[ChannelViewModel::class.java]
with(chatDetailBinding) {
messageList.setViewModel(channelMessagesViewModel, this)
messageInput.setViewModel(channelMessagesViewModel, this)
chatDetailBinding.messageInput.setPermissionRequestListener(this@ChannelDetailFragment)
}
}
Please what do I need to resolve these issues?
Thanks for report. 4.x.x is in beta right now and not stable. So it's too early to migrate from 3.x.x.
Although 4.x.x`` has offline support, so if you need it you can try 4.x.x`.
Hello @Chikrix Several improvements has been done on the beta version 4.2.11-beta-6. It is not a final version yet, we will notify on #554 when it is ready. Following your Issues: -. Messages I sent are shown on the left side" -> It is already fixed, it was fixed on #556 -. ChannelHeaderView data was refactored and should show proper information after #491
Could you try to use version 4.2.11-beta-6 and tell us if you have those issues yet? Feel free to ask us any quesetion ;)
Hello @Chikrix
Were you able to check it out? Is it working to you? We have released a new beta version with more improvement, let us know if this issues is fixed to you?
I'm on Beta7, one thing I noticed is that the ChannelsFragment doesn't always refresh on new messages or new channels being created. Also some of the DM's supposed to have the user name on showing as "Channel without name"
This issue has been resolved in the latest SDKs
I'm still seeing this on the new build, maybe different root cause: #644