Add missing support to deactivate animations

This commit is contained in:
Manfred Karrer 2016-03-11 12:57:40 +01:00
parent 415530c8ef
commit 4fc3b00fa4
3 changed files with 12 additions and 7 deletions

View file

@ -83,6 +83,8 @@ public final class Preferences implements Persistable {
return defaultTradeCurrency;
}
private static boolean _useAnimations = true;
transient private final Storage<Preferences> storage;
transient private final BitsquareEnvironment bitsquareEnvironment;
@ -184,6 +186,7 @@ public final class Preferences implements Persistable {
});
useAnimationsProperty.addListener((ov) -> {
useAnimations = useAnimationsProperty.get();
_useAnimations = useAnimations;
storage.queueUpForSave(2000);
});
fiatCurrenciesAsObservable.addListener((Observable ov) -> {
@ -351,6 +354,10 @@ public final class Preferences implements Persistable {
return useAnimationsProperty.get();
}
public static boolean useAnimations() {
return _useAnimations;
}
public StringProperty btcDenominationProperty() {
return btcDenominationProperty;
}