Skip to content

Commit 5359844

Browse files
committed
fix download progress
1 parent 6982e06 commit 5359844

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/src/main/java/in/hridayan/ashell/shell/file_browser/data/repository/FileBrowserRepositoryImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ class FileBrowserRepositoryImpl @Inject constructor(
271271
emit(FileOperationResult.Error(e.message ?: "Failed to download file"))
272272
}
273273
}
274-
}.buffer(Channel.BUFFERED).flowOn(Dispatchers.IO)
274+
}.buffer(4, onBufferOverflow = kotlinx.coroutines.channels.BufferOverflow.DROP_OLDEST).flowOn(Dispatchers.IO)
275275

276276
override fun pushFile(localPath: String, remotePath: String): Flow<FileOperationResult> = flow {
277277
try {

0 commit comments

Comments
 (0)