mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
Use UUID for tasks too
This commit is contained in:
@@ -351,6 +351,11 @@ class TaskActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val wasRepeatable = mTask.repeatInterval > 0
|
val wasRepeatable = mTask.repeatInterval > 0
|
||||||
|
val newImportId = if (mTask.id != null) {
|
||||||
|
mTask.importId
|
||||||
|
} else {
|
||||||
|
UUID.randomUUID().toString().replace("-", "") + System.currentTimeMillis().toString()
|
||||||
|
}
|
||||||
|
|
||||||
val reminders = getReminders()
|
val reminders = getReminders()
|
||||||
if (!task_all_day.isChecked) {
|
if (!task_all_day.isChecked) {
|
||||||
@@ -393,6 +398,7 @@ class TaskActivity : SimpleActivity() {
|
|||||||
updateTaskCompletion(copy(startTS = mOriginalStartTS), true)
|
updateTaskCompletion(copy(startTS = mOriginalStartTS), true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
importId = newImportId
|
||||||
flags = mTask.flags.addBitIf(task_all_day.isChecked, FLAG_ALL_DAY)
|
flags = mTask.flags.addBitIf(task_all_day.isChecked, FLAG_ALL_DAY)
|
||||||
lastUpdated = System.currentTimeMillis()
|
lastUpdated = System.currentTimeMillis()
|
||||||
eventType = mEventTypeId
|
eventType = mEventTypeId
|
||||||
@@ -458,7 +464,7 @@ class TaskActivity : SimpleActivity() {
|
|||||||
when (it) {
|
when (it) {
|
||||||
0 -> {
|
0 -> {
|
||||||
ensureBackgroundThread {
|
ensureBackgroundThread {
|
||||||
eventsHelper.addEventRepetitionException(mTask.id!!, mTaskOccurrenceTS, true)
|
eventsHelper.addEventRepetitionException(mTask.id!!, mTaskOccurrenceTS, addToCalDAV = false)
|
||||||
mTask.apply {
|
mTask.apply {
|
||||||
parentId = id!!.toLong()
|
parentId = id!!.toLong()
|
||||||
id = null
|
id = null
|
||||||
@@ -610,7 +616,6 @@ class TaskActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun updateDateText() {
|
private fun updateDateText() {
|
||||||
task_date.text = Formatter.getDate(this, mTaskDateTime)
|
task_date.text = Formatter.getDate(this, mTaskDateTime)
|
||||||
}
|
}
|
||||||
@@ -766,7 +771,6 @@ class TaskActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun showRepeatIntervalDialog() {
|
private fun showRepeatIntervalDialog() {
|
||||||
showEventRepeatIntervalDialog(mRepeatInterval) {
|
showEventRepeatIntervalDialog(mRepeatInterval) {
|
||||||
setRepeatInterval(it)
|
setRepeatInterval(it)
|
||||||
|
Reference in New Issue
Block a user