mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-27 00:09:34 -05:00
close mutable offer view on fx thread (#1325)
This commit is contained in:
parent
6b688194f1
commit
cda610fdfd
@ -18,6 +18,7 @@
|
|||||||
package haveno.desktop.main.portfolio;
|
package haveno.desktop.main.portfolio;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
|
import haveno.common.UserThread;
|
||||||
import haveno.core.locale.Res;
|
import haveno.core.locale.Res;
|
||||||
import haveno.core.offer.OfferPayload;
|
import haveno.core.offer.OfferPayload;
|
||||||
import haveno.core.offer.OpenOffer;
|
import haveno.core.offer.OpenOffer;
|
||||||
@ -200,7 +201,7 @@ public class PortfolioView extends ActivatableView<TabPane, Void> {
|
|||||||
editOfferView.applyOpenOffer(openOffer);
|
editOfferView.applyOpenOffer(openOffer);
|
||||||
editOpenOfferTab = new Tab(Res.get("portfolio.tab.editOpenOffer").toUpperCase());
|
editOpenOfferTab = new Tab(Res.get("portfolio.tab.editOpenOffer").toUpperCase());
|
||||||
editOfferView.setCloseHandler(() -> {
|
editOfferView.setCloseHandler(() -> {
|
||||||
root.getTabs().remove(editOpenOfferTab);
|
UserThread.execute(() -> root.getTabs().remove(editOpenOfferTab));
|
||||||
});
|
});
|
||||||
root.getTabs().add(editOpenOfferTab);
|
root.getTabs().add(editOpenOfferTab);
|
||||||
}
|
}
|
||||||
@ -220,7 +221,7 @@ public class PortfolioView extends ActivatableView<TabPane, Void> {
|
|||||||
duplicateOfferView.initWithData((OfferPayload) data);
|
duplicateOfferView.initWithData((OfferPayload) data);
|
||||||
duplicateOfferTab = new Tab(Res.get("portfolio.tab.duplicateOffer").toUpperCase());
|
duplicateOfferTab = new Tab(Res.get("portfolio.tab.duplicateOffer").toUpperCase());
|
||||||
duplicateOfferView.setCloseHandler(() -> {
|
duplicateOfferView.setCloseHandler(() -> {
|
||||||
root.getTabs().remove(duplicateOfferTab);
|
UserThread.execute(() -> root.getTabs().remove(duplicateOfferTab));
|
||||||
});
|
});
|
||||||
root.getTabs().add(duplicateOfferTab);
|
root.getTabs().add(duplicateOfferTab);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user