mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 23:18:17 +01:00
Make "Show all" default
This commit is contained in:
parent
c5656ee9ac
commit
dd8d300496
2 changed files with 8 additions and 4 deletions
|
@ -170,6 +170,8 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
|||
paymentMethodColumn.setComparator((o1, o2) -> o1.getOffer().getPaymentMethod().compareTo(o2.getOffer().getPaymentMethod()));
|
||||
avatarColumn.setComparator((o1, o2) -> o1.getOffer().getOwnerNodeAddress().hostName.compareTo(o2.getOffer().getOwnerNodeAddress().hostName));
|
||||
|
||||
priceColumn.sortableProperty().bind(model.showAllTradeCurrenciesProperty.not());
|
||||
|
||||
createOfferButton = addButton(root, ++gridRow, "");
|
||||
createOfferButton.setMinHeight(40);
|
||||
createOfferButton.setPadding(new Insets(0, 20, 0, 20));
|
||||
|
|
|
@ -89,11 +89,12 @@ class OfferBookViewModel extends ActivatableViewModel {
|
|||
// If id is empty string we ignore filter (display all methods)
|
||||
|
||||
PaymentMethod selectedPaymentMethod = new PaymentMethod(SHOW_ALL_FLAG, 0, 0, null);
|
||||
private CryptoCurrency showAllCurrenciesItem = new CryptoCurrency(SHOW_ALL_FLAG, SHOW_ALL_FLAG);
|
||||
|
||||
private final ObservableList<OfferBookListItem> offerBookListItems;
|
||||
private final ListChangeListener<OfferBookListItem> listChangeListener;
|
||||
private boolean isTabSelected;
|
||||
final BooleanProperty showAllTradeCurrenciesProperty = new SimpleBooleanProperty();
|
||||
final BooleanProperty showAllTradeCurrenciesProperty = new SimpleBooleanProperty(true);
|
||||
boolean showAllPaymentMethods = true;
|
||||
|
||||
|
||||
|
@ -152,7 +153,7 @@ class OfferBookViewModel extends ActivatableViewModel {
|
|||
private void fillAllTradeCurrencies() {
|
||||
allTradeCurrencies.clear();
|
||||
// Used for ignoring filter (show all)
|
||||
allTradeCurrencies.add(new CryptoCurrency(SHOW_ALL_FLAG, SHOW_ALL_FLAG));
|
||||
allTradeCurrencies.add(showAllCurrenciesItem);
|
||||
allTradeCurrencies.addAll(preferences.getTradeCurrenciesAsObservable());
|
||||
allTradeCurrencies.add(new CryptoCurrency(EDIT_FLAG, EDIT_FLAG));
|
||||
}
|
||||
|
@ -186,10 +187,11 @@ class OfferBookViewModel extends ActivatableViewModel {
|
|||
|
||||
public void onSetTradeCurrency(TradeCurrency tradeCurrency) {
|
||||
String code = tradeCurrency.getCode();
|
||||
showAllTradeCurrenciesProperty.set(isShowAllEntry(code));
|
||||
boolean showAllEntry = isShowAllEntry(code);
|
||||
showAllTradeCurrenciesProperty.set(showAllEntry);
|
||||
if (isEditEntry(code))
|
||||
navigation.navigateTo(MainView.class, SettingsView.class, PreferencesView.class);
|
||||
else if (!showAllTradeCurrenciesProperty.get()) {
|
||||
else if (!showAllEntry) {
|
||||
this.selectedTradeCurrency = tradeCurrency;
|
||||
tradeCurrencyCode.set(code);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue