-
Notifications
You must be signed in to change notification settings - Fork 927
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
migrate android toolbar settings #4970
Conversation
sharedPreferencesEditor.putBoolean(BravePreferenceKeys.BRAVE_BOTTOM_TOOLBAR_ENABLED_KEY, | ||
sharedPreferences.getBoolean(BOTTOM_TOOLBAR_ENABLED_KEY, true)); | ||
sharedPreferencesEditor.apply(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have to call it before the scheduled job as it allows to run non heave tasks. Otherwise we don't have the settings migrated on a first task sometimes.
SharedPreferences prefStatsFromTabs = ContextUtils.getApplicationContext() | ||
.getSharedPreferences(PREF_STATS_PREFERENCES_NAME, 0); | ||
boolean updateFormTabs = prefStatsFromTabs.contains(PREF_WEEK_OF_INSTALLATION_NAME); | ||
if (!updateFormTabs) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are confident that it's a tabs=>core update by checking the preferences above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
public static final String BRAVE_BOTTOM_TOOLBAR_SET_KEY = "brave_bottom_toolbar_set"; | ||
public static final String BRAVE_BOTTOM_TOOLBAR_ENABLED_KEY = "brave_bottom_toolbar_enabled"; | ||
public static final String BRAVE_BOTTOM_TOOLBAR_ENABLED_KEY = "brave_bottom_toolbar_enabled_key"; | ||
public static final String BRAVE_BOTTOM_TOOLBAR_SET_KEY = "brave_bottom_toolbar_enabled"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we mixed preferences names initially on feature migration. We kept one settings named the same but it was used for diff things comparing to tabs and another settings I just renamed to be consistent with the preference name. It breaks beta build settings for bottom toolbar but otherwise we don't have a way to migrate our existing stable version users.
Resolves brave/brave-browser#8713
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.