You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: feature/chat/data/src/main/java/io/jja08111/gemini/feature/chat/data/repository/GenerativeChatRepository.kt
+6-10
Original file line number
Diff line number
Diff line change
@@ -121,18 +121,16 @@ class GenerativeChatRepository @Inject constructor(
121
121
return runCatching {
122
122
val model = generativeModel ?:throwNotJoinedException()
123
123
val roomId = joinedRoomId ?:throwNotJoinedException()
124
-
val messageGroupStream = chatLocalDataSource.getMessageGroupStream(roomId)
125
-
val messageGroups = messageGroupStream.first()
124
+
val messageGroups = chatLocalDataSource.getMessageGroupsBy(roomId)
126
125
val lastMessageGroup = messageGroups.lastOrNull() ?:throwEmptyMessageGroupsException()
127
126
val lastPrompt = lastMessageGroup.prompt
128
-
val lastPromptId = lastPrompt.id
129
127
val responseTextBuilders =List(CANDIDATE_COUNT) { ResponseTextBuilder() }
0 commit comments