Remove news badge from account

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
This commit is contained in:
HenrikJannsen 2024-05-26 19:19:42 +07:00
parent 2c040ec7f5
commit 9defd482ef
No known key found for this signature in database
GPG Key ID: 02AA2BAE387C8307

View File

@ -50,7 +50,9 @@ public class AccountPresentation {
preferences.getDontShowAgainMapAsObservable().addListener((MapChangeListener<? super String, ? super Boolean>) change -> { preferences.getDontShowAgainMapAsObservable().addListener((MapChangeListener<? super String, ? super Boolean>) change -> {
if (change.getKey().equals(ACCOUNT_NEWS)) { if (change.getKey().equals(ACCOUNT_NEWS)) {
showNotification.set(!change.wasAdded()); // devs enable this when a news badge is required
// showNotification.set(!change.wasAdded());
showNotification.set(false);
} }
}); });
} }
@ -65,26 +67,26 @@ public class AccountPresentation {
public void setup() { public void setup() {
// devs enable this when a news badge is required // devs enable this when a news badge is required
showNotification.set(preferences.showAgain(ACCOUNT_NEWS)); //showNotification.set(preferences.showAgain(ACCOUNT_NEWS));
showNotification.set(false);
} }
public void showOneTimeAccountSigningPopup(String key, String s) { public void showOneTimeAccountSigningPopup(String key, String message) {
showOneTimeAccountSigningPopup(key, s, null); showOneTimeAccountSigningPopup(key, message, null);
} }
public void showOneTimeAccountSigningPopup(String key, String s, String optionalParam) { public void showOneTimeAccountSigningPopup(String key, String message, String optionalParam) {
if (!DevEnv.isDevMode()) { if (!DevEnv.isDevMode()) {
DontShowAgainLookup.dontShowAgain(ACCOUNT_NEWS, false); DontShowAgainLookup.dontShowAgain(ACCOUNT_NEWS, false);
showNotification.set(true); showNotification.set(true);
DontShowAgainLookup.dontShowAgain(key, true); DontShowAgainLookup.dontShowAgain(key, true);
String message = optionalParam != null ? String information = optionalParam != null ?
Res.get(s, optionalParam, Res.get("popup.accountSigning.generalInformation")) : Res.get(message, optionalParam, Res.get("popup.accountSigning.generalInformation")) :
Res.get(s, Res.get("popup.accountSigning.generalInformation")); Res.get(message, Res.get("popup.accountSigning.generalInformation"));
new Popup().information(message) new Popup().information(information).show();
.show();
} }
} }
} }