public void commercialResult(String stream,String resultText,RequestResult result){
  setCommercialResult(DateTime.currentTime() + " " + resultText);
  lastCommercialRunAttempt=System.currentTimeMillis();
  setLoadingCommercial(false);
  if (result == TwitchApi.RequestResult.RUNNING_COMMERCIAL) {
    lastCommercial.put(stream,System.currentTimeMillis());
    if (stream != null && stream.equals(currentChannel)) {
      lastCommercialRun=System.currentTimeMillis();
    }
  }
}

public void commercialResult ( String stream , String resultText , RequestResult result ) { setCommercialResult ( DateTime . currentTime ( ) + " " + resultText ) ; lastCommercialRunAttempt = System . currentTimeMillis ( ) ; setLoadingCommercial ( false ) ; if ( result == TwitchApi . RequestResult . RUNNING_COMMERCIAL ) { lastCommercial . put ( stream , System . currentTimeMillis ( ) ) ; if ( stream != null && stream . equals ( currentChannel ) ) { lastCommercialRun = System . currentTimeMillis ( ) ; } } }
the commercial result as returned from the api . updates the result text and when the commercial was last run , also sets it to " not loading " state .
