This commit is contained in:
rhunk 2023-05-26 21:49:43 +02:00
parent e7ccaf312e
commit b1e3a350c0
4 changed files with 9 additions and 13 deletions

View File

@ -47,9 +47,9 @@ enum class ConfigProperty(
ConfigStateListValue( ConfigStateListValue(
listOf("snap", "chat", "typing"), listOf("snap", "chat", "typing"),
mutableMapOf( mutableMapOf(
"snap" to true, "snap" to false,
"chat" to true, "chat" to false,
"typing" to true "typing" to false
) )
) )
), ),

View File

@ -11,10 +11,6 @@ class MediaQualityLevelOverride : Feature("MediaQualityLevelOverride", loadParam
override fun init() { override fun init() {
val enumQualityLevel = context.mappings.getMappedClass("enums", "QualityLevel") val enumQualityLevel = context.mappings.getMappedClass("enums", "QualityLevel")
Hooker.hookConstructor(context.androidContext.classLoader.loadClass("hfj"), HookStage.AFTER) {
Logger.log(it.thisObject())
}
Hooker.hook(context.mappings.getMappedClass("MediaQualityLevelProvider"), Hooker.hook(context.mappings.getMappedClass("MediaQualityLevelProvider"),
context.mappings.getMappedValue("MediaQualityLevelProviderMethod"), context.mappings.getMappedValue("MediaQualityLevelProviderMethod"),
HookStage.BEFORE, HookStage.BEFORE,

View File

@ -190,12 +190,12 @@ class Notifications : Feature("Notifications", loadParams = FeatureLoadParams.IN
notificationDataQueue[messageId.toLong()] = notificationData notificationDataQueue[messageId.toLong()] = notificationData
val callback = CallbackBuilder(fetchConversationWithMessagesCallback) val callback = CallbackBuilder(fetchConversationWithMessagesCallback)
.override("onFetchConversationWithMessagesComplete") { param -> .override("onFetchConversationWithMessagesComplete") { callbackParam ->
val messageList = (param.arg(1) as List<Any>).map { msg -> Message(msg) } val messageList = (callbackParam.arg(1) as List<Any>).map { msg -> Message(msg) }
fetchMessagesResult(conversationId, messageList) fetchMessagesResult(conversationId, messageList)
} }
.override("onError") { param -> .override("onError") {
Logger.xposedLog("Failed to fetch message ${param.arg(0) as Any}") Logger.xposedLog("Failed to fetch message ${it.arg(0) as Any}")
}.build() }.build()
fetchConversationWithMessagesMethod.invoke(conversationManager, SnapUUID.fromString(conversationId).instanceNonNull(), callback) fetchConversationWithMessagesMethod.invoke(conversationManager, SnapUUID.fromString(conversationId).instanceNonNull(), callback)

View File

@ -169,8 +169,8 @@ class FriendFeedInfoMenu : AbstractMenu() {
switch.text = context.translation.get(text) switch.text = context.translation.get(text)
switch.isChecked = isChecked() switch.isChecked = isChecked()
applyTheme(viewModel, switch) applyTheme(viewModel, switch)
switch.setOnCheckedChangeListener { _: CompoundButton?, isChecked: Boolean -> switch.setOnCheckedChangeListener { _: CompoundButton?, checked: Boolean ->
toggle(isChecked) toggle(checked)
} }
viewConsumer(switch) viewConsumer(switch)
} }