<commit_before>package org.realityforge.arez.gwt.examples;

import elemental2.dom.DomGlobal;
import org.realityforge.arez.annotations.Action;
import org.realityforge.arez.annotations.Container;
import org.realityforge.arez.annotations.Observable;

@Container( singleton = true )
public class NetworkStatus
{
  private boolean _onLine;

  @Observable
  public boolean isOnLine()
  {
    return _onLine;
  }

  public void setOnLine( final boolean onLine )
  {
    _onLine = onLine;
  }

  @Action
  public void updateOnlineStatus()
  {
    setOnLine( DomGlobal.navigator.onLine );
  }
}<commit_msg>Use computed value for OnLine flag<commit_after>package org.realityforge.arez.gwt.examples;

import elemental2.dom.DomGlobal;
import org.realityforge.arez.annotations.Action;
import org.realityforge.arez.annotations.Computed;
import org.realityforge.arez.annotations.Container;
import org.realityforge.arez.annotations.Observable;

@Container( singleton = true )
public class NetworkStatus
{
  private boolean _rawOnLine;

  @Computed
  public boolean isOnLine()
  {
    return isRawOnLine();
  }

  @Observable
  boolean isRawOnLine()
  {
    return _rawOnLine;
  }

  void setRawOnLine( final boolean rawOnLine )
  {
    _rawOnLine = rawOnLine;
  }

  @Action
  public void updateOnlineStatus()
  {
    setRawOnLine( DomGlobal.navigator.onLine );
  }
}
{'fraction_non_alphanumeric': 0.09104367135455219, 'fraction_numerical': 0.0014803849000740192, 'mean_word_length': 4.301960784313725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7490663', 'n_tokens_mistral': 466, 'n_tokens_neox': 431, 'n_words': 89}