Skip to content

Commit

Permalink
Merge pull request #420 from c-noblet/feat/ics-due-tag
Browse files Browse the repository at this point in the history
feat: add VTODO DUE tag support in IcsImporter
  • Loading branch information
naveensingh authored Jan 20, 2025
2 parents 5957043 + c0e2ee2 commit 8d97ad0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ const val BEGIN_TASK = "BEGIN:VTODO"
const val END_TASK = "END:VTODO"
const val BEGIN_ALARM = "BEGIN:VALARM"
const val END_ALARM = "END:VALARM"
const val DUE = "DUE"
const val DTSTART = "DTSTART"
const val DTEND = "DTEND"
const val LAST_MODIFIED = "LAST-MODIFIED"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ class IcsImporter(val activity: SimpleActivity) {
curEventTypeId = defaultEventTypeId
isParsingTask = true
curType = TYPE_TASK
} else if (line.startsWith(DUE)) {
if (isParsingTask) {
curStart = getTimestamp(line.substring(DUE.length))

if (curRrule != "") {
parseRepeatRule()
}
}
} else if (line.startsWith(DTSTART)) {
if (isParsingEvent || isParsingTask) {
curStart = getTimestamp(line.substring(DTSTART.length))
Expand Down

0 comments on commit 8d97ad0

Please sign in to comment.