diff --git a/app/src/main/kotlin/cn/xihan/qdds/Intercept.kt b/app/src/main/kotlin/cn/xihan/qdds/Intercept.kt index 009d5fe..9ee21a2 100644 --- a/app/src/main/kotlin/cn/xihan/qdds/Intercept.kt +++ b/app/src/main/kotlin/cn/xihan/qdds/Intercept.kt @@ -2,6 +2,7 @@ package cn.xihan.qdds import com.highcapable.yukihookapi.hook.param.PackageParam +import com.highcapable.yukihookapi.hook.type.android.IntentClass import com.highcapable.yukihookapi.hook.type.java.BooleanType import com.highcapable.yukihookapi.hook.type.java.StringClass import com.highcapable.yukihookapi.hook.type.java.UnitType @@ -31,6 +32,7 @@ fun PackageParam.interceptOption( "闪屏广告页面" -> interceptSplashAdActivity(versionCode) "阅读页水印" -> interceptReadBookPageWaterMark(versionCode) "发帖图片水印" -> interceptPostImageWatermark(versionCode) + "自动跳转精选" -> interceptAutoJumpSelected(versionCode) else -> interceptList.add(selected.title) } } @@ -247,6 +249,26 @@ fun PackageParam.interceptPostImageWatermark(versionCode: Int) { } } +/** + * 拦截自动跳转精选 + */ +fun PackageParam.interceptAutoJumpSelected(versionCode: Int){ + when(versionCode){ + in 980..994 -> { + findClass("com.qidian.QDReader.ui.activity.MainGroupActivity").hook { + injectMember { + method { + name = "checkOpenView" + param(IntentClass) + returnType = UnitType + } + intercept() + } + } + } + } +} + /** * 拦截异步初始化任务 * @param version 版本号 diff --git a/app/src/main/kotlin/cn/xihan/qdds/Option.kt b/app/src/main/kotlin/cn/xihan/qdds/Option.kt index b4a3495..660dbfb 100644 --- a/app/src/main/kotlin/cn/xihan/qdds/Option.kt +++ b/app/src/main/kotlin/cn/xihan/qdds/Option.kt @@ -278,7 +278,6 @@ data class OptionEntity( */ @Keep @Serializable - @Immutable data class InterceptOption( @SerialName("configurations") var configurations: List = listOf( SelectedModel("隐私政策更新弹框"), @@ -288,6 +287,7 @@ data class OptionEntity( SelectedModel("闪屏广告页面"), SelectedModel("阅读页水印"), SelectedModel("发帖图片水印"), + SelectedModel("自动跳转精选"), SelectedModel("异步主GDT广告任务|com.qidian.QDReader.start.AsyncMainGDTTask"), SelectedModel("异步主游戏广告SDK任务|com.qidian.QDReader.start.AsyncMainGameADSDKTask"), SelectedModel("异步主游戏下载任务|com.qidian.QDReader.start.AsyncMainGameDownloadTask"),