Skip to content

Commit

Permalink
Rename function
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Cech <[email protected]>
  • Loading branch information
davelopez and martenson committed Apr 20, 2024
1 parent df3becf commit a37b42f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/src/components/Common/models/exportRecordModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ export class ExportParamsModel implements ExportParams {
if (!otherExportParams) {
return false;
}
return sameExportParams(this, otherExportParams);
return areEqual(this, otherExportParams);
}
}

export function sameExportParams(params1?: ExportParams, params2?: ExportParams): boolean {
export function areEqual(params1?: ExportParams, params2?: ExportParams): boolean {
if (!params1 || !params2) {
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/History/Export/HistoryExport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
reimportHistoryFromRecord,
} from "@/api/histories.export";
import type { ColorVariant } from "@/components/Common";
import { ExportParams, ExportRecord, sameExportParams } from "@/components/Common/models/exportRecordModel";
import { areEqual, ExportParams, ExportRecord } from "@/components/Common/models/exportRecordModel";
import { useConfirmDialog } from "@/composables/confirmDialog";
import { useFileSources } from "@/composables/fileSources";
import { DEFAULT_EXPORT_PARAMS, useShortTermStorage } from "@/composables/shortTermStorage";
Expand Down Expand Up @@ -69,7 +69,7 @@ const isLatestExportRecordReadyToDownload = computed(
latestExportRecord.value &&
latestExportRecord.value.isUpToDate &&
latestExportRecord.value.canDownload &&
sameExportParams(latestExportRecord.value.exportParams, exportParams.value)
areEqual(latestExportRecord.value.exportParams, exportParams.value)
);
const canGenerateDownload = computed(() => !isPreparingDownload.value && !isLatestExportRecordReadyToDownload.value);
const previousExportRecords = computed(() => (exportRecords.value ? exportRecords.value.slice(1) : []));
Expand Down

0 comments on commit a37b42f

Please sign in to comment.