mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-22 12:09:22 +00:00
show locked symbol for private offers in trade history
This commit is contained in:
parent
c75e3aa455
commit
544d69827a
3 changed files with 2 additions and 6 deletions
|
@ -105,7 +105,7 @@ public class ClosedTradesListItem implements FilterableListItem {
|
||||||
? offer.getDirection()
|
? offer.getDirection()
|
||||||
: offer.getMirroredDirection();
|
: offer.getMirroredDirection();
|
||||||
String currencyCode = tradable.getOffer().getCurrencyCode();
|
String currencyCode = tradable.getOffer().getCurrencyCode();
|
||||||
return DisplayUtils.getDirectionWithCode(direction, currencyCode);
|
return DisplayUtils.getDirectionWithCode(direction, currencyCode, offer.isPrivateOffer());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getDate() {
|
public Date getDate() {
|
||||||
|
|
|
@ -68,7 +68,7 @@ class FailedTradesViewModel extends ActivatableWithDataModel<FailedTradesDataMod
|
||||||
}
|
}
|
||||||
|
|
||||||
String getDirectionLabel(FailedTradesListItem item) {
|
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) {
|
String getMarketLabel(FailedTradesListItem item) {
|
||||||
|
|
|
@ -116,10 +116,6 @@ public class DisplayUtils {
|
||||||
// Offer direction
|
// 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) {
|
public static String getDirectionWithCode(OfferDirection direction, String currencyCode, boolean isPrivate) {
|
||||||
if (CurrencyUtil.isTraditionalCurrency(currencyCode))
|
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());
|
return (direction == OfferDirection.BUY) ? Res.get(isPrivate ? "shared.buyCurrencyLocked" : "shared.buyCurrency", Res.getBaseCurrencyCode()) : Res.get(isPrivate ? "shared.sellCurrencyLocked" : "shared.sellCurrency", Res.getBaseCurrencyCode());
|
||||||
|
|
Loading…
Reference in a new issue