Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a new key for settings badge. #6085

Merged
merged 1 commit into from Mar 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
@Singleton
public class SettingsPresentation {

public static final String SETTINGS_NEWS = "settingsNews";
public static final String SETTINGS_BADGE_KEY = "settingsPrivacyFeature";

private Preferences preferences;

Expand All @@ -43,7 +43,7 @@ public SettingsPresentation(Preferences preferences) {
this.preferences = preferences;

preferences.getDontShowAgainMapAsObservable().addListener((MapChangeListener<? super String, ? super Boolean>) change -> {
if (change.getKey().equals(SETTINGS_NEWS)) {
if (change.getKey().equals(SETTINGS_BADGE_KEY)) {
showNotification.set(!change.wasAdded());
}
});
Expand All @@ -58,6 +58,6 @@ public BooleanProperty getShowSettingsUpdatesNotification() {
}

public void setup() {
showNotification.set(preferences.showAgain(SETTINGS_NEWS));
showNotification.set(preferences.showAgain(SETTINGS_BADGE_KEY));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ else if (newValue == aboutTab)
@Override
protected void activate() {
// Hide new badge if user saw this section
preferences.dontShowAgain(SettingsPresentation.SETTINGS_NEWS, true);
preferences.dontShowAgain(SettingsPresentation.SETTINGS_BADGE_KEY, true);

root.getSelectionModel().selectedItemProperty().addListener(tabChangeListener);
navigation.addListener(navigationListener);
Expand Down