mirror of
https://github.com/InvertGeek/MixFile.git
synced 2026-06-06 12:29:45 +08:00
支持多个文件弹窗同时打开
This commit is contained in:
@@ -14,8 +14,8 @@ android {
|
||||
applicationId = "com.donut.mixfile"
|
||||
minSdk = 24
|
||||
targetSdk = 34
|
||||
versionCode = 70
|
||||
versionName = "1.8.10"
|
||||
versionCode = 71
|
||||
versionName = "1.8.11"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables {
|
||||
|
||||
@@ -102,7 +102,7 @@ class VideoActivity : MixActivity("video") {
|
||||
playHistory.toMutableList().apply {
|
||||
add(0, VideoHistory(time, videoPlayerUrl))
|
||||
if (this.size > 10) {
|
||||
this.removeLast()
|
||||
this.removeAt(this.lastIndex)
|
||||
}
|
||||
playHistory = this.distinct()
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ fun showFileInfoDialog(
|
||||
shareInfo: MixShareInfo,
|
||||
onDismiss: () -> Unit = {}
|
||||
) {
|
||||
MixDialogBuilder("文件信息").apply {
|
||||
MixDialogBuilder("文件信息",tag="file-info-${shareInfo.url}").apply {
|
||||
onDismiss(onDismiss)
|
||||
setContent {
|
||||
val dataLog = remember(shareInfo, favorites, uploadLogs) {
|
||||
|
||||
@@ -17,9 +17,12 @@ import com.donut.mixfile.util.compressGzip
|
||||
import com.donut.mixfile.util.decompressGzip
|
||||
import com.donut.mixfile.util.formatFileSize
|
||||
import com.donut.mixfile.util.getCurrentTime
|
||||
import com.donut.mixfile.util.hashSHA256
|
||||
import com.donut.mixfile.util.hashToMD5String
|
||||
import com.donut.mixfile.util.objects.ProgressContent
|
||||
import com.donut.mixfile.util.showErrorDialog
|
||||
import com.donut.mixfile.util.showToast
|
||||
import com.donut.mixfile.util.toHex
|
||||
import com.donut.mixfile.util.toJsonString
|
||||
import io.ktor.client.plugins.onDownload
|
||||
import io.ktor.client.request.prepareGet
|
||||
@@ -72,7 +75,8 @@ fun showFileList(fileList: List<FileDataLog>) {
|
||||
val fileTotalSize = fileList.sumOf { it.size }
|
||||
MixDialogBuilder(
|
||||
"文件列表",
|
||||
"共 ${fileList.size} 个文件 总大小: ${formatFileSize(fileTotalSize)}"
|
||||
"共 ${fileList.size} 个文件 总大小: ${formatFileSize(fileTotalSize)}",
|
||||
tag = "file-list-${fileList.joinToString { it.shareInfoData }.hashSHA256().toHex()}"
|
||||
).apply {
|
||||
setContent {
|
||||
FileCardList(fileList)
|
||||
|
||||
Reference in New Issue
Block a user