initialState()

in src/BuildHistoryDisplay.js [163:181]


  initialState() {
    const prefs_str = localStorage.getItem("prefs");
    let prefs = {};
    if (prefs_str) {
      prefs = JSON.parse(prefs_str);
    }
    if (!("showStale" in prefs)) prefs["showStale"] = false;
    if (!("username" in prefs)) prefs["username"] = "";
    if (!("showNotifications" in prefs)) prefs["showNotifications"] = true;
    return {
      builds: [],
      known_jobs: [],
      currentTime: new Date(),
      updateTime: new Date(0),
      showStale: prefs.showStale,
      username: prefs.username,
      showNotifications: prefs.showNotifications,
    };
  }