fix legacy tab (#233)

This commit is contained in:
l0nelyc0w 2022-02-07 15:14:45 +02:00 committed by GitHub
parent 71a592cbb8
commit 06cd07157c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -118,21 +118,17 @@ public class SupportView extends ActivatableView<TabPane, Void> {
tradersRefundDisputesTab.setClosable(false); tradersRefundDisputesTab.setClosable(false);
root.getTabs().add(tradersRefundDisputesTab); root.getTabs().add(tradersRefundDisputesTab);
// We only show tradersArbitrationDisputesTab if we have cases
if (!arbitrationManager.getDisputesAsObservableList().isEmpty()) {
tradersArbitrationDisputesTab = new Tab(); tradersArbitrationDisputesTab = new Tab();
tradersArbitrationDisputesTab.setClosable(false); tradersArbitrationDisputesTab.setClosable(false);
root.getTabs().add(tradersArbitrationDisputesTab); root.getTabs().add(tradersArbitrationDisputesTab);
}
// Has to be called before loadView // Has to be called before loadView
updateAgentTabs(); updateAgentTabs();
tradersMediationDisputesTab.setText(Res.get("support.tab.mediation.support").toUpperCase()); tradersMediationDisputesTab.setText(Res.get("support.tab.mediation.support").toUpperCase());
tradersRefundDisputesTab.setText(Res.get("support.tab.arbitration.support").toUpperCase()); tradersRefundDisputesTab.setText(Res.get("support.tab.arbitration.support").toUpperCase());
if (tradersArbitrationDisputesTab != null) {
tradersArbitrationDisputesTab.setText(Res.get("support.tab.legacyArbitration.support").toUpperCase()); tradersArbitrationDisputesTab.setText(Res.get("support.tab.legacyArbitration.support").toUpperCase());
}
navigationListener = (viewPath, data) -> { navigationListener = (viewPath, data) -> {
if (viewPath.size() == 3 && viewPath.indexOf(SupportView.class) == 1) if (viewPath.size() == 3 && viewPath.indexOf(SupportView.class) == 1)
loadView(viewPath.tip()); loadView(viewPath.tip());