handleRejectedByApi method

void handleRejectedByApi()

Called when the API rejects a fast mode request. Permanently disables fast mode using the same flow as when the prefetch discovers the org has it disabled.

Implementation

void handleRejectedByApi() {
  if (_orgStatus is FastModeOrgDisabled) return;
  _orgStatus = const FastModeOrgDisabled(
    reason: FastModeDisabledReason.preference,
  );
  _config.updateSettingsForSource('userSettings', {'fastMode': null});
  _config.saveGlobalConfig(
    (current) => {...current, 'penguinModeOrgEnabled': false},
  );
  orgFastModeChanged.emit(false);
}