function load_settings(){
  try{
    var file = SETTING_PREFIX + ".settings.json";
    settings = require("Storage").readJSON(file);
    if(settings != null){
      console.log(file + " loaded:" + JSON.stringify(settings));
      if(settings.color_scheme != null){
        set_colorscheme(settings.color_scheme);
      }
      if(settings.font != null){
        set_font(settings.font);
      }
    } else {
      console.log(file + " not found - no settings to load");
    }
  } catch(e){
    console.log("failed to load settings:" + e);
  }
}
/**
* Called on startup to set the watch to the last preference settings
*/
Called on startup to set the watch to the last preference settings
Called on startup to set the watch to the last preference settings
function load_settings(){
  try{
    var file = SETTING_PREFIX + ".settings.json";
    settings = require("Storage").readJSON(file);
    if(settings != null){
      console.log(file + " loaded:" + JSON.stringify(settings));
      if(settings.color_scheme != null){
        set_colorscheme(settings.color_scheme);
      }
      if(settings.font != null){
        set_font(settings.font);
      }
    } else {
      console.log(file + " not found - no settings to load");
    }
  } catch(e){
    console.log("failed to load settings:" + e);
  }
}
function load_settings ( ) { try { var file = SETTING_PREFIX + ".settings.json" ; settings = require ( "Storage" ) . readJSON ( file ) ; if ( settings != null ) { console . log ( file + " loaded:" + JSON . stringify ( settings ) ) ; if ( settings . color_scheme != null ) { set_colorscheme ( settings . color_scheme ) ; } if ( settings . font != null ) { set_font ( settings . font ) ; } } else { console . log ( file + " not found - no settings to load" ) ; } } catch ( e ) { console . log ( "failed to load settings:" + e ) ; } }
Called on startup to set the watch to the last preference settings
Called on startup to set the watch to the last preference settings