Skip to content

Instantly share code, notes, and snippets.

@naphatamity
Created August 22, 2022 10:30
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
class AmityRecentChatViewModel : AmityBaseViewModel() {
var recentChatItemClickListener: AmityRecentChatItemClickListener? = null
fun getRecentChat(): Flowable<PagedList<AmityChannel>> {
val channelRepository: AmityChannelRepository = AmityChatClient.newChannelRepository()
val types = listOf(AmityChannel.Type.CONVERSATION, AmityChannel.Type.COMMUNITY, AmityChannel.Type.LIVE)
return channelRepository.getChannels()
.types(types)
.filter(AmityChannelFilter.MEMBER)
.build()
.query()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment