MCPcopy
hub / github.com/callumalpass/tasknotes / updateTaskCardDisplay

Method updateTaskCardDisplay

src/views/PomodoroView.ts:910–942  ·  view source on GitHub ↗
(task: TaskInfo | null)

Source from the content-addressed store, hash-verified

908 }
909
910 private updateTaskCardDisplay(task: TaskInfo | null) {
911 if (!this.taskCardContainer) return;
912
913 // Clear existing content
914 this.taskCardContainer.empty();
915
916 if (task) {
917 // Create a task card with appropriate options for pomodoro view
918 // Convert internal property names to user-configured frontmatter property names
919 const visibleProperties = this.plugin.settings.defaultVisibleProperties
920 ? convertInternalToUserProperties(
921 this.plugin.settings.defaultVisibleProperties,
922 this.plugin
923 )
924 : undefined;
925 const targetDate = new Date();
926 const displayTask = getTaskWithInstanceStatus(
927 task,
928 targetDate,
929 this.plugin.statusManager,
930 this.plugin.settings.defaultTaskStatus
931 );
932 const taskCard = createTaskCard(displayTask, this.plugin, visibleProperties, {
933 targetDate,
934 });
935
936 // Add the task card to the container
937 this.taskCardContainer.appendChild(taskCard);
938 this.taskCardContainer.removeClass("pomodoro-view__task-card-container--empty");
939 } else {
940 this.taskCardContainer.addClass("pomodoro-view__task-card-container--empty");
941 }
942 }
943
944 private async restoreLastSelectedTask() {
945 try {

Callers 3

registerEventsMethod · 0.95
selectTaskMethod · 0.95

Calls 4

createTaskCardFunction · 0.90
addClassMethod · 0.65

Tested by

no test coverage detected