/AmityRecentChatViewModel.kt Secret
Created
August 22, 2022 10:30
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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