Skip to content

Commit

Permalink
feat: add version limit to pangu and force forward
Browse files Browse the repository at this point in the history
  • Loading branch information
std-microblock committed Aug 21, 2023
1 parent 9ccb840 commit fe86e2e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 4 additions & 6 deletions app/src/main/java/cc/microblock/hook/ForceEnableMultiForward.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,16 @@
package cc.microblock.hook

import android.view.View
import cc.hicore.hook.ReplyMsgWithImg
import android.widget.RelativeLayout
import cc.hicore.QApp.QAppUtils
import cc.ioctl.util.HookUtils
import cc.ioctl.util.Reflex
import com.github.kyuubiran.ezxhelper.utils.getObject
import de.robv.android.xposed.XC_MethodHook.MethodHookParam
import com.github.kyuubiran.ezxhelper.utils.getObjectAs
import io.github.qauxv.base.annotation.FunctionHookEntry
import io.github.qauxv.base.annotation.UiItemAgentEntry
import io.github.qauxv.dsl.FunctionEntryRouter
import io.github.qauxv.hook.CommonSwitchFunctionHook
import io.github.qauxv.util.Initiator
import xyz.nextalone.util.get
import android.widget.RelativeLayout;
import com.github.kyuubiran.ezxhelper.utils.getObjectAs

@FunctionHookEntry
@UiItemAgentEntry
Expand All @@ -55,4 +52,5 @@ object ForceEnableMultiForward : CommonSwitchFunctionHook() {
return true;
}

override val isAvailable = QAppUtils.isQQnt();
}
3 changes: 2 additions & 1 deletion app/src/main/java/cc/microblock/hook/Pangu.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

package cc.microblock.hook

import cc.hicore.QApp.QAppUtils
import com.github.kyuubiran.ezxhelper.utils.hookBefore
import io.github.qauxv.base.annotation.FunctionHookEntry
import io.github.qauxv.base.annotation.UiItemAgentEntry
Expand Down Expand Up @@ -166,7 +167,7 @@ object SendPangu : CommonSwitchFunctionHook("sendMsgPangu",arrayOf(AIOTextElemen
override val description = "自动在中英文间加上空格,以美化排版\n若消息以空格开头,则不会被 Pangu 化"

override val uiItemLocation = FunctionEntryRouter.Locations.Simplify.CHAT_OTHER

override val isAvailable = QAppUtils.isQQnt();
override fun initOnce(): Boolean {
DexKit.requireMethodFromCache(AIOTextElementCtor)
.hookBefore {
Expand Down

0 comments on commit fe86e2e

Please sign in to comment.