File tree Expand file tree Collapse file tree
chat/src/main/kotlin/xyz/flipchat/services/internal/db
sdk/src/main/kotlin/xyz/flipchat/chat Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,8 +130,8 @@ interface ConversationDao {
130130 fun clearConversations ()
131131
132132 @Query(" SELECT unreadCount FROM conversations WHERE idBase58 = :conversationId" )
133- suspend fun getUnreadCount (conversationId : String ): Int
134- suspend fun getUnreadCount (conversationId : ID ): Int {
133+ suspend fun getUnreadCount (conversationId : String ): Int?
134+ suspend fun getUnreadCount (conversationId : ID ): Int? {
135135 return getUnreadCount(conversationId.base58)
136136 }
137137
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ class RoomController @Inject constructor(
6767 }
6868
6969 suspend fun getUnreadCount (identifier : ID ): Int {
70- return db.conversationDao().getUnreadCount(identifier)
70+ return db.conversationDao().getUnreadCount(identifier) ? : 0
7171 }
7272
7373 suspend fun getChatMembers (identifier : ID ) {
You can’t perform that action at this time.
0 commit comments