Skip to content

Commit

Permalink
Merge pull request #6085 from jmacxx/5396_privacy_enhancement
Browse files Browse the repository at this point in the history
Use a new key for settings badge.
  • Loading branch information
ripcurlx authored Mar 3, 2022
2 parents e7f1bf2 + 8fa44d7 commit c4a941c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit c4a941c

Please sign in to comment.