feat: unlimited multi snap
This commit is contained in:
@@ -210,6 +210,10 @@
|
||||
"amoled_dark_mode": {
|
||||
"name": "AMOLED Dark Mode",
|
||||
"description": "Enables AMOLED dark mode\nMake sure Snapchat's dark mode is enabled"
|
||||
},
|
||||
"unlimited_multi_snap": {
|
||||
"name": "Unlimited Multi Snap",
|
||||
"description": "Allows you to take an unlimited amount of multi snaps"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -355,6 +355,11 @@ enum class ConfigProperty(
|
||||
"amoled_dark_mode",
|
||||
ConfigCategory.EXPERIMENTAL_DEBUGGING,
|
||||
ConfigStateValue(false)
|
||||
),
|
||||
UNLIMITED_MULTI_SNAP(
|
||||
"unlimited_multi_snap",
|
||||
ConfigCategory.EXPERIMENTAL_DEBUGGING,
|
||||
ConfigStateValue(false)
|
||||
);
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package me.rhunk.snapenhance.features.impl.experiments
|
||||
|
||||
import me.rhunk.snapenhance.config.ConfigProperty
|
||||
import me.rhunk.snapenhance.features.Feature
|
||||
import me.rhunk.snapenhance.features.FeatureLoadParams
|
||||
import me.rhunk.snapenhance.hook.HookStage
|
||||
import me.rhunk.snapenhance.hook.hookConstructor
|
||||
import me.rhunk.snapenhance.util.setObjectField
|
||||
|
||||
class UnlimitedMultiSnap : Feature("UnlimitedMultiSnap", loadParams = FeatureLoadParams.ACTIVITY_CREATE_ASYNC) {
|
||||
override fun asyncOnActivityCreate() {
|
||||
android.util.Pair::class.java.hookConstructor(HookStage.AFTER, {
|
||||
context.config.bool(ConfigProperty.UNLIMITED_MULTI_SNAP)
|
||||
}) { param ->
|
||||
val first = param.arg<Any>(0)
|
||||
val second = param.arg<Any>(1)
|
||||
if (
|
||||
first == true && // isOverTheLimit
|
||||
second == 8 // limit
|
||||
) {
|
||||
param.thisObject<Any>().setObjectField("first", false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import me.rhunk.snapenhance.features.impl.experiments.AmoledDarkMode
|
||||
import me.rhunk.snapenhance.features.impl.experiments.AppPasscode
|
||||
import me.rhunk.snapenhance.features.impl.experiments.InfiniteStoryBoost
|
||||
import me.rhunk.snapenhance.features.impl.experiments.MeoPasscodeBypass
|
||||
import me.rhunk.snapenhance.features.impl.experiments.UnlimitedMultiSnap
|
||||
import me.rhunk.snapenhance.features.impl.tweaks.AntiAutoSave
|
||||
import me.rhunk.snapenhance.features.impl.tweaks.AutoSave
|
||||
import me.rhunk.snapenhance.features.impl.tweaks.DisableVideoLengthRestriction
|
||||
@@ -85,6 +86,7 @@ class FeatureManager(private val context: ModContext) : Manager {
|
||||
register(InfiniteStoryBoost::class)
|
||||
register(AmoledDarkMode::class)
|
||||
register(PinConversations::class)
|
||||
register(UnlimitedMultiSnap::class)
|
||||
|
||||
initializeFeatures()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user