Skip to content

Commit

Permalink
feat: Support cycling with list item
Browse files Browse the repository at this point in the history
Cycle with list as first status, if toggled.
  • Loading branch information
wenlzhang committed Nov 6, 2023
1 parent a03b7e6 commit 168251b
Showing 1 changed file with 45 additions and 15 deletions.
60 changes: 45 additions & 15 deletions src/taskmarker-TaskMarker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -767,9 +767,15 @@ export class TaskMarker {
} else {
markIndex = 0;
}
}
} else if (cycleWithList) {
markIndex = -1; // cycle with list
}
}
}
// Update next index based on item type
if (markIndex === 0) {
if (taskMatch) {
if (cycleWithList) {
markIndex = -1; // cycle with list
}
}
}

Expand Down Expand Up @@ -855,9 +861,15 @@ export class TaskMarker {
} else {
markIndex = 0;
}
}
} else if (cycleWithList) {
markIndex = -1; // cycle with list
}
}
}
// Update next index based on item type
if (markIndex === 0) {
if (taskMatch) {
if (cycleWithList) {
markIndex = -1; // cycle with list
}
}
}

Expand Down Expand Up @@ -943,9 +955,15 @@ export class TaskMarker {
} else {
markIndex = 0;
}
}
} else if (cycleWithList) {
markIndex = -1; // cycle with list
}
}
}
// Update next index based on item type
if (markIndex === 0) {
if (taskMatch) {
if (cycleWithList) {
markIndex = -1; // cycle with list
}
}
}

Expand Down Expand Up @@ -1031,9 +1049,15 @@ export class TaskMarker {
} else {
markIndex = 0;
}
}
} else if (cycleWithList) {
markIndex = -1; // cycle with list
}
}
}
// Update next index based on item type
if (markIndex === 0) {
if (taskMatch) {
if (cycleWithList) {
markIndex = -1; // cycle with list
}
}
}

Expand Down Expand Up @@ -1126,9 +1150,15 @@ export class TaskMarker {
} else {
markIndex = 0;
}
}
} else if (cycleWithList) {
markIndex = -1; // cycle with list
}
}
}
// Update next index based on item type
if (markIndex === 0) {
if (taskMatch) {
if (cycleWithList) {
markIndex = -1; // cycle with list
}
}
}

Expand Down

0 comments on commit 168251b

Please sign in to comment.