#1123 Preferred currency drop down renders duplicate currency

This commit is contained in:
dhingra 2017-12-27 00:17:21 -05:00
parent 76e1cd2eca
commit f13f130894

View File

@ -608,9 +608,9 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
private void updateTradeCurrencies(ListChangeListener.Change<? extends TradeCurrency> change) {
change.next();
if (change.wasAdded() && change.getAddedSize() == 1)
if (change.wasAdded() && change.getAddedSize() == 1 && initialReadDone)
tradeCurrenciesAsObservable.add(change.getAddedSubList().get(0));
else if (change.wasRemoved() && change.getRemovedSize() == 1)
else if (change.wasRemoved() && change.getRemovedSize() == 1 && initialReadDone)
tradeCurrenciesAsObservable.remove(change.getRemoved().get(0));
}