code: function initSortMethod() {
          var sortMethod = PreferencesManager.getViewState(_WORKING_SET_SORT_PREF);
  
          if (!sortMethod) {
              sortMethod = _convertSortPref(PreferencesManager.getViewState(_LEGACY_SORT_PREF));
          }
  
          if (!sortMethod) {
              sortMethod = Commands.CMD_WORKINGSET_SORT_BY_ADDED;
          }
          return sortMethod;
      }
docs: /*
  initializes global sort method from preference settings or the default