From c7c142920e7d57857dbda9befc9867ac53c3c04a Mon Sep 17 00:00:00 2001
From: HuanCheng65 <22636177+HuanCheng65@users.noreply.github.com>
Date: Wed, 31 Aug 2022 09:33:10 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=BB=E9=A1=B5?=
=?UTF-8?q?=E9=97=AA=E9=80=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/src/main/AndroidManifest.xml | 5 -
.../post/fragments/MainForumListFragment.kt | 6 +-
.../tieba/post/services/OKSignService.kt | 213 ------------------
3 files changed, 5 insertions(+), 219 deletions(-)
delete mode 100644 app/src/main/java/com/huanchengfly/tieba/post/services/OKSignService.kt
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 6fb7bc36..676b7e10 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -146,11 +146,6 @@
android:label="@string/title_activity_login"
android:windowSoftInputMode="adjustResize" />
-
-
0) Toast.makeText(
- this@OKSignService,
- R.string.toast_oksign_start,
- Toast.LENGTH_SHORT
- ).show()
- }
-
- override fun onProgressStart(signDataBean: SignDataBean, current: Int, total: Int) {
- position = current
- updateNotification(
- getString(
- R.string.title_signing_progress,
- signDataBean.userName,
- current,
- total
- ),
- getString(
- R.string.title_forum_name,
- signDataBean.forumName
- )
- )
- }
-
- override fun onProgressFinish(
- signDataBean: SignDataBean,
- signResultBean: SignResultBean,
- current: Int,
- total: Int
- ) {
- updateNotification(
- getString(
- R.string.title_signing_progress,
- signDataBean.userName,
- current + 1,
- total
- ),
- if (signResultBean.userInfo?.signBonusPoint != null)
- getString(
- R.string.text_singing_progress_exp,
- signDataBean.forumName,
- signResultBean.userInfo.signBonusPoint
- )
- else
- getString(R.string.text_singing_progress, signDataBean.forumName)
- )
- }
-
- override fun onFinish(success: Boolean, signedCount: Int, total: Int) {
- updateNotification(
- getString(R.string.title_oksign_finish),
- if (total > 0) getString(
- R.string.text_oksign_done,
- signedCount
- ) else getString(R.string.text_oksign_no_signable),
- Intent(this@OKSignService, MainActivity::class.java)
- )
- sendBroadcast(Intent(ACTION_SIGN_SUCCESS_ALL))
- }
-
- override fun onFailure(current: Int, total: Int, errorCode: Int, errorMsg: String) {
- if (total == 0) {
- updateNotification(
- getString(R.string.title_oksign_fail),
- errorMsg
- )
- stopForeground(STOP_FOREGROUND_REMOVE)
- } else {
- updateNotification(getString(R.string.title_oksign_fail), errorMsg)
- }
- }
-
- companion object {
- const val TAG = "OKSignService"
- const val NOTIFICATION_CHANNEL_ID = "1"
- const val ACTION_START_SIGN = "com.huanchengfly.tieba.post.service.action.ACTION_SIGN_START"
- const val ACTION_SIGN_SUCCESS_ALL =
- "com.huanchengfly.tieba.post.service.action.SIGN_SUCCESS_ALL"
- }
-}
\ No newline at end of file