refactor: 移除无用代码
This commit is contained in:
parent
f6f34af024
commit
579131c31f
|
|
@ -19,14 +19,6 @@ object Error {
|
||||||
const val ERROR_UPDATE_NOT_ENABLE = 100
|
const val ERROR_UPDATE_NOT_ENABLE = 100
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
object Url {
|
|
||||||
const val UPDATE_INFO = "https://huancheng65.github.io/TiebaLite/update_v2.json"
|
|
||||||
const val CHECK_UPDATE = "https://tblite.huanchengfly.tk/api/update"
|
|
||||||
const val CHANGELOG = "https://tblite.huanchengfly.tk/api/changelog/"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
object Header {
|
object Header {
|
||||||
const val FORCE_PARAM = "force_param"
|
const val FORCE_PARAM = "force_param"
|
||||||
const val FORCE_PARAM_QUERY = "query"
|
const val FORCE_PARAM_QUERY = "query"
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,6 @@ class OKSignService : IntentService(TAG), CoroutineScope, ProgressListener {
|
||||||
if (loginInfo != null) {
|
if (loginInfo != null) {
|
||||||
runBlocking {
|
runBlocking {
|
||||||
SingleAccountSigner(
|
SingleAccountSigner(
|
||||||
this,
|
|
||||||
this@OKSignService,
|
this@OKSignService,
|
||||||
AccountUtil.getLoginInfo(this@OKSignService)!!
|
AccountUtil.getLoginInfo(this@OKSignService)!!
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import com.huanchengfly.tieba.post.api.retrofit.exception.getErrorCode
|
||||||
import com.huanchengfly.tieba.post.api.retrofit.exception.getErrorMessage
|
import com.huanchengfly.tieba.post.api.retrofit.exception.getErrorMessage
|
||||||
import com.huanchengfly.tieba.post.models.SignDataBean
|
import com.huanchengfly.tieba.post.models.SignDataBean
|
||||||
import com.huanchengfly.tieba.post.models.database.Account
|
import com.huanchengfly.tieba.post.models.database.Account
|
||||||
import kotlinx.coroutines.CoroutineScope
|
|
||||||
import kotlinx.coroutines.FlowPreview
|
import kotlinx.coroutines.FlowPreview
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.flow.*
|
import kotlinx.coroutines.flow.*
|
||||||
|
|
@ -19,7 +18,6 @@ import java.util.concurrent.ThreadLocalRandom
|
||||||
import kotlin.properties.Delegates
|
import kotlin.properties.Delegates
|
||||||
|
|
||||||
abstract class IOKSigner(
|
abstract class IOKSigner(
|
||||||
val coroutineScope: CoroutineScope,
|
|
||||||
context: Context
|
context: Context
|
||||||
) {
|
) {
|
||||||
private val contextWeakReference: WeakReference<Context> = WeakReference(context)
|
private val contextWeakReference: WeakReference<Context> = WeakReference(context)
|
||||||
|
|
@ -89,10 +87,9 @@ class MultiAccountSigner(
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class SingleAccountSigner(
|
class SingleAccountSigner(
|
||||||
coroutineScope: CoroutineScope,
|
|
||||||
context: Context,
|
context: Context,
|
||||||
private val account: Account
|
private val account: Account
|
||||||
) : IOKSigner(coroutineScope, context) {
|
) : IOKSigner(context) {
|
||||||
companion object {
|
companion object {
|
||||||
const val TAG = "SingleAccountSigner"
|
const val TAG = "SingleAccountSigner"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue