Bug fix
This commit is contained in:
@@ -20,7 +20,7 @@ android {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 29
|
||||
versionCode 57
|
||||
versionName "5.0-beta3"
|
||||
versionName "5.0-beta4"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"filters": [],
|
||||
"properties": [],
|
||||
"versionCode": 57,
|
||||
"versionName": "5.0-beta3",
|
||||
"versionName": "5.0-beta4",
|
||||
"enabled": true,
|
||||
"outputFile": "app-release.apk"
|
||||
}
|
||||
|
||||
@@ -93,11 +93,10 @@ class GalleryBlockAdapter(private val glide: RequestManager, private val galleri
|
||||
val imageList = cache.metadata.imageList!!
|
||||
|
||||
progress = imageList.filterNotNull().size
|
||||
max = imageList.size
|
||||
|
||||
if (visibility == View.GONE) {
|
||||
if (visibility == View.GONE)
|
||||
visibility = View.VISIBLE
|
||||
max = imageList.size
|
||||
}
|
||||
|
||||
if (progress == max) {
|
||||
val downloadManager = DownloadManager.getInstance(context)
|
||||
|
||||
@@ -328,9 +328,11 @@ class DownloadService : Service() {
|
||||
}
|
||||
}
|
||||
|
||||
reader.requestBuilders.filterIndexed { index, _ -> progress[galleryID]?.get(index)?.isInfinite() != true }.forEachIndexed { index, it ->
|
||||
val request = it.tag(Tag(galleryID, index, startId)).build()
|
||||
client.newCall(request).enqueue(callback)
|
||||
reader.requestBuilders.forEachIndexed { index, it ->
|
||||
if (progress[galleryID]?.get(index)?.isInfinite() != true) {
|
||||
val request = it.tag(Tag(galleryID, index, startId)).build()
|
||||
client.newCall(request).enqueue(callback)
|
||||
}
|
||||
}
|
||||
|
||||
queued.forEach { download(it) }
|
||||
|
||||
@@ -1034,7 +1034,7 @@ class MainActivity : AppCompatActivity() {
|
||||
val downloads = DownloadManager.getInstance(this@MainActivity).downloadFolderMap.keys.toList()
|
||||
|
||||
when {
|
||||
query.isEmpty() -> downloads.also {
|
||||
query.isEmpty() -> downloads.reversed().also {
|
||||
totalItems = it.size
|
||||
}
|
||||
else -> {
|
||||
|
||||
@@ -82,7 +82,7 @@ class MirrorDialog(context: Context) : AlertDialog(context) {
|
||||
}
|
||||
|
||||
onItemMoved = {
|
||||
Preferences["mirrors", it.joinToString(">")]
|
||||
Preferences["mirrors"] = it.joinToString(">")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user