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(
listOf("snap", "chat", "typing"),
mutableMapOf(
"snap" to true,
"chat" to true,
"typing" to true
"snap" to false,
"chat" to false,
"typing" to false
)
)
),

View File

@ -11,10 +11,6 @@ class MediaQualityLevelOverride : Feature("MediaQualityLevelOverride", loadParam
override fun init() {
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"),
context.mappings.getMappedValue("MediaQualityLevelProviderMethod"),
HookStage.BEFORE,

View File

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

View File

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