File tree Expand file tree Collapse file tree
app/src/main/java/com/nextcloud/talk/chat/data/network Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -239,23 +239,25 @@ class OfflineFirstChatRepository @Inject constructor(
239239 }
240240 }
241241
242- private suspend fun handleUploadsFromDb () {
243- fileUploadsDao.getFileUploadsForConversation(internalConversationId)
244- .onEach {
245- _uploadsFlow .emit(
246- it.map { item ->
247- FileUploadModel (
248- id = item.id,
249- fileName = item.fileName,
250- progress = item.progress
251- )
252- }
253- )
254- }
255- .catch {
256- Log .e(TAG , " Failed reading uploads" )
257- }
258- .collect()
242+ private fun handleUploadsFromDb () {
243+ scope.launch {
244+ fileUploadsDao.getFileUploadsForConversation(internalConversationId)
245+ .onEach {
246+ _uploadsFlow .emit(
247+ it.map { item ->
248+ FileUploadModel (
249+ id = item.id,
250+ fileName = item.fileName,
251+ progress = item.progress
252+ )
253+ }
254+ )
255+ }
256+ .catch {
257+ Log .e(TAG , " Failed reading uploads" )
258+ }
259+ .collect()
260+ }
259261 }
260262
261263 private suspend fun getCappedMessagesAmountOfChatBlock (messageId : Long ): Int {
You can’t perform that action at this time.
0 commit comments