mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 10:22:18 +01:00
no need for atomic, only run on gui thread
This commit is contained in:
parent
a9b8b51bd6
commit
32d905e475
@ -69,7 +69,7 @@ public final class Preferences implements PersistedDataHost {
|
||||
@Setter
|
||||
@Delegate(excludes = ExcludesDelegateMethods.class)
|
||||
private PreferencesPayload prefPayload = new PreferencesPayload();
|
||||
private AtomicBoolean initialReadDone = new AtomicBoolean(false);
|
||||
private boolean initialReadDone = false;
|
||||
|
||||
// Observable wrappers
|
||||
@Getter
|
||||
@ -202,7 +202,7 @@ public final class Preferences implements PersistedDataHost {
|
||||
if (btcNodesFromOptions != null && !btcNodesFromOptions.isEmpty())
|
||||
setBitcoinNodes(btcNodesFromOptions);
|
||||
|
||||
initialReadDone.set(true);
|
||||
initialReadDone = true;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -279,7 +279,7 @@ public final class Preferences implements PersistedDataHost {
|
||||
}
|
||||
|
||||
private void persist() {
|
||||
if (initialReadDone.get())
|
||||
if (initialReadDone)
|
||||
storage.queueUpForSave(prefPayload);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user