From 8b31ff697518a98bf5a2fc6b8ca02cfa6749da1a Mon Sep 17 00:00:00 2001 From: HuanCheng65 <22636177+HuanCheng65@users.noreply.github.com> Date: Fri, 2 Feb 2024 14:17:25 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=A7=BB=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 4 --- .../tieba/post/activities/BaseActivity.kt | 5 +--- .../tieba/post/utils/ThemeUtil.kt | 30 ------------------- 3 files changed, 1 insertion(+), 38 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 49975a96..444d1fea 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -248,12 +248,8 @@ dependencies { implementation 'com.google.code.gson:gson:2.10.1' implementation "org.litepal.android:kotlin:3.0.0" - implementation 'cn.jzvd:jiaozivideoplayer:7.7.2.3300' implementation 'com.jaredrummler:colorpicker:1.1.0' - implementation "com.scwang.smart:refresh-layout-kernel:2.0.1" - implementation "com.scwang.smart:refresh-header-material:2.0.1" - implementation 'com.github.lwj1994:Matisse:0.5.3-20220115' implementation 'com.github.getActivity:XXPermissions:18.3' implementation "com.gyf.immersionbar:immersionbar:3.0.0" diff --git a/app/src/main/java/com/huanchengfly/tieba/post/activities/BaseActivity.kt b/app/src/main/java/com/huanchengfly/tieba/post/activities/BaseActivity.kt index 858030e9..0a654330 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/activities/BaseActivity.kt +++ b/app/src/main/java/com/huanchengfly/tieba/post/activities/BaseActivity.kt @@ -25,7 +25,6 @@ import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.widget.Toolbar import butterknife.ButterKnife -import cn.jzvd.Jzvd import com.gyf.immersionbar.ImmersionBar import com.huanchengfly.tieba.post.App import com.huanchengfly.tieba.post.App.Companion.INSTANCE @@ -54,8 +53,7 @@ abstract class BaseActivity : AppCompatActivity(), ExtraRefreshable, CoroutineSc private var mTintToolbar: TintToolbar? = null private var oldTheme: String = "" - var isActivityRunning = true - private set + private var isActivityRunning = true private var customStatusColor = -1 private var statusBarTinted = false @@ -64,7 +62,6 @@ abstract class BaseActivity : AppCompatActivity(), ExtraRefreshable, CoroutineSc override fun onPause() { super.onPause() isActivityRunning = false - Jzvd.releaseAllVideos() } //禁止app字体大小跟随系统字体大小调节 diff --git a/app/src/main/java/com/huanchengfly/tieba/post/utils/ThemeUtil.kt b/app/src/main/java/com/huanchengfly/tieba/post/utils/ThemeUtil.kt index 89f9ced1..b9be88e0 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/utils/ThemeUtil.kt +++ b/app/src/main/java/com/huanchengfly/tieba/post/utils/ThemeUtil.kt @@ -38,8 +38,6 @@ import com.huanchengfly.tieba.post.putBoolean import com.huanchengfly.tieba.post.putString import com.huanchengfly.tieba.post.ui.common.theme.utils.ThemeUtils import com.huanchengfly.tieba.post.ui.widgets.theme.TintSwipeRefreshLayout -import com.scwang.smart.refresh.header.MaterialHeader -import com.scwang.smart.refresh.layout.SmartRefreshLayout import kotlinx.coroutines.launch import java.util.Locale @@ -193,34 +191,6 @@ object ThemeUtil { } } - @JvmStatic - fun setThemeForSmartRefreshLayout(smartRefreshLayout: SmartRefreshLayout) { - val context = smartRefreshLayout.context - val resources = context.resources - if (resources != null) { - smartRefreshLayout.setPrimaryColors( - ThemeUtils.getColorByAttr( - context, - R.attr.colorAccent - ) - ) - } - } - - fun setThemeForMaterialHeader(materialHeader: MaterialHeader) { - val context = materialHeader.context - val resources = context.resources - if (resources != null) { - materialHeader.setProgressBackgroundColorSchemeColor(resources.getColor(R.color.color_swipe_refresh_bg)) - materialHeader.setColorSchemeColors( - ThemeUtils.getColorByAttr( - context, - R.attr.colorAccent - ) - ) - } - } - @JvmStatic fun isNightMode(): Boolean { return isNightMode(getRawTheme())