mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Fix tx history update bug (#234)
This commit is contained in:
parent
a86add2d9b
commit
e459ce8419
@ -44,6 +44,7 @@ public class FundsViewCB extends CachedViewCB {
|
||||
|
||||
private Navigation.Listener navigationListener;
|
||||
private ChangeListener<Tab> tabChangeListener;
|
||||
private Tab currentTab;
|
||||
|
||||
@FXML Tab withdrawalTab, transactionsTab;
|
||||
|
||||
@ -103,12 +104,6 @@ public class FundsViewCB extends CachedViewCB {
|
||||
navigation.removeListener(navigationListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("EmptyMethod")
|
||||
@Override
|
||||
public void terminate() {
|
||||
super.terminate();
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Navigation
|
||||
@ -118,19 +113,22 @@ public class FundsViewCB extends CachedViewCB {
|
||||
protected Initializable loadView(Navigation.Item navigationItem) {
|
||||
super.loadView(navigationItem);
|
||||
|
||||
// we want to get activate/deactivate called, so we remove the old view on tab change
|
||||
if (currentTab != null)
|
||||
currentTab.setContent(null);
|
||||
|
||||
final ViewLoader loader = new ViewLoader(navigationItem);
|
||||
Node view = loader.load();
|
||||
Tab tab = null;
|
||||
switch (navigationItem) {
|
||||
case WITHDRAWAL:
|
||||
tab = withdrawalTab;
|
||||
currentTab = withdrawalTab;
|
||||
break;
|
||||
case TRANSACTIONS:
|
||||
tab = transactionsTab;
|
||||
currentTab = transactionsTab;
|
||||
break;
|
||||
}
|
||||
tab.setContent(view);
|
||||
((TabPane) root).getSelectionModel().select(tab);
|
||||
currentTab.setContent(view);
|
||||
((TabPane) root).getSelectionModel().select(currentTab);
|
||||
Initializable childController = loader.getController();
|
||||
((ViewCB) childController).setParent(this);
|
||||
|
||||
|
@ -44,12 +44,11 @@ public class PortfolioViewCB extends CachedViewCB {
|
||||
private final Navigation navigation;
|
||||
private final TradeManager tradeManager;
|
||||
|
||||
private Tab currentTab;
|
||||
private Navigation.Listener navigationListener;
|
||||
private ChangeListener<Tab> tabChangeListener;
|
||||
|
||||
@FXML Tab offersTab, openTradesTab, closedTradesTab;
|
||||
private Parent currentView;
|
||||
private Tab currentTab;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -125,14 +124,14 @@ public class PortfolioViewCB extends CachedViewCB {
|
||||
|
||||
@Override
|
||||
protected Initializable loadView(Navigation.Item navigationItem) {
|
||||
super.loadView(navigationItem);
|
||||
|
||||
// we want to get activate/deactivate called, so we remove the old view on tab change
|
||||
if (currentTab != null)
|
||||
currentTab.setContent(null);
|
||||
|
||||
super.loadView(navigationItem);
|
||||
|
||||
final ViewLoader loader = new ViewLoader(navigationItem);
|
||||
currentView = loader.load();
|
||||
Node view = loader.load();
|
||||
switch (navigationItem) {
|
||||
case OFFERS:
|
||||
currentTab = offersTab;
|
||||
@ -144,7 +143,7 @@ public class PortfolioViewCB extends CachedViewCB {
|
||||
currentTab = closedTradesTab;
|
||||
break;
|
||||
}
|
||||
currentTab.setContent(currentView);
|
||||
currentTab.setContent(view);
|
||||
((TabPane) root).getSelectionModel().select(currentTab);
|
||||
Initializable childController = loader.getController();
|
||||
((ViewCB) childController).setParent(this);
|
||||
|
Loading…
Reference in New Issue
Block a user