Skip to content

Commit

Permalink
fix: blur picture background for com.tencent.richframework.gallery.QQ…
Browse files Browse the repository at this point in the history
…GalleryActivity
  • Loading branch information
duzhaokun123 committed Aug 6, 2023
1 parent aebc6f2 commit 8ffcee1
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ import io.github.qauxv.config.ConfigManager
import io.github.qauxv.dsl.FunctionEntryRouter
import io.github.qauxv.hook.CommonConfigFunctionHook
import io.github.qauxv.ui.CommonContextWrapper
import io.github.qauxv.util.Log
import io.github.qauxv.util.SyncUtils
import xyz.nextalone.util.hookAfter

@FunctionHookEntry
@UiItemAgentEntry
object GalBgBlurHook : CommonConfigFunctionHook(SyncUtils.PROC_PEAK) {
object GalBgBlurHook : CommonConfigFunctionHook(SyncUtils.PROC_PEAK + SyncUtils.PROC_MAIN) {
private const val brCfg = "gal_bg_blur_radius"
private const val bdCfg = "gal_bg_dim"
override val name = "聊天界面查看图片背景模糊"
Expand Down Expand Up @@ -103,7 +104,8 @@ object GalBgBlurHook : CommonConfigFunctionHook(SyncUtils.PROC_PEAK) {
when(activity::class.java.name) {
"com.tencent.mobileqq.richmediabrowser.AIOGalleryActivity",
"com.tencent.mobileqq.activity.aio.photo.AIOGalleryActivity",
"com.tencent.mobileqq.activity.photo.album.NewPhotoPreviewActivity" -> {
"com.tencent.mobileqq.activity.photo.album.NewPhotoPreviewActivity",
"com.tencent.richframework.gallery.QQGalleryActivity"-> {
activity.window.blurBackground(ConfigManager.getDefaultConfig().getIntOrDefault(brCfg, 10), ConfigManager.getDefaultConfig().getFloat(bdCfg, 0.1F))
}
}
Expand Down

0 comments on commit 8ffcee1

Please sign in to comment.