1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00

Desktop: Fixes #10182: Detailed note list doesn't follow preferred date and time formats (#10204)

This commit is contained in:
cagnusmarlsen 2024-04-04 16:08:38 +05:30 committed by GitHub
parent 2488dd3806
commit 6f76fe728f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 6 deletions

View File

@ -56,5 +56,4 @@ describe('renderViewProps', () => {
},
});
});
});

View File

@ -14,11 +14,11 @@ export interface RenderViewPropsOptions {
const renderViewProp = (name: ListRendererDependency, value: any, options: RenderViewPropsOptions) => {
const renderers: Partial<Record<ListRendererDependency, ()=> string>> = {
'note.user_updated_time': () => time.unixMsToLocalDateTime(value),
'note.user_created_time': () => time.unixMsToLocalDateTime(value),
'note.updated_time': () => time.unixMsToLocalDateTime(value),
'note.created_time': () => time.unixMsToLocalDateTime(value),
'note.todo_completed': () => value ? time.unixMsToLocalDateTime(value) : '',
'note.user_updated_time': () => time.formatMsToLocal(value),
'note.user_created_time': () => time.formatMsToLocal(value),
'note.updated_time': () => time.formatMsToLocal(value),
'note.created_time': () => time.formatMsToLocal(value),
'note.todo_completed': () => value ? time.formatMsToLocal(value) : '',
'note.tags': () => value ? value.map((t: TagEntity) => t.title).join(', ') : '',
'note.title': () => options.noteTitleHtml,
};