show locked symbol for private offers in trade history

This commit is contained in:
woodser 2024-12-17 09:12:35 -05:00
parent c75e3aa455
commit 544d69827a
3 changed files with 2 additions and 6 deletions

View file

@ -105,7 +105,7 @@ public class ClosedTradesListItem implements FilterableListItem {
? offer.getDirection()
: offer.getMirroredDirection();
String currencyCode = tradable.getOffer().getCurrencyCode();
return DisplayUtils.getDirectionWithCode(direction, currencyCode);
return DisplayUtils.getDirectionWithCode(direction, currencyCode, offer.isPrivateOffer());
}
public Date getDate() {

View file

@ -68,7 +68,7 @@ class FailedTradesViewModel extends ActivatableWithDataModel<FailedTradesDataMod
}
String getDirectionLabel(FailedTradesListItem item) {
return (item != null) ? DisplayUtils.getDirectionWithCode(dataModel.getDirection(item.getTrade().getOffer()), item.getTrade().getOffer().getCurrencyCode()) : "";
return (item != null) ? DisplayUtils.getDirectionWithCode(dataModel.getDirection(item.getTrade().getOffer()), item.getTrade().getOffer().getCurrencyCode(), item.getTrade().getOffer().isPrivateOffer()) : "";
}
String getMarketLabel(FailedTradesListItem item) {

View file

@ -116,10 +116,6 @@ public class DisplayUtils {
// Offer direction
///////////////////////////////////////////////////////////////////////////////////////////
public static String getDirectionWithCode(OfferDirection direction, String currencyCode) {
return getDirectionWithCode(direction, currencyCode, false);
}
public static String getDirectionWithCode(OfferDirection direction, String currencyCode, boolean isPrivate) {
if (CurrencyUtil.isTraditionalCurrency(currencyCode))
return (direction == OfferDirection.BUY) ? Res.get(isPrivate ? "shared.buyCurrencyLocked" : "shared.buyCurrency", Res.getBaseCurrencyCode()) : Res.get(isPrivate ? "shared.sellCurrencyLocked" : "shared.sellCurrency", Res.getBaseCurrencyCode());