Review changes for Disputes GUI

highlight trade period end using an appropriate CSS alert style
system messages to show in chat unread message count
This commit is contained in:
jmacxx 2021-03-23 23:02:21 -05:00
parent e59f6afd91
commit e9b3b9ac1f
No known key found for this signature in database
GPG Key ID: 155297BABFE94A1B
3 changed files with 6 additions and 3 deletions

View File

@ -409,8 +409,7 @@ public final class Dispute implements NetworkPayload, PersistablePayload {
public long unreadMessageCount(boolean senderFlag) {
return chatMessages.stream()
.filter(m -> m.isSenderIsTrader() == senderFlag)
.filter(m -> !m.isSystemMessage())
.filter(m -> m.isSenderIsTrader() == senderFlag || m.isSystemMessage())
.filter(m -> !m.isWasDisplayed())
.count();
}

View File

@ -802,6 +802,10 @@ tree-table-view:focused {
-fx-cursor: hand;
}
.alert {
-fx-text-fill: -bs-rd-error-red;
}
.opaque-icon {
-fx-fill: -bs-color-gray-bbb;
-fx-opacity: 1;

View File

@ -311,7 +311,7 @@ public class DisputeSummaryWindow extends Overlay<DisputeSummaryWindow> {
String status = DisplayUtils.formatDateTime(dispute.getTradePeriodEnd());
Label tradePeriodEnd = addConfirmationLabelLabel(gridPane, ++rowIndex, Res.get("disputeSummaryWindow.tradePeriodEnd"), status).second;
if (dispute.getTradePeriodEnd().toInstant().isAfter(Instant.now())) {
tradePeriodEnd.getStyleClass().add("version-new"); // highlight field when the trade period is still active
tradePeriodEnd.getStyleClass().add("alert"); // highlight field when the trade period is still active
}
}
if (dispute.getExtraDataMap() != null && dispute.getExtraDataMap().size() > 0) {