File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
chat/src/main/kotlin/xyz/flipchat/services/internal/db
sdk/src/main/kotlin/xyz/flipchat/chat Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -130,8 +130,8 @@ interface ConversationDao {
130
130
fun clearConversations ()
131
131
132
132
@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? {
135
135
return getUnreadCount(conversationId.base58)
136
136
}
137
137
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ class RoomController @Inject constructor(
67
67
}
68
68
69
69
suspend fun getUnreadCount (identifier : ID ): Int {
70
- return db.conversationDao().getUnreadCount(identifier)
70
+ return db.conversationDao().getUnreadCount(identifier) ? : 0
71
71
}
72
72
73
73
suspend fun getChatMembers (identifier : ID ) {
You can’t perform that action at this time.
0 commit comments