Skip to content

Instantly share code, notes, and snippets.

@naphatamity
Created August 22, 2022 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naphatamity/9dd4d31dacc5ee18a05c146d06d550fb to your computer and use it in GitHub Desktop.
Save naphatamity/9dd4d31dacc5ee18a05c146d06d550fb to your computer and use it in GitHub Desktop.
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