Open BigBigDeBoy opened 4 years ago
val tempFile = task.createTaskManager().file().tmp() if (tempFile.exists()) { val fileHeader = RangeTmpFile.FileHeader() val fileContent = RangeTmpFile.FileContent() tempFile.source().buffer().use { fileHeader.read(it) fileContent.read(it, fileHeader.totalSegments) } holder.tv_downloading_size.text = "${fileContent.downloadSize().formatDownloadSize()} / ${fileHeader.totalSize.formatDownloadSize()}" }
邮件已收到,三日内拜读
val tempFile = task.createTaskManager().file().tmp() if (tempFile.exists()) { val fileHeader = RangeTmpFile.FileHeader() val fileContent = RangeTmpFile.FileContent() tempFile.source().buffer().use { fileHeader.read(it) fileContent.read(it, fileHeader.totalSegments) } holder.tv_downloading_size.text = "${fileContent.downloadSize().formatDownloadSize()} / ${fileHeader.totalSize.formatDownloadSize()}" }