Fix category sorting difference between mobile and web (#8828)

This commit is contained in:
Daniel Espino García 2025-05-06 09:51:06 +02:00 committed by GitHub
parent d27c56af88
commit b0df5edc1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,7 +32,7 @@ export const transformCategoryRecord = ({action, database, value}: TransformerAr
const fieldsMapper = (category: CategoryModel) => {
category._raw.id = isCreateAction ? (raw?.id ?? category.id) : record!.id;
category.displayName = raw.display_name;
category.sorting = raw.sorting || 'recent';
category.sorting = raw.sorting ?? '';
category.sortOrder = raw.sort_order === 0 ? 0 : raw.sort_order / 10; // Sort order from server is in multiples of 10
category.muted = raw.muted ?? false;
category.collapsed = isCreateAction ? false : record!.collapsed;