hideInspection method

Future<void> hideInspection(
  1. InspectionLocation inspection
)

Implementation

Future<void> hideInspection(InspectionLocation inspection) async {
  final pjNr = _normalizePjNr(inspection.pjNr);
  if (pjNr == null) return;

  final entries = await _loadHiddenInspections();
  entries[pjNr] = HiddenInspectionEntry(
    pjNr: pjNr,
    localId: inspection.id,
    title: inspection.pjName ?? inspection.title,
    hiddenAtMs: DateTime.now().millisecondsSinceEpoch,
  );
  await _persistHiddenInspections(entries);
}