mirror of
https://github.com/fumiama/copymanga.git
synced 2026-06-19 00:20:29 +08:00
2.0.beta12
1. 更新API
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
package top.fumiama.dmzj.dmzjxs
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ExampleInstrumentedTest {
|
||||
@Test
|
||||
fun useAppContext() {
|
||||
// Context of the app under test.
|
||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
assertEquals("top.fumiama.dmzj.dmzjxs", appContext.packageName)
|
||||
}
|
||||
}
|
||||
@@ -45,6 +45,7 @@ object DownloadTools {
|
||||
setRequestProperty("source", "copyApp")
|
||||
setRequestProperty("webp", "1")
|
||||
setRequestProperty("region", "0")
|
||||
setRequestProperty("authorization", "Token")
|
||||
setRequestProperty("platform", "3")
|
||||
ua?.let { setRequestProperty("User-agent", it) }
|
||||
|
||||
|
||||
@@ -304,11 +304,11 @@ class BookHandler(that: WeakReference<BookFragment>, private val path: String)
|
||||
do {
|
||||
counts[i] = counts[i] - 100
|
||||
CMApi.getApiUrl(R.string.groupInfoApiUrl, path, gpw, offset)?.let {
|
||||
Log.d("MyBFH", "get api: $it")
|
||||
if(ComicDlFragment.exit) return
|
||||
val ad = AutoDownloadThread(it) { result ->
|
||||
Log.d("MyBFH", "第${i}卷返回")
|
||||
val r =
|
||||
Gson().fromJson(result?.decodeToString(), VolumeStructure::class.java)
|
||||
val r = Gson().fromJson(result?.decodeToString(), VolumeStructure::class.java)
|
||||
re[r.results.offset / 100] = r
|
||||
}
|
||||
ads += ad
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.lang.Thread.sleep
|
||||
|
||||
@ExperimentalStdlibApi
|
||||
class SortFragment : InfoCardLoader(R.layout.fragment_sort, R.id.action_nav_sort_to_nav_book) {
|
||||
private val sortWay = listOf("datetime_updated", "-datetime_updated", "popular", "-popular")
|
||||
private val sortWay = listOf("-datetime_updated", "datetime_updated", "popular", "-popular")
|
||||
private var theme = -1
|
||||
private var sortValue = 0
|
||||
private var filter: FilterStructure? = null
|
||||
|
||||
@@ -71,7 +71,10 @@ class ViewMangaActivity : TitleActivityTemplate() {
|
||||
set(value) = setPageNumber(value)
|
||||
//var pn = 0
|
||||
private val isPnValid: Boolean get(){
|
||||
if(pn == -2) pn = realCount
|
||||
if(pn == -2) {
|
||||
pn = 0
|
||||
return true
|
||||
}
|
||||
return intent.getStringExtra("function") == "log" && pn > 0
|
||||
}
|
||||
private var tasks: Array<FutureTask<ByteArray?>?>? = null
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package top.fumiama.dmzj.dmzjxs
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
class ExampleUnitTest {
|
||||
@Test
|
||||
fun addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user