Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/views.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ export class TasksTimelineView extends BaseTasksView {
const adapter = new ObsidianTaskAdapter(this.app);
adapter.generateTasksList(fileIncludeFilter, fileExcludeFilter, fileIncludeTagsFilter, fileExcludeTagsFilter)
.then(() => {
const taskList = adapter.getTaskList();
let taskList = adapter.getTaskList();

const sortOptionFn = (0, eval)(this.userOptionModel.get("sort") || "")
if (sortOptionFn) taskList = taskList.sort(sortOptionFn)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorting tasks here might not work cauze some fields of the task items might not get parsed yet.
you need to sort after all the meta infos are parsed.


const taskListPromise = this.parseTasks(taskList)
taskListPromise.then(tasks => {
tasks = this.filterTasks(tasks);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add your sorting code after this would be good.

Expand Down