From fef19a3c800bffbe4654f2100c83e89efca4c073 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 23 Apr 2025 09:36:24 +0200 Subject: [PATCH] :sparkles: Add legacy flex dir cleaner --- backend/src/app/binfile/cleaner.clj | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/backend/src/app/binfile/cleaner.clj b/backend/src/app/binfile/cleaner.clj index 55a490dae..1f27e7751 100644 --- a/backend/src/app/binfile/cleaner.clj +++ b/backend/src/app/binfile/cleaner.clj @@ -70,13 +70,25 @@ (cts/setup-shape)) shape)) +(defn- fix-legacy-flex-dir + "This operation is only relevant to old data and it is fixed just + for convenience." + [shape] + (d/update-when shape :layout-flex-dir + (fn [dir] + (case dir + :reverse-row :row-reverse + :reverse-column :column-reverse + dir)))) + (defn clean-shape-post-decode "A shape procesor that expected to be executed after schema decoding process but before validation." [shape] (-> shape (fix-shape-shadow-color) - (fix-root-shape))) + (fix-root-shape) + (fix-legacy-flex-dir))) (defn clean-file [file & {:as _opts}]