mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 21:27:43 +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")
|
||||
|
||||
if (SettingsPatch.AddRedditSettings == "true")
|
||||
if (SettingsPatch.RedditSettings == true)
|
||||
context.setValue("ChatButtons")
|
||||
|
||||
return PatchResultSuccess()
|
||||
|
@ -30,7 +30,7 @@ class CreateButtonPatch : BytecodePatch() {
|
||||
|
||||
updateSettingsStatus("CreateButtons")
|
||||
|
||||
if (SettingsPatch.AddRedditSettings == "true")
|
||||
if (SettingsPatch.RedditSettings == true)
|
||||
context.setValue("CreateButtons")
|
||||
|
||||
return PatchResultSuccess()
|
||||
|
@ -30,7 +30,7 @@ class DiscoverButtonPatch : BytecodePatch() {
|
||||
|
||||
updateSettingsStatus("DiscoverButtons")
|
||||
|
||||
if (SettingsPatch.AddRedditSettings == "true")
|
||||
if (SettingsPatch.RedditSettings == true)
|
||||
context.setValue("DiscoverButtons")
|
||||
|
||||
return PatchResultSuccess()
|
||||
|
@ -39,7 +39,7 @@ class SettingsPatch : ResourcePatch {
|
||||
* 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
|
||||
*/
|
||||
if (!AddRedditSettings.equals("true"))
|
||||
if (RedditSettings != true)
|
||||
return PatchResultSuccess()
|
||||
|
||||
|
||||
@ -110,10 +110,10 @@ class SettingsPatch : ResourcePatch {
|
||||
}
|
||||
|
||||
companion object : OptionsContainer() {
|
||||
internal var AddRedditSettings: String? by option(
|
||||
PatchOption.StringOption(
|
||||
key = "AddRedditSettings",
|
||||
default = "false",
|
||||
internal var RedditSettings: Boolean? by option(
|
||||
PatchOption.BooleanOption(
|
||||
key = "RedditSettings",
|
||||
default = false,
|
||||
title = "Add settings to Reddit",
|
||||
description = "Defaults to false to avoid exceptions in ReVanced Manager"
|
||||
)
|
||||
|
Reference in New Issue
Block a user