refactor: 移除无用代码

This commit is contained in:
HuanCheng65 2022-08-08 17:58:13 +08:00
parent f6f34af024
commit 579131c31f
No known key found for this signature in database
GPG Key ID: E9031EF91A805148
3 changed files with 1 additions and 13 deletions

View File

@ -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"

View File

@ -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)!!
) )

View File

@ -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"
} }