refactor(core): remove unlimited multi snap feature

This commit is contained in:
rhunk
2024-02-12 21:28:31 +01:00
parent fe777ff1d8
commit 2b85856be0
5 changed files with 0 additions and 31 deletions

View File

@ -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)
}
}
}
}

View File

@ -89,7 +89,6 @@ class FeatureManager(
InfiniteStoryBoost(),
AmoledDarkMode(),
PinConversations(),
UnlimitedMultiSnap(),
DeviceSpooferHook(),
ClientBootstrapOverride(),
GooglePlayServicesDialogs(),