mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-17 19:59:17 +01:00
Fix Bangumi class formatting
This commit is contained in:
parent
427d2fed8c
commit
44f406b4b9
@ -13,6 +13,14 @@ import uy.kohesive.injekt.injectLazy
|
|||||||
|
|
||||||
class Bangumi(private val context: Context, id: Int) : TrackService(id) {
|
class Bangumi(private val context: Context, id: Int) : TrackService(id) {
|
||||||
|
|
||||||
|
override val name = "Bangumi"
|
||||||
|
|
||||||
|
private val gson: Gson by injectLazy()
|
||||||
|
|
||||||
|
private val interceptor by lazy { BangumiInterceptor(this, gson) }
|
||||||
|
|
||||||
|
private val api by lazy { BangumiApi(client, interceptor) }
|
||||||
|
|
||||||
override fun getScoreList(): List<String> {
|
override fun getScoreList(): List<String> {
|
||||||
return IntRange(0, 10).map(Int::toString)
|
return IntRange(0, 10).map(Int::toString)
|
||||||
}
|
}
|
||||||
@ -72,25 +80,6 @@ class Bangumi(private val context: Context, id: Int) : TrackService(id) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
|
||||||
const val READING = 3
|
|
||||||
const val COMPLETED = 2
|
|
||||||
const val ON_HOLD = 4
|
|
||||||
const val DROPPED = 5
|
|
||||||
const val PLANNING = 1
|
|
||||||
|
|
||||||
const val DEFAULT_STATUS = READING
|
|
||||||
const val DEFAULT_SCORE = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
override val name = "Bangumi"
|
|
||||||
|
|
||||||
private val gson: Gson by injectLazy()
|
|
||||||
|
|
||||||
private val interceptor by lazy { BangumiInterceptor(this, gson) }
|
|
||||||
|
|
||||||
private val api by lazy { BangumiApi(client, interceptor) }
|
|
||||||
|
|
||||||
override fun getLogo() = R.drawable.tracker_bangumi
|
override fun getLogo() = R.drawable.tracker_bangumi
|
||||||
|
|
||||||
override fun getLogoColor() = Color.rgb(0xF0, 0x91, 0x99)
|
override fun getLogoColor() = Color.rgb(0xF0, 0x91, 0x99)
|
||||||
@ -141,4 +130,15 @@ class Bangumi(private val context: Context, id: Int) : TrackService(id) {
|
|||||||
preferences.trackToken(this).set(null)
|
preferences.trackToken(this).set(null)
|
||||||
interceptor.newAuth(null)
|
interceptor.newAuth(null)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
const val READING = 3
|
||||||
|
const val COMPLETED = 2
|
||||||
|
const val ON_HOLD = 4
|
||||||
|
const val DROPPED = 5
|
||||||
|
const val PLANNING = 1
|
||||||
|
|
||||||
|
const val DEFAULT_STATUS = READING
|
||||||
|
const val DEFAULT_SCORE = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user