mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-06-12 13:17:42 +02:00
refactor(core): remove unlimited multi snap feature
This commit is contained in:
@ -1,24 +0,0 @@
|
||||
package me.rhunk.snapenhance.core.features.impl.experiments
|
||||
|
||||
import me.rhunk.snapenhance.core.features.Feature
|
||||
import me.rhunk.snapenhance.core.features.FeatureLoadParams
|
||||
import me.rhunk.snapenhance.core.util.hook.HookStage
|
||||
import me.rhunk.snapenhance.core.util.hook.hookConstructor
|
||||
import me.rhunk.snapenhance.core.util.ktx.setObjectField
|
||||
|
||||
class UnlimitedMultiSnap : Feature("UnlimitedMultiSnap", loadParams = FeatureLoadParams.ACTIVITY_CREATE_ASYNC) {
|
||||
override fun asyncOnActivityCreate() {
|
||||
android.util.Pair::class.java.hookConstructor(HookStage.AFTER, {
|
||||
context.config.experimental.unlimitedMultiSnap.get()
|
||||
}) { param ->
|
||||
val first = param.argNullable<Any>(0)
|
||||
val second = param.argNullable<Any>(1)
|
||||
if (
|
||||
first == true && // isOverTheLimit
|
||||
second == 8 // limit
|
||||
) {
|
||||
param.thisObject<Any>().setObjectField("first", false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -89,7 +89,6 @@ class FeatureManager(
|
||||
InfiniteStoryBoost(),
|
||||
AmoledDarkMode(),
|
||||
PinConversations(),
|
||||
UnlimitedMultiSnap(),
|
||||
DeviceSpooferHook(),
|
||||
ClientBootstrapOverride(),
|
||||
GooglePlayServicesDialogs(),
|
||||
|
Reference in New Issue
Block a user