This commit is contained in:
tom5079
2019-11-30 16:10:09 +09:00
parent e497d47374
commit 74033b9f4a
2 changed files with 14 additions and 6 deletions

View File

@@ -576,6 +576,17 @@ class MainActivity : AppCompatActivity() {
} }
} }
histories.remove(galleryID)
if (this@MainActivity.mode == Mode.HISTORY) {
runOnUiThread {
cancelFetch()
clearGalleries()
fetchGalleries(query, sortMode)
loadBlocks()
}
}
completeFlag.put(galleryID, false) completeFlag.put(galleryID, false)
} }
@@ -1165,7 +1176,7 @@ class MainActivity : AppCompatActivity() {
} }
} ?: return@async null } ?: return@async null
val thumbnail = async { val thumbnail = async(Dispatchers.IO) {
val ext = galleryBlock.thumbnails[0].split('.').last() val ext = galleryBlock.thumbnails[0].split('.').last()
File(getCachedGallery(this@MainActivity, galleryBlock.id), "thumbnail.$ext").apply { File(getCachedGallery(this@MainActivity, galleryBlock.id), "thumbnail.$ext").apply {
if (!exists()) if (!exists())

View File

@@ -20,22 +20,19 @@
package xyz.quaver.pupil package xyz.quaver.pupil
import org.junit.Test
/** /**
* Example local unit test, which will execute on the development machine (host). * Example local unit test, which will execute on the development machine (host).
* *
* See [testing documentation](http://d.android.com/tools/testing). * See [testing documentation](http://d.android.com/tools/testing).
*/ */
import org.junit.Test
class ExampleUnitTest { class ExampleUnitTest {
@Test @Test
fun test() { fun test() {
val current = "0.1"
val latest = "0.2"
print(current < latest)
} }
} }