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 newImportId = if (mTask.id != null) {
|
||||
mTask.importId
|
||||
} else {
|
||||
UUID.randomUUID().toString().replace("-", "") + System.currentTimeMillis().toString()
|
||||
}
|
||||
|
||||
val reminders = getReminders()
|
||||
if (!task_all_day.isChecked) {
|
||||
@@ -393,6 +398,7 @@ class TaskActivity : SimpleActivity() {
|
||||
updateTaskCompletion(copy(startTS = mOriginalStartTS), true)
|
||||
}
|
||||
}
|
||||
importId = newImportId
|
||||
flags = mTask.flags.addBitIf(task_all_day.isChecked, FLAG_ALL_DAY)
|
||||
lastUpdated = System.currentTimeMillis()
|
||||
eventType = mEventTypeId
|
||||
@@ -458,7 +464,7 @@ class TaskActivity : SimpleActivity() {
|
||||
when (it) {
|
||||
0 -> {
|
||||
ensureBackgroundThread {
|
||||
eventsHelper.addEventRepetitionException(mTask.id!!, mTaskOccurrenceTS, true)
|
||||
eventsHelper.addEventRepetitionException(mTask.id!!, mTaskOccurrenceTS, addToCalDAV = false)
|
||||
mTask.apply {
|
||||
parentId = id!!.toLong()
|
||||
id = null
|
||||
@@ -610,7 +616,6 @@ class TaskActivity : SimpleActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun updateDateText() {
|
||||
task_date.text = Formatter.getDate(this, mTaskDateTime)
|
||||
}
|
||||
@@ -766,7 +771,6 @@ class TaskActivity : SimpleActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun showRepeatIntervalDialog() {
|
||||
showEventRepeatIntervalDialog(mRepeatInterval) {
|
||||
setRepeatInterval(it)
|
||||
|
Reference in New Issue
Block a user