From 5c68d513a38dcca1b884429c28f5bb32697bf37d Mon Sep 17 00:00:00 2001 From: aAbed <39409020+TheAabedKhan@users.noreply.github.com> Date: Mon, 24 Jun 2024 22:22:16 +0545 Subject: [PATCH] feat: Add ability to set `null` in patch options (#1947) --- assets/i18n/strings.i18n.json | 6 +- lib/services/manager_api.dart | 1 - .../patch_options/patch_options_view.dart | 52 +--- .../patch_options_viewmodel.dart | 138 ++-------- .../patches_selector_viewmodel.dart | 1 - .../patch_options_fields.dart | 235 ++++++++++-------- 6 files changed, 155 insertions(+), 278 deletions(-) diff --git a/assets/i18n/strings.i18n.json b/assets/i18n/strings.i18n.json index 3884b01e..516ed5c6 100755 --- a/assets/i18n/strings.i18n.json +++ b/assets/i18n/strings.i18n.json @@ -118,16 +118,18 @@ }, "patchOptionsView": { "customValue": "Custom value", + "setToNull": "Set to null", + "nullValue": "This option value is currently null", "resetOptionsTooltip": "Reset patch options", "viewTitle": "Patch options", "saveOptions": "Save", "addOptions": "Add options", - "deselectPatch": "Deselect patch", + "unselectPatch": "Unselect patch", "tooltip": "More input options", "selectFilePath": "Select file path", "selectFolder": "Select folder", "selectOption": "Select option", - "requiredOption": "This option is required", + "requiredOption": "Setting this option is required", "unsupportedOption": "This option is not supported", "requiredOptionNull": "The following options have to be set:\n\n${options}" }, diff --git a/lib/services/manager_api.dart b/lib/services/manager_api.dart index ce146a64..bc136208 100644 --- a/lib/services/manager_api.dart +++ b/lib/services/manager_api.dart @@ -31,7 +31,6 @@ class ManagerAPI { final String cliRepo = 'revanced-cli'; late SharedPreferences _prefs; List patches = []; - List