mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-13 13:47:42 +02:00
fix(reddit/reddit-settings): use boolean as the type of json options
This commit is contained in:
@ -30,7 +30,7 @@ class ChatButtonPatch : BytecodePatch() {
|
|||||||
|
|
||||||
updateSettingsStatus("ChatButtons")
|
updateSettingsStatus("ChatButtons")
|
||||||
|
|
||||||
if (SettingsPatch.AddRedditSettings == "true")
|
if (SettingsPatch.RedditSettings == true)
|
||||||
context.setValue("ChatButtons")
|
context.setValue("ChatButtons")
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
|
@ -30,7 +30,7 @@ class CreateButtonPatch : BytecodePatch() {
|
|||||||
|
|
||||||
updateSettingsStatus("CreateButtons")
|
updateSettingsStatus("CreateButtons")
|
||||||
|
|
||||||
if (SettingsPatch.AddRedditSettings == "true")
|
if (SettingsPatch.RedditSettings == true)
|
||||||
context.setValue("CreateButtons")
|
context.setValue("CreateButtons")
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
|
@ -30,7 +30,7 @@ class DiscoverButtonPatch : BytecodePatch() {
|
|||||||
|
|
||||||
updateSettingsStatus("DiscoverButtons")
|
updateSettingsStatus("DiscoverButtons")
|
||||||
|
|
||||||
if (SettingsPatch.AddRedditSettings == "true")
|
if (SettingsPatch.RedditSettings == true)
|
||||||
context.setValue("DiscoverButtons")
|
context.setValue("DiscoverButtons")
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
|
@ -39,7 +39,7 @@ class SettingsPatch : ResourcePatch {
|
|||||||
* It is presumed to be an APKTOOL issue, but it cannot be fixed right now
|
* It is presumed to be an APKTOOL issue, but it cannot be fixed right now
|
||||||
* So it has been changed so that settings can be added only through options.json
|
* So it has been changed so that settings can be added only through options.json
|
||||||
*/
|
*/
|
||||||
if (!AddRedditSettings.equals("true"))
|
if (RedditSettings != true)
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
|
|
||||||
|
|
||||||
@ -110,10 +110,10 @@ class SettingsPatch : ResourcePatch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object : OptionsContainer() {
|
companion object : OptionsContainer() {
|
||||||
internal var AddRedditSettings: String? by option(
|
internal var RedditSettings: Boolean? by option(
|
||||||
PatchOption.StringOption(
|
PatchOption.BooleanOption(
|
||||||
key = "AddRedditSettings",
|
key = "RedditSettings",
|
||||||
default = "false",
|
default = false,
|
||||||
title = "Add settings to Reddit",
|
title = "Add settings to Reddit",
|
||||||
description = "Defaults to false to avoid exceptions in ReVanced Manager"
|
description = "Defaults to false to avoid exceptions in ReVanced Manager"
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user