selectRefreshedInspectionForDownload function

InspectionLocation? selectRefreshedInspectionForDownload(
  1. InspectionLocation current,
  2. List<InspectionLocation> refreshed
)

Implementation

InspectionLocation? selectRefreshedInspectionForDownload(
  InspectionLocation current,
  List<InspectionLocation> refreshed,
) {
  for (final inspection in refreshed) {
    if (inspection.id == current.id) return inspection;
  }
  for (final inspection in refreshed) {
    if (inspection.pjNr == current.pjNr && inspection.stONr == current.stONr) {
      return inspection;
    }
  }
  return null;
}