mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-02 11:46:11 -04:00
add and remove offers on user thread to fix illegal state #1031
This commit is contained in:
parent
26a5ffcb31
commit
cb0b6665f7
2 changed files with 30 additions and 24 deletions
|
@ -19,6 +19,8 @@ package haveno.desktop.main.market.offerbook;
|
|||
|
||||
import com.google.common.math.LongMath;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
import haveno.common.UserThread;
|
||||
import haveno.core.account.witness.AccountAgeWitnessService;
|
||||
import haveno.core.locale.CurrencyUtil;
|
||||
import haveno.core.locale.GlobalSettings;
|
||||
|
@ -135,10 +137,12 @@ class OfferBookChartViewModel extends ActivatableViewModel {
|
|||
|
||||
currenciesUpdatedListener = (observable, oldValue, newValue) -> {
|
||||
if (!isAnyPriceAbsent()) {
|
||||
offerBook.fillOfferBookListItems();
|
||||
updateChartData();
|
||||
var self = this;
|
||||
priceFeedService.updateCounterProperty().removeListener(self.currenciesUpdatedListener);
|
||||
UserThread.execute(() -> {
|
||||
offerBook.fillOfferBookListItems();
|
||||
updateChartData();
|
||||
var self = this;
|
||||
priceFeedService.updateCounterProperty().removeListener(self.currenciesUpdatedListener);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue