mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-19 23:36:00 -04:00
Fix display for update popup
This commit is contained in:
parent
ae85d4e3a7
commit
96764394bd
@ -67,6 +67,12 @@ public final class Alert implements StoragePayload {
|
||||
return signatureAsBase64;
|
||||
}
|
||||
|
||||
public boolean isNewVersion() {
|
||||
int versionNum = Integer.valueOf(Version.VERSION.replace(".", ""));
|
||||
int alertVersionNum = Integer.valueOf(version.replace(".", ""));
|
||||
return versionNum < alertVersionNum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getTTL() {
|
||||
return TTL;
|
||||
|
@ -823,11 +823,10 @@ public class MainViewModel implements ViewModel {
|
||||
private void displayAlertIfPresent(Alert alert) {
|
||||
boolean alreadyDisplayed = alert != null && alert.equals(user.getDisplayedAlert());
|
||||
user.setDisplayedAlert(alert);
|
||||
|
||||
if (alert != null && !alreadyDisplayed) {
|
||||
if (!alert.isUpdateInfo || !alert.version.equals(Version.VERSION))
|
||||
new DisplayAlertMessageWindow().alertMessage(alert).show();
|
||||
}
|
||||
if (alert != null &&
|
||||
!alreadyDisplayed &&
|
||||
(!alert.isUpdateInfo || alert.isNewVersion()))
|
||||
new DisplayAlertMessageWindow().alertMessage(alert).show();
|
||||
}
|
||||
|
||||
private void swapPendingOfferFundingEntries() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user