mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Fix display for update popup
This commit is contained in:
parent
ae85d4e3a7
commit
96764394bd
2 changed files with 10 additions and 5 deletions
|
@ -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…
Add table
Reference in a new issue