Search in sources :

Example 1 with ObservableBoolean

use of androidx.databinding.ObservableBoolean in project wolvic by Igalia.

the class SettingsViewModel method isWhatsNewVisible.

private void isWhatsNewVisible() {
    /*boolean value = props.getValue() != null &&
                !BuildConfig.VERSION_NAME.equals(propsVersionName.getValue()) &&
                props.getValue().containsKey(BuildConfig.VERSION_NAME);*/
    boolean value = false;
    isWhatsNewVisible.postValue(new ObservableBoolean(value));
}
Also used : ObservableBoolean(androidx.databinding.ObservableBoolean)

Example 2 with ObservableBoolean

use of androidx.databinding.ObservableBoolean in project wolvic by Igalia.

the class SettingsViewModel method refresh.

public void refresh() {
    int level = SettingsStore.getInstance(getApplication().getBaseContext()).getTrackingProtectionLevel();
    boolean isEnabled = level != WContentBlocking.EtpLevel.NONE;
    isTrackingProtectionEnabled.postValue(new ObservableBoolean(isEnabled));
    boolean drmEnabled = SettingsStore.getInstance(getApplication().getBaseContext()).isDrmContentPlaybackEnabled();
    isDRMEnabled.postValue(new ObservableBoolean(drmEnabled));
    boolean popupBlockingEnabled = SettingsStore.getInstance(getApplication().getBaseContext()).isPopUpsBlockingEnabled();
    isPopupBlockingEnabled.postValue(new ObservableBoolean(popupBlockingEnabled));
    boolean webxrEnabled = SettingsStore.getInstance(getApplication().getBaseContext()).isWebXREnabled();
    isWebXREnabled.postValue(new ObservableBoolean(webxrEnabled));
    String appVersionName = SettingsStore.getInstance(getApplication().getBaseContext()).getRemotePropsVersionName();
    propsVersionName.postValue(appVersionName);
}
Also used : ObservableBoolean(androidx.databinding.ObservableBoolean)

Example 3 with ObservableBoolean

use of androidx.databinding.ObservableBoolean in project wolvic by Igalia.

the class WindowViewModel method setIsLibraryVisible.

public void setIsLibraryVisible(boolean isLibraryVisible) {
    this.isLibraryVisible.postValue(new ObservableBoolean(isLibraryVisible));
    this.url.postValue(this.getUrl().getValue());
}
Also used : ObservableBoolean(androidx.databinding.ObservableBoolean)

Aggregations

ObservableBoolean (androidx.databinding.ObservableBoolean)3