From 3bc7c1f5bca72db7cf0db7600bffd50abe953813 Mon Sep 17 00:00:00 2001 From: Cezar Augusto Date: Sun, 6 Aug 2017 20:03:55 -0300 Subject: [PATCH] Manual backport of code changed in 0.21.x which caused conflict with BAT Mercury. Details: Because the settings were renamed, git didn't properly handle changes when cherry-picking backwards. This caused the code in 0.19.x and 0.20.x to use the naming from 0.21.x Merge pull request #10164 from luixxiul/polish-hideLower Replace hideLower with showLess https://github.com/brave/browser-laptop/commit/f0d9c3dc13484c318539fee01fcc13a719845864 Merge pull request #10441 from brave/10322 add support for legacy ledger settings https://github.com/brave/browser-laptop/commit/052277d76b0630ea40197ef4d66f6b3a82d29d82 Also includes fixes from https://github.com/brave/browser-laptop/commit/9ad7b4fa208fa61488c92d8f27ecd965d3d90ca1 (most of this commit was already backported, just grabbed the settings migration fixes) Auditors: @NejcZdovc, @luixxiul, @cezaraugusto Fixes https://github.com/brave/browser-laptop/issues/11261 Fixes https://github.com/brave/browser-laptop/issues/11260 Fixes https://github.com/brave/browser-laptop/issues/11250 Fixes https://github.com/brave/browser-laptop/issues/11246 Fixes https://github.com/brave/browser-laptop/issues/11263 --- .../locales/en-US/preferences.properties | 4 +- .../preferences/payment/advancedSettings.js | 6 +- .../preferences/payment/ledgerTable.js | 18 ++--- .../components/preferences/paymentsTab.js | 2 +- app/sessionStore.js | 31 ++++++++- docs/state.md | 42 +++++++----- js/constants/appConfig.js | 67 +++++++++++++------ js/constants/settings.js | 49 +++++++++----- js/settings.js | 10 ++- test/about/ledgerPanelTest.js | 6 +- test/unit/app/sessionStoreTest.js | 49 +++++++++++++- test/unit/settingsTest.js | 26 +------ 12 files changed, 204 insertions(+), 106 deletions(-) diff --git a/app/extensions/brave/locales/en-US/preferences.properties b/app/extensions/brave/locales/en-US/preferences.properties index 6c986ad75f4..d2f3d073a4a 100644 --- a/app/extensions/brave/locales/en-US/preferences.properties +++ b/app/extensions/brave/locales/en-US/preferences.properties @@ -373,8 +373,8 @@ checkDefaultOnStartup=Always check on startup dashboardSettingsTitle=Dashboard dashboardShowImages=Show images requiresRestart=* Requires browser restart -showAll=Show all -hideLower=Hide lower +showAll=Show All +showLess=Show Less scaleSizeSmaller=Smaller scaleSizeNormal=Normal scaleSizeLarger=Larger diff --git a/app/renderer/components/preferences/payment/advancedSettings.js b/app/renderer/components/preferences/payment/advancedSettings.js index d5236dd6ba6..ba7bbc02e96 100644 --- a/app/renderer/components/preferences/payment/advancedSettings.js +++ b/app/renderer/components/preferences/payment/advancedSettings.js @@ -34,8 +34,8 @@ class AdvancedSettingsContent extends ImmutableComponent { + defaultValue={minPublisherDuration || appConfig.defaultSettings[settings.PAYMENTS_MINIMUM_VISIT_TIME]} + onChange={changeSetting.bind(null, this.props.onChangeSetting, settings.PAYMENTS_MINIMUM_VISIT_TIME)}>