Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- override fun updateUnreadCount(qiscusComment: QiscusComment?) {
- val room = QiscusCore.getDataStore().getChatRoom(qiscusComment!!.roomId)
- if (room == null) {
- getRoomDetail(qiscusComment.roomId.toString(), false, object : ChatServiceProtocol
- .Callback<ChatRoom> {
- override fun call(t: ChatRoom) {
- }
- override fun onError(t: Throwable) {
- }
- })
- return
- }
- if (qiscusComment.isMyComment) {
- room.unreadCount = 0
- } else {
- room.unreadCount = room.unreadCount + 1
- }
- QiscusCore.getDataStore().addOrUpdate(room)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement