mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-06-13 13:47:47 +02:00
refactor: snap to chat media as experimental
This commit is contained in:
@ -4,8 +4,14 @@ import me.rhunk.snapenhance.common.config.ConfigContainer
|
||||
import me.rhunk.snapenhance.common.config.FeatureNotice
|
||||
|
||||
class Experimental : ConfigContainer() {
|
||||
class NativeHooks : ConfigContainer(hasGlobalState = true) {
|
||||
val disableBitmoji = boolean("disable_bitmoji")
|
||||
val fixGalleryMediaOverride = boolean("fix_gallery_media_override")
|
||||
}
|
||||
|
||||
val nativeHooks = container("native_hooks", NativeHooks()) { icon = "Memory"; requireRestart() }
|
||||
val spoof = container("spoof", Spoof()) { icon = "Fingerprint" }
|
||||
val snapToChatMedia = boolean("snap_to_chat_media") { requireRestart(); addNotices(FeatureNotice.UNSTABLE) }
|
||||
val appPasscode = string("app_passcode")
|
||||
val appLockOnResume = boolean("app_lock_on_resume")
|
||||
val infiniteStoryBoost = boolean("infinite_story_boost")
|
||||
|
@ -17,7 +17,6 @@ class MessagingTweaks : ConfigContainer() {
|
||||
"EXTERNAL_MEDIA",
|
||||
"STICKER"
|
||||
) { requireRestart() }
|
||||
val snapToChatMedia = boolean("snap_to_chat_media") { requireRestart() }
|
||||
val preventMessageSending = multiple("prevent_message_sending", *NotificationType.getOutgoingValues().map { it.key }.toTypedArray()) {
|
||||
customOptionTranslationPath = "features.options.notifications"
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
package me.rhunk.snapenhance.common.config.impl
|
||||
|
||||
import me.rhunk.snapenhance.common.config.ConfigContainer
|
||||
|
||||
class NativeHooks: ConfigContainer(hasGlobalState = true) {
|
||||
val disableBitmoji = boolean("disable_bitmoji")
|
||||
val fixGalleryMediaOverride = boolean("fix_gallery_media_override")
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package me.rhunk.snapenhance.core.features.impl.spying
|
||||
package me.rhunk.snapenhance.core.features.impl.experiments
|
||||
|
||||
import me.rhunk.snapenhance.common.data.ContentType
|
||||
import me.rhunk.snapenhance.common.util.protobuf.ProtoReader
|
||||
@ -9,7 +9,7 @@ import me.rhunk.snapenhance.core.features.FeatureLoadParams
|
||||
|
||||
class SnapToChatMedia : Feature("SnapToChatMedia", loadParams = FeatureLoadParams.ACTIVITY_CREATE_SYNC) {
|
||||
override fun onActivityCreate() {
|
||||
if (!context.config.messaging.snapToChatMedia.get()) return
|
||||
if (!context.config.experimental.snapToChatMedia.get()) return
|
||||
|
||||
context.event.subscribe(BuildMessageEvent::class, priority = 100) { event ->
|
||||
if (event.message.messageContent.contentType != ContentType.SNAP) return@subscribe
|
@ -15,7 +15,7 @@ import me.rhunk.snapenhance.core.features.impl.experiments.*
|
||||
import me.rhunk.snapenhance.core.features.impl.global.*
|
||||
import me.rhunk.snapenhance.core.features.impl.messaging.*
|
||||
import me.rhunk.snapenhance.core.features.impl.spying.MessageLogger
|
||||
import me.rhunk.snapenhance.core.features.impl.spying.SnapToChatMedia
|
||||
import me.rhunk.snapenhance.core.features.impl.experiments.SnapToChatMedia
|
||||
import me.rhunk.snapenhance.core.features.impl.spying.StealthMode
|
||||
import me.rhunk.snapenhance.core.features.impl.tweaks.CameraTweaks
|
||||
import me.rhunk.snapenhance.core.features.impl.ui.*
|
||||
|
Reference in New Issue
Block a user